5.10 problem 10

5.10.1 Existence and uniqueness analysis
5.10.2 Solving as quadrature ode
5.10.3 Maple step by step solution

Internal problem ID [12669]
Internal file name [OUTPUT/11322_Friday_November_03_2023_06_30_23_AM_43163742/index.tex]

Book: Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section: Chapter 2. The Initial Value Problem. Exercises 2.3.1, page 57
Problem number: 10.
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 {y^{\prime }=\tan \left (x \right )} \] With initial conditions \begin {align*} [y \left (\pi \right ) = 0] \end {align*}

5.10.1 Existence and uniqueness analysis

This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}

Where here \begin {align*} p(x) &=0\\ q(x) &=\tan \left (x \right ) \end {align*}

Hence the ode is \begin {align*} y^{\prime } = \tan \left (x \right ) \end {align*}

The domain of \(p(x)=0\) is \[ \{-\infty

5.10.2 Solving as quadrature ode

Integrating both sides gives \begin {align*} y &= \int { \tan \left (x \right )\,\mathop {\mathrm {d}x}}\\ &= -\ln \left (\cos \left (x \right )\right )+c_{1} \end {align*}

Initial conditions are used to solve for \(c_{1}\). Substituting \(x=\pi \) and \(y=0\) in the above solution gives an equation to solve for the constant of integration. \begin {align*} 0 = -i \pi +c_{1} \end {align*}

The solutions are \begin {align*} c_{1} = i \pi \end {align*}

Trying the constant \begin {align*} c_{1} = i \pi \end {align*}

Substituting this in the general solution gives \begin {align*} y&=-\ln \left (\cos \left (x \right )\right )+i \pi \end {align*}

The constant \(c_{1} = i \pi \) gives valid solution.

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= -\ln \left (\cos \left (x \right )\right )+i \pi \\ \end{align*}

Verification of solutions

\[ y = -\ln \left (\cos \left (x \right )\right )+i \pi \] Verified OK.

5.10.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }=\tan \left (x \right ), y \left (\pi \right )=0\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int y^{\prime }d x =\int \tan \left (x \right )d x +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & y=-\ln \left (\cos \left (x \right )\right )+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=-\ln \left (\cos \left (x \right )\right )+c_{1} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (\pi \right )=0 \\ {} & {} & 0=-\mathrm {I} \pi +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =\mathrm {I} \pi \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =\mathrm {I} \pi \hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=-\ln \left (\cos \left (x \right )\right )+\mathrm {I} \pi \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=-\ln \left (\cos \left (x \right )\right )+\mathrm {I} \pi \end {array} \]

Maple trace

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

Solution by Maple

Time used: 0.016 (sec). Leaf size: 14

dsolve([diff(y(x),x)=tan(x),y(Pi) = 0],y(x), singsol=all)
 

\[ y \left (x \right ) = -\ln \left (\cos \left (x \right )\right )+i \pi \]

Solution by Mathematica

Time used: 0.006 (sec). Leaf size: 16

DSolve[{y'[x]==Tan[x],{y[Pi]==0}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to -\log (\cos (x))+i \pi \]