Solving differential equation in series general solution
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I was trying to solve differential equation in series general solution of (x+1)y''-(2-x)y'+y=0 and typed command, but it is not showing the correct solution and it is showing like the photo. However, I have to make the general solution look like y = C1(1 - (1/2)x^2 - (1/6)x^3 + ...) + C2(x + x^2 - (1/4)x^4 + ...) and could you please type the command for this part?
syms y(x)
S = dsolve((x+1)*diff(y,2)-(2-x)*diff(y)+y==0, 'ExpansionPoint',0,'Order',8)
syms C1 C2
C1*S(1) + C2*S(2)
Also, could you make any example of initial conditions like for example y(0)=2, y'(0) = 1. I think I am not sure how to put the initial value command because it is not working properly when I type for example command like this below. I appreciate it!
syms y(x)
S = dsolve((x+1)*diff(y,2)-(2-x)*diff(y)+y==0, 'ExpansionPoint',0,'Order',8, y(0)==2, Dy(0)==1)
syms C1 C2
C1*S(1) + C2*S(2)
0 comentarios
Respuestas (1)
John D'Errico
el 14 de Mzo. de 2023
I just showed you how to solve the problem, for two unknown constants. Of course, your question here involves an initial value at x ==0. Becareful, as if the series is singular at x==0, then trying to solve for an initial condition at x==0 will fail.
Take the series solution, as I showed you how to formulate it. You can also differentiate it. Now, substitute x==0 into both the series, and the derivative of that series. Could you now use solve to compute the value of those undetermined coefficients?
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!