Student[ODEs]
ODESteps
Show a step-by-step solution process for ODEs, IVPs, or systems
Calling Sequence
Parameters
Description
Examples
ODESteps(ODE)
ODESteps(ODE, y(x))
ODESteps(sys)
ODE
-
an ordinary differential equation
y
name ; the dependent variable
x
name ; the independent variable
sys
set ; an ODE system including initial values
The ODESteps() command solves an ordinary differential equation (ODE) or system of ODEs.
The input may include a corresponding set of initial values, which would make it an initial value problem (IVP).
The output shows a series of steps in the solving process.
The following types of ODEs and ODE systems and/or solving methods are considered:
First Order ODEs
First Order IVPs
Second Order ODEs
Second Order IVPs
Cauchy-Euler Equations
Series Solutions
Special Function Solutions
Systems of ODEs
Systems of ODEs with IVP
with⁡StudentODEs:
A first order ODE:
ode1≔t2⁢z⁡t+1+z⁡t2⁢t−1⁢diff⁡z⁡t,t=0
ode1≔t2⁢z⁡t+1+z⁡t2⁢t−1⁢ⅆⅆtz⁡t=0
ODESteps⁡ode1
Let's solvet2⁢z⁡t+1+z⁡t2⁢t−1⁢ⅆⅆtz⁡t=0•Highest derivative means the order of the ODE is1ⅆⅆtz⁡t•Separate variablesⅆⅆtz⁡t⁢z⁡t2z⁡t+1=−t2t−1•Integrate both sides with respect tot∫ⅆⅆtz⁡t⁢z⁡t2z⁡t+1ⅆt=∫−t2t−1ⅆt+_C1•Evaluate integralz⁡t22−z⁡t+ln⁡z⁡t+1=−t22−t−ln⁡t−1+_C1
A first order IVP:
ivp1≔t2⁢z⁡t+1+z⁡t2⁢t−1⁢diff⁡z⁡t,t=0,z⁡3=1
ivp1≔t2⁢z⁡t+1+z⁡t2⁢t−1⁢ⅆⅆtz⁡t=0,z⁡3=1
ODESteps⁡ivp1
Let's solvet2⁢z⁡t+1+z⁡t2⁢t−1⁢ⅆⅆtz⁡t=0,z⁡3=1•Highest derivative means the order of the ODE is1ⅆⅆtz⁡t•Separate variablesⅆⅆtz⁡t⁢z⁡t2z⁡t+1=−t2t−1•Integrate both sides with respect tot∫ⅆⅆtz⁡t⁢z⁡t2z⁡t+1ⅆt=∫−t2t−1ⅆt+_C1•Evaluate integralz⁡t22−z⁡t+ln⁡z⁡t+1=−t22−t−ln⁡t−1+_C1•Use initial conditionz⁡3=1−12+ln⁡2=−152−ln⁡2+_C1•Solve for_C1_C1=7+2⁢ln⁡2•Solution to the IVPz⁡t22−z⁡t+ln⁡z⁡t+1=−t22−t−ln⁡t−1+7+2⁢ln⁡2
A second order ODE:
ode2≔2⁢x⁢diff⁡y⁡x,x−9⁢x2+2⁢diff⁡y⁡x,x+x2+1⁢diff⁡y⁡x,x,x=0
ode2≔2⁢x⁢ⅆⅆxy⁡x−9⁢x2+2⁢ⅆⅆxy⁡x+x2+1⁢ⅆ2ⅆx2y⁡x=0
ODESteps⁡ode2
Let's solve2⁢x⁢ⅆⅆxy⁡x−9⁢x2+2⁢ⅆⅆxy⁡x+x2+1⁢ⅆ2ⅆx2y⁡x=0•Highest derivative means the order of the ODE is2ⅆ2ⅆx2y⁡x•Make substitutionu=ⅆⅆxy⁡xto reduce order of ODE2⁢x⁢u⁡x−9⁢x2+2⁢u⁡x+x2+1⁢ⅆⅆxu⁡x=0▫Check if ODE is exact◦ODE is exact if the lhs is the total derivative of aC2function=0◦Compute derivative of lhs∂∂xF⁡x,u+∂∂uF⁡x,u⁢ⅆⅆxu⁡x=0◦Evaluate derivatives2⁢x=2⁢x◦Condition met, ODE is exact•Exact ODE implies solution will be of this formF⁡x,u=_C1,M⁡x,u=∂∂xF⁡x,u,N⁡x,u=∂∂uF⁡x,u•Solve forF⁡x,uby integratingM⁡x,uwith respect toxF⁡x,u=+_F1⁡u•Evaluate integralF⁡x,u=x2⁢u−3⁢x3+_F1⁡u•Take derivative ofF⁡x,uwith respect touN⁡x,u=∂∂uF⁡x,u•Compute derivativex2+2⁢u+1=x2+ⅆⅆu_F1⁡u•Isolate forⅆⅆu_F1⁡uⅆⅆu_F1⁡u=2⁢u+1•Solve for_F1⁡u_F1⁡u=u2+u•Substitute_F1⁡uinto equation forF⁡x,uF⁡x,u=x2⁢u−3⁢x3+u2+u•SubstituteF⁡x,uinto the solution of the ODEx2⁢u−3⁢x3+u2+u=_C1•Solve foru⁡xu⁡x=−x22−12−x4+12⁢x3+2⁢x2+4⁢_C1+12,u⁡x=−x22−12+x4+12⁢x3+2⁢x2+4⁢_C1+12•Solve 1st ODE foru⁡xu⁡x=−x22−12−x4+12⁢x3+2⁢x2+4⁢_C1+12•Make substitutionu=ⅆⅆxy⁡xⅆⅆxy⁡x=−x22−12−x4+12⁢x3+2⁢x2+4⁢_C1+12•Integrate both sides to solve fory⁡x∫ⅆⅆxy⁡xⅆx=∫−x22−12−x4+12⁢x3+2⁢x2+4⁢_C1+12ⅆx+_C2•Compute lhsy⁡x=∫−x22−12−x4+12⁢x3+2⁢x2+4⁢_C1+12ⅆx+_C2•Solve 2nd ODE foru⁡xu⁡x=−x22−12+x4+12⁢x3+2⁢x2+4⁢_C1+12•Make substitutionu=ⅆⅆxy⁡xⅆⅆxy⁡x=