sábado, 9 de septiembre de 2023

How to solve a second order ODE with sympy

 How to solve a second order ODE with sympy

https://12000.org/my_notes/faq/sympy_python/index.htm


Solve 9 y{\left (x \right )} + \frac {d^{2}}{d x^{2}} y{\left (x \right )} = 09()+22()=0

from sympy import Function,dsolve,Derivative,Eq 
x=sympy.symbols('x') 
y=sympy.symbols('y', cls=Function) 
ode=Eq(Derivative(y(x), x, x) + 9*y(x),0) 
dsolve(ode, y(x))

y{\left (x \right )} = C_{1} \sin {\left (3 x \right )} + C_{2} \cos {\left (3 x \right )}

No hay comentarios:

Publicar un comentario