Solve a second order differential equation with ODE45, RK4 and draw with power series
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
jaehyeong park
el 23 de Nov. de 2019
Respondida: JONNALA SISINDRA REDDY
el 7 de Jun. de 2021
Hi, I am completely new to Matlab and am looking to solve a simple second order differential equation:
y''+x*y=0, −∞ < x < ∞.
I am looking to solve for y(x) with rk4, ode45
And plotting with power series these general solutions.
I understand this is a simple equation to solve and have done it fine on paper. However I have been trying different ways to solve it on matlab but to no avail.
Thanks in advance
2 comentarios
Jan
el 23 de Nov. de 2019
Do you want a numerical solution for a certain initial value or a symbolic solution?
Respuestas (2)
Jyotsna Talluri
el 26 de Nov. de 2019
Second order differential equations can be slved using 'dsolve'
syms y(x)
Dy = diff(y);
eqn = diff(y,x,2) == -x*y;
y(x) = dsolve(eqn);
y = simplify(y);
0 comentarios
JONNALA SISINDRA REDDY
el 7 de Jun. de 2021
syms y(x)
Dy = diff(y);
eqn = diff(y,x,2) == -x*y;
y(x) = dsolve(eqn);
y = simplify(y);
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!