LinearParticularSolution - Maple Help

Student[ODEs][ReduceOrder]

 LinearParticularSolution
 Reduce the order of a linear ODE using a particular solution

 Calling Sequence LinearParticularSolution(ODE, y(x) = psol) LinearParticularSolution(ODE, y(x) = psol, u(t))

Parameters

 ODE - second order linear ordinary differential equation y(x) = psol - equation; a particular solution of the ODE y - name; the original dependent variable x - name; the original independent variable u - name; the dependent variable for the reduced ODE t - name; the independent variable for the reduced ODE

Description

 • The LinearParticularSolution(ODE, psol) command reduces the order of a second order linear ODE using a particular solution.
 • The second argument must be a particular solution of the ODE of the form y(x) = psol, where psol does not depend on y(x).
 • The third argument, u(t), representing the variable for the reduced ODE, is optional. If it is not given, new independent and dependent variables will be chosen which do not conflict with the existing variables.
 • The default output is a sequence consisting of the reduced ODE in terms of the new variables, followed by the transformation used to recover the original ODE from the reduced ODE.
 • If an extra option solve or solve=true is also given, an attempt is made to solve the reduced ODE and return the general solution to the original ODE. If successful, the general solution of the original ODE will be returned.
 • If the option solve is given and furthermore, the extra option output=basis is given, then as above an attempt will be made to find the general solution to the original ODE, but the answer will be returned in the form of a list of particular solutions forming a basis for that general solution.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{ODEs}\right]\right):$
 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{ODEs}\right]\left[\mathrm{ReduceOrder}\right]\right):$

Given a linear homogeneous ODE:

 > $\mathrm{ode}≔\left(x-1\right)\mathrm{diff}\left(y\left(x\right),x,x\right)-x\mathrm{diff}\left(y\left(x\right),x\right)+y\left(x\right)=0$
 ${\mathrm{ode}}{≔}\left({x}{-}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){-}{x}{}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){+}{y}{}\left({x}\right){=}{0}$ (1)

And a particular solution for it:

 > $\mathrm{psol}≔y\left(x\right)=\mathrm{exp}\left(x\right)$
 ${\mathrm{psol}}{≔}{y}{}\left({x}\right){=}{{ⅇ}}^{{x}}$ (2)

Use the particular solution to find a new ODE of reduced order which can be used to solve the original:

 > $\mathrm{reduced_ode},\mathrm{tr}≔\mathrm{LinearParticularSolution}\left(\mathrm{ode},\mathrm{psol}\right)$
 ${\mathrm{reduced_ode}}{,}{\mathrm{tr}}{≔}\frac{{ⅆ}}{{ⅆ}{t}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{u}{}\left({t}\right){=}{-}\frac{{u}{}\left({t}\right){}\left({t}{-}{2}\right)}{{t}{-}{1}}{,}\left\{{t}{=}{x}{,}{u}{}\left({t}\right){=}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\left(\frac{{y}{}\left({x}\right)}{{{ⅇ}}^{{x}}}\right)\right\}$ (3)

Solve the reduced order ODE:

 > $\mathrm{reduced_sol}≔\mathrm{Solve}\left(\mathrm{reduced_ode},u\left(t\right)\right)$
 ${\mathrm{reduced_sol}}{≔}{u}{}\left({t}\right){=}{{ⅇ}}^{{-}{t}{+}{\mathrm{_C1}}}{}\left({t}{-}{1}\right)$ (4)

Apply the transformation to find a simpler ODE for the original variable y(x):

 > $\mathrm{new_ode}≔\mathrm{eval}\left(\mathrm{reduced_sol},\mathrm{tr}\right)$
 ${\mathrm{new_ode}}{≔}\frac{\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)}{{{ⅇ}}^{{x}}}{-}\frac{{y}{}\left({x}\right)}{{{ⅇ}}^{{x}}}{=}{{ⅇ}}^{{-}{x}{+}{\mathrm{_C1}}}{}\left({x}{-}{1}\right)$ (5)

Solve the simpler ODE to find the general solution of the original ODE:

 > $\mathrm{gensol1}≔\mathrm{Solve}\left(\mathrm{new_ode},y\left(x\right)\right)$
 ${\mathrm{gensol1}}{≔}{y}{}\left({x}\right){=}{-}{{ⅇ}}^{{x}}{}\left({x}{}{{ⅇ}}^{{-}{x}{+}{\mathrm{_C1}}}{-}{\mathrm{_C2}}\right)$ (6)

Alternatively, the particular solution can be used to solve the original ODE in a single step if we use the option solve:

 > $\mathrm{gensol}≔\mathrm{LinearParticularSolution}\left(\mathrm{ode},\mathrm{psol},'\mathrm{solve}'\right)$
 ${\mathrm{gensol}}{≔}{y}{}\left({x}\right){=}{{ⅇ}}^{{x}}{}\left({-}{x}{}{{ⅇ}}^{{-}{x}{+}{\mathrm{_C1}}}{+}{\mathrm{_C2}}\right)$ (7)

Simplify the form of the general solution:

 > $\mathrm{simplify}\left(\mathrm{expand}\left(\mathrm{gensol}\right)\right)$
 ${y}{}\left({x}\right){=}{-}{x}{}{{ⅇ}}^{{\mathrm{_C1}}}{+}{{ⅇ}}^{{x}}{}{\mathrm{_C2}}$ (8)

 > $\mathrm{Basis}≔\mathrm{LinearParticularSolution}\left(\mathrm{ode},\mathrm{psol},'\mathrm{solve}','\mathrm{output}'='\mathrm{basis}'\right)$
 ${\mathrm{Basis}}{≔}\left[{x}{,}{{ⅇ}}^{{x}}\right]$ (9)

Show the new solution:

 > $\mathrm{sol}≔y\left(x\right)=\mathrm{remove}\left(\mathrm{=},\mathrm{Basis},\mathrm{rhs}\left(\mathrm{psol}\right)\right)\left[1\right]$
 ${\mathrm{sol}}{≔}{y}{}\left({x}\right){=}{x}$ (10)

Calculate the Wronskian of the two solutions for y(x):

 > $W≔\mathrm{VectorCalculus}:-\mathrm{Wronskian}\left(\mathrm{Basis},x\right)$
 ${W}{≔}\left[\begin{array}{cc}{x}& {{ⅇ}}^{{x}}\\ {1}& {{ⅇ}}^{{x}}\end{array}\right]$ (11)

The determinant should be nonzero to prove independence of the solutions:

 > $\mathrm{simplify}\left(\mathrm{LinearAlgebra}:-\mathrm{Determinant}\left(W\right)\right)$
 ${{ⅇ}}^{{x}}{}\left({x}{-}{1}\right)$ (12)

Compatibility

 • The Student[ODEs][ReduceOrder][LinearParticularSolution] command was introduced in Maple 2021.