build a solution to an ODE using a reduction of order returned by dsolve and a solution to the reduced ODE
answer returned by dsolve expressed in terms of ODESolStruc
solution to the reduced ODE found inside ODESolStruc
For high order ODEs it may happen that dsolve succeeds in reducing the order of the ODE but not in solving the problem to the end. In those cases, the solution is expressed using ODESolStruc. You can obtain a solution for the reduced ODE by using the tools available in DEtools, as a series expansion, or by other means. If a solution to the reduced ODE is obtained, you can build a solution to the original problem using the buildsol command.
The buildsol command is a function of two arguments. The first argument is the structure returned by dsolve as the solution to an ODE (see ODESolStruc). The second argument is a solution found by the user to the reduced ODE present inside the first argument. That solution may be a particular one; buildsol will not check whether the given solution actually solves the reduced ODE.
This function is part of the DEtools package, and so it can be used in the form buildsol(..) only after executing the command with(DEtools). However, it can always be accessed through the long form of the command by using DEtools[buildsol](..).
A third order nonlinear ODE
ODE ≔ ⅆ3ⅆx3⁢y⁡x=ⅆ2ⅆx2⁢y⁡x⁢−1+ⅆⅆx⁢y⁡x⁢ⅇy⁡x−x
This ODE is reducible:
It can be solved by dsolve directly by determining an appropriate integrating factor (see odeadvisor,reducible), but let's consider a possible answer for it as a reduction of order from 3 to 1:
sol ≔ y⁡x=ODESolStruc⁡_c+∫ⅇ∫_f1⁡_cⅆ_c+_C1ⅆ_c+_C2,ⅆⅆ_c⁢_f1⁡_c=2⁢_f1⁡_c2+_f1⁡_c⁢ⅇ_c,_c=y⁡x−x,_f1⁡_c=−ⅆⅆx⁢ⅆⅆx⁢y⁡x−1+ⅆⅆx⁢y⁡x2,y⁡x=_c+∫ⅇ∫_f1⁡_cⅆ_c+_C1ⅆ_c+_C2,x=∫ⅇ∫_f1⁡_cⅆ_c+_C1ⅆ_c+_C2
Test that the above solves the ODE by using odetest:
Now, the reduced ODE is of Bernoulli type, and can be selected using the mouse or through the following commands:
reduced_ODE ≔ op⁡2,2,1,1,sol
From the above, it is clear that a particular solution to the reduced_ODE is given by
sol_red_1 ≔ _f1⁡_c=0
from which a particular solution to the original ODE above can be built using
particular_sol ≔ buildsol⁡sol,sol_red_1
In this "blackboard" example, dsolve succeeds in solving the reduced_ODE too, as follows:
sol_red_2 ≔ dsolve⁡reduced_ODE
Passing this solution to buildsol, the general solution to ODE follows:
general_sol ≔ buildsol⁡sol,sol_red_2
Download Help Document