3.6 problem 8.2

3.6.1 Solving as quadrature ode
3.6.2 Maple step by step solution

Internal problem ID [11987]
Internal file name [OUTPUT/10640_Saturday_September_02_2023_02_48_52_PM_58373890/index.tex]

Book: AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section: Chapter 8, Separable equations. Exercises page 72
Problem number: 8.2 .
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "quadrature"

Maple gives the following as the ode type

[_quadrature]

\[ \boxed {x^{\prime }+p x=q} \]

3.6.1 Solving as quadrature ode

Integrating both sides gives \begin {align*} \int \frac {1}{-p x +q}d x &= t +c_{1}\\ -\frac {\ln \left (-p x +q \right )}{p}&=t +c_{1} \end {align*}

Solving for \(x\) gives these solutions \begin {align*} x_1&=-\frac {{\mathrm e}^{-c_{1} p -t p}-q}{p}\\ &=-\frac {\frac {{\mathrm e}^{-t p}}{c_{1}}-q}{p} \end {align*}

Summary

The solution(s) found are the following \begin{align*} \tag{1} x &= -\frac {\frac {{\mathrm e}^{-t p}}{c_{1}}-q}{p} \\ \end{align*}

Verification of solutions

\[ x = -\frac {\frac {{\mathrm e}^{-t p}}{c_{1}}-q}{p} \] Verified OK.

3.6.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x^{\prime }+p x=q \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & x^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & x^{\prime }=-p x+q \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {x^{\prime }}{-p x+q}=1 \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \frac {x^{\prime }}{-p x+q}d t =\int 1d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & -\frac {\ln \left (-p x+q \right )}{p}=t +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} x \\ {} & {} & x=-\frac {{\mathrm e}^{-c_{1} p -t p}-q}{p} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 18

dsolve(diff(x(t),t)+p*x(t)=q,x(t), singsol=all)
 

\[ x \left (t \right ) = \frac {{\mathrm e}^{-p t} c_{1} p +q}{p} \]

Solution by Mathematica

Time used: 0.063 (sec). Leaf size: 29

DSolve[x'[t]+p*x[t]==q,x[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} x(t)\to \frac {q}{p}+c_1 e^{-p t} \\ x(t)\to \frac {q}{p} \\ \end{align*}