How to Solve a Second-Order Differential Equation?
Mostrar comentarios más antiguos
I need to solve this equation in matlab:

I wrote this but it gives me an answer with parameter t, which i don't know what means:
eqn2 = 'x*D2y+2*Dy-x*y=2*exp(x)';
pretty(simplify(dsolve(eqn2)))
Answear: C6*exp((t*((x^2 + 1)^(1/2) - 1))/x) - (2*exp(x))/x + C7*exp(-(t*((x^2 + 1)^(1/2) + 1))/x)
I know that the correct answear is 
Can you help me with matlab code?
Respuesta aceptada
Más respuestas (1)
syms x y
eqn2 = 'x*D2y+2*Dy-x*y=2*exp(x)';
dsolve(eqn2,x)
1 comentario
Filip Bielecki
el 17 de Abr. de 2021
Categorías
Más información sobre Assumptions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
