Example 5 This is same example as above, but here we delay applying IC to the very end to see the diļ¬€erence. This method is more general, but makes solving for IC harder.\begin {equation} 2y^{\prime \prime }-e^{y}=0 \tag {1} \end {equation} With IC\begin {align*} y\left ( 0\right ) & =0\\ y^{\prime }\left ( 0\right ) & =1 \end {align*}

Let \(p=y^{\prime }\) then \(y^{\prime \prime }=p\frac {dp}{dy}\). Hence the ode becomes\begin {equation} 2\frac {dp}{dy}p=e^{y}\nonumber \end {equation} This is separable. \begin {align*} 2\int pdp & =\int e^{y}dy\\ p^{2} & =e^{y}+c_{1} \end {align*}

but \(p=y^{\prime }\) hence the above becomes\begin {align*} \left ( y^{\prime }\right ) ^{2} & =e^{y}+c_{1}\\ y^{\prime } & =\pm \sqrt {e^{y}+c_{1}} \end {align*}

This is quadrature. For the positive solution\begin {align} \frac {dy}{\sqrt {e^{y}+c_{1}}} & =dx\nonumber \\ -\frac {2\operatorname {arctanh}\left ( \frac {\sqrt {e^{y}+c_{1}}}{\sqrt {c_{1}}}\right ) }{\sqrt {c_{1}}} & =x+c_{2}\nonumber \\ 2\operatorname {arctanh}\left ( \frac {\sqrt {e^{y}+c_{1}}}{\sqrt {c_{1}}}\right ) & =-x\sqrt {c_{1}}-c_{2}\sqrt {c_{1}}\nonumber \\ \operatorname {arctanh}\left ( \frac {\sqrt {e^{y}+c_{1}}}{\sqrt {c_{1}}}\right ) & =-x\frac {\sqrt {c_{1}}}{2}-\frac {c_{2}\sqrt {c_{1}}}{2}\nonumber \\ \frac {\sqrt {e^{y}+c_{1}}}{\sqrt {c_{1}}} & =\tanh \left ( -x\frac {\sqrt {c_{1}}}{2}-\frac {c_{2}\sqrt {c_{1}}}{2}\right ) \nonumber \\ \sqrt {e^{y}+c_{1}} & =\sqrt {c_{1}}\tanh \left ( -x\frac {\sqrt {c_{1}}}{2}-\frac {c_{2}\sqrt {c_{1}}}{2}\right ) \nonumber \\ e^{y}+c_{1} & =\left ( \sqrt {c_{1}}\tanh \left ( -x\frac {\sqrt {c_{1}}}{2}-\frac {c_{2}\sqrt {c_{1}}}{2}\right ) \right ) ^{2}\nonumber \\ e^{y} & =\left ( \sqrt {c_{1}}\tanh \left ( -x\frac {\sqrt {c_{1}}}{2}-\frac {c_{2}\sqrt {c_{1}}}{2}\right ) \right ) ^{2}-c_{1}\nonumber \\ y & =\ln \left ( \left ( \sqrt {c_{1}}\tanh \left ( -x\frac {\sqrt {c_{1}}}{2}-\frac {c_{2}\sqrt {c_{1}}}{2}\right ) \right ) ^{2}-c_{1}\right ) \tag {2} \end {align}

Now we have to use (2) and take derivative and solve for \(c_{1},c_{2}\). Much harder than if we have applied IC to each solution earlier.