Solving Second and Third Order ODEs using an Integrating Factor
Description
Examples
If, for an nth order ODE (n=2 or n=3) with the nth derivative isolated, there exists an integrating factor which depends only on the (n-1)st derivative, this integrating factor can be determined. The differential order of the ODE can then be reduced by one.
The general form of such an ODE of second order is:
reducible_ode_2 := diff(y(x),x,x)=diff(G(x,y(x)),x)/D(F)(diff(y(x),x));
reducible_ode_2≔ⅆ2ⅆx2y⁡x=D1⁡G⁡x,y⁡x+D2⁡G⁡x,y⁡x⁢ⅆⅆxy⁡xD⁡F⁡ⅆⅆxy⁡x
where F and G are arbitrary functions of their arguments. The integrating factor in this case is
mu := D(F)(diff(y(x),x));
μ≔D⁡F⁡ⅆⅆxy⁡x
The reduced ODE then becomes
F(diff(y(x),x)) = G(x,y(x)) + _C1;
F⁡ⅆⅆxy⁡x=G⁡x,y⁡x+_C1
The general form of this ODE of third order is:
reducible_ode_3 := diff(y(x),x$3)=diff(G(x,y(x),diff(y(x),x)),x)/D(F)(diff(y(x),x,x));
reducible_ode_3≔ⅆ3ⅆx3y⁡x=D1⁡G⁡x,y⁡x,ⅆⅆxy⁡x+D2⁡G⁡x,y⁡x,ⅆⅆxy⁡x⁢ⅆⅆxy⁡x+D3⁡G⁡x,y⁡x,ⅆⅆxy⁡x⁢ⅆ2ⅆx2y⁡xD⁡F⁡ⅆ2ⅆx2y⁡x
mu := D(F)(diff(y(x),x,x));
μ≔D⁡F⁡ⅆ2ⅆx2y⁡x
The reduced ODE is
F(diff(y(x),x,x)) = G(x,y(x),diff(y(x),x)) + _C1;
F⁡ⅆ2ⅆx2y⁡x=G⁡x,y⁡x,ⅆⅆxy⁡x+_C1
with(DEtools, odeadvisor);
odeadvisor
ode[1] := (x*diff(y(x),x,x)+2*diff(y(x),x))/x^2-(x*diff(y(x),x,x) +2*diff(y(x),x))/x^2/y(x)^2+2/x*diff(y(x),x)^2/y(x)^3 = 0;
ode1≔x⁢ⅆ2ⅆx2y⁡x+2⁢ⅆⅆxy⁡xx2−x⁢ⅆ2ⅆx2y⁡x+2⁢ⅆⅆxy⁡xx2⁢y⁡x2+2⁢ⅆⅆxy⁡x2x⁢y⁡x3=0
odeadvisor(ode[1]);
_Liouville,_2nd_order,_with_linear_symmetries,_2nd_order,_reducible,_mu_x_y1,_2nd_order,_reducible,_mu_xy
sol := dsolve(ode[1]);
sol≔y⁡x=_C2⁢x−_C1+_C22⁢x2−2⁢_C1⁢_C2⁢x+_C12−4⁢x22⁢x,y⁡x=−−_C2⁢x+_C22⁢x2−2⁢_C1⁢_C2⁢x+_C12−4⁢x2+_C12⁢x
Explicit or implicit results can be tested, in principle, using odetest. When testing multiple solutions, you can use map, as follows:
map(odetest,[sol],ode[1]);
0,0
A third order ODE
ode[2] := 1/x*diff(y(x),x,x,x)/diff(y(x),x,x)=1/x^2*(diff(y(x),x)*x+y(x))/y(x);
ode2≔ⅆ3ⅆx3y⁡xx⁢ⅆ2ⅆx2y⁡x=ⅆⅆxy⁡x⁢x+y⁡xx2⁢y⁡x
odeadvisor(ode[2]);
_3rd_order,_with_linear_symmetries,_3rd_order,_reducible,_mu_y2,_3rd_order,_reducible,_mu_poly_yn
sol := dsolve(ode[2]);
sol≔y⁡x=_C2⁢AiryAi⁡−_C1⁢x+_C3⁢AiryBi⁡−_C1⁢x
See Also
DEtools
dsolve
quadrature
missing
reducible
linear_ODEs
exact_linear
exact_nonlinear
odeadvisor,types
Download Help Document
What kind of issue would you like to report? (Optional)