2.11 problem Problem 11

2.11.1 Solving as separable ode
2.11.2 Maple step by step solution

Internal problem ID [2632]
Internal file name [OUTPUT/2124_Sunday_June_05_2022_02_49_25_AM_75605802/index.tex]

Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section: Chapter 1, First-Order Differential Equations. Section 1.4, Separable Differential Equations. page 43
Problem number: Problem 11.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_separable]

\[ \boxed {\left (x -a \right ) \left (x -b \right ) y^{\prime }-y=-c} \]

2.11.1 Solving as separable ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= f( x) g(y)\\ &= \frac {y -c}{\left (-x +a \right ) \left (-x +b \right )} \end {align*}

Where \(f(x)=\frac {1}{\left (-x +a \right ) \left (-x +b \right )}\) and \(g(y)=y -c\). Integrating both sides gives \begin{align*} \frac {1}{y -c} \,dy &= \frac {1}{\left (-x +a \right ) \left (-x +b \right )} \,d x \\ \int { \frac {1}{y -c} \,dy} &= \int {\frac {1}{\left (-x +a \right ) \left (-x +b \right )} \,d x} \\ \ln \left (y -c \right )&=-\frac {\ln \left (x -b \right )}{-b +a}+\frac {\ln \left (x -a \right )}{-b +a}+c_{1} \\ \end{align*} Raising both side to exponential gives \begin {align*} y -c &= {\mathrm e}^{-\frac {\ln \left (x -b \right )}{-b +a}+\frac {\ln \left (x -a \right )}{-b +a}+c_{1}} \end {align*}

Which simplifies to \begin {align*} y -c &= c_{2} {\mathrm e}^{-\frac {\ln \left (x -b \right )}{-b +a}+\frac {\ln \left (x -a \right )}{-b +a}} \end {align*}

Which simplifies to \[ y = c_{2} \left (x -b \right )^{-\frac {1}{-b +a}} \left (x -a \right )^{\frac {1}{-b +a}} {\mathrm e}^{c_{1}}+c \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= c_{2} \left (x -b \right )^{-\frac {1}{-b +a}} \left (x -a \right )^{\frac {1}{-b +a}} {\mathrm e}^{c_{1}}+c \\ \end{align*}

Verification of solutions

\[ y = c_{2} \left (x -b \right )^{-\frac {1}{-b +a}} \left (x -a \right )^{\frac {1}{-b +a}} {\mathrm e}^{c_{1}}+c \] Verified OK.

2.11.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (x -a \right ) \left (x -b \right ) y^{\prime }-y=-c \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {y-c}{\left (x -a \right ) \left (x -b \right )} \\ \bullet & {} & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {y^{\prime }}{y-c}=\frac {1}{\left (x -a \right ) \left (x -b \right )} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {y^{\prime }}{y-c}d x =\int \frac {1}{\left (x -a \right ) \left (x -b \right )}d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \ln \left (y-c \right )=-\frac {\ln \left (x -b \right )}{-b +a}+\frac {\ln \left (x -a \right )}{-b +a}+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y={\mathrm e}^{-\frac {-c_{1} a +c_{1} b +\ln \left (\frac {-x +b}{-x +a}\right )}{-b +a}}+c \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: 36

dsolve((x-a)*(x-b)*diff(y(x),x)-(y(x)-c)=0,y(x), singsol=all)
 

\[ y \left (x \right ) = c +\left (x -b \right )^{-\frac {1}{a -b}} \left (x -a \right )^{\frac {1}{a -b}} c_{1} \]

Solution by Mathematica

Time used: 0.102 (sec). Leaf size: 41

DSolve[(x-a)*(x-b)*y'[x]-(y[x]-c)==0,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to c+c_1 (x-b)^{\frac {1}{b-a}} (x-a)^{\frac {1}{a-b}} \\ y(x)\to c \\ \end{align*}