Solving a third order ODE in MATLAB
Mostra commenti meno recenti
Hi, MATLAB is quite about this command:
syms a h Y(x) g x B E T
D3Y = diff(Y, 3)
eqn = a.*D3Y -0.5*x^2*Y == (abs(Y))
D2Y = diff(Y, 2)
DY = diff(Y)
cond1 = Y(0) == 1;
cond2 = DY(0) == 0;
cond3 = D2Y(0) == 0
Y(x) = dsolve(eqn, cond1, cond2, cond3)
latex(Y(x))
Is there a limit here for solving it? Thanks
Risposta accettata
Più risposte (3)
Sergio Manzetti
il 14 Feb 2018
0 voti
2 Commenti
Sergio Manzetti
il 14 Feb 2018
Karan Gill
il 14 Feb 2018
Modificato: Karan Gill
il 14 Feb 2018
Is this what you tried? Didn't work for me.
Could you post your input to Wolfram?
Sergio Manzetti
il 15 Feb 2018
Modificato: Sergio Manzetti
il 15 Feb 2018
3 Commenti
Torsten
il 15 Feb 2018
You used
eqn = a.*D3Y -0.5*x^2*Y == Y
instead of
eqn = a.*D3Y -0.5*x^2*Y == abs(Y)
Best wishes
Torsten.
Karan Gill
il 15 Feb 2018
Thanks for catching that. I also noticed the third condition is different.
Torsten
il 15 Feb 2018
... and I'm surprised that the solution does not depend on "a".
Sergio Manzetti
il 15 Feb 2018
0 voti
2 Commenti
Karan Gill
il 15 Feb 2018
Thanks for the clarifications. I'll investigate. Note that cond3 is different in your two codes.
Sergio Manzetti
il 15 Feb 2018
Modificato: Sergio Manzetti
il 15 Feb 2018
Categorie
Scopri di più su Common Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!