## Related questions with answers

Find the general solution of each of the following differential equations. Compare a computer solution and, if necessary, reconcile it with yours. $y^{\prime}+y \tanh x=2 e^{x}$.

Solution

VerifiedFrom eq.(3.4), we get

$\begin{align*} I &= \tanh x \; dx = \ln \left( \cosh x\right) \\ e^I &= e^{ \ln \left( \cosh x\right) } = \cosh x \end{align*}$

Using eq.(3.9) we can find a solution for this differential equation

$\begin{align*} ye^I &= \int \left( 2e^x \right) \cosh x \; dx = \frac{e^{2x}}{2}+ x+C \\ y &= \frac{e^{2x}/2+x+C}{\cosh x} \end{align*}$

Using the definition of the hyperbolic cosine

$\begin{align*} \cosh z &= \frac{e^z+e^{-z}}{2} = \frac{1+e^{-2z}}{2e^{-z}} = \frac{e^{2z}+1}{2e^z} \end{align*}$

(actually, we car going to use the last one) we can rewrite the solution as follow

$\begin{align*} y &= \frac{2e^x(e^{2x}/2+x+C)}{e^{2x}+1} = \frac{e^x(e^{2x}+2x+C_1)}{e^{2x}+1} \end{align*}$

On Wolfram Mathematica 11.1, we can write $\texttt{DSolve[y'[x] + y [x] Tanh[x] == 2 E\^{}x, y[x], x]}$, which will give us

$\begin{align*} y&= \frac{2e^x (e^{2x}/2+x)}{1+e^{2x}}+\frac{e^xC}{1+e^{2x}} = \frac{e^x(e^{2x}+2x+C_1)}{e^{2x}+1} \end{align*}$

## Create an account to view solutions

## Create an account to view solutions

## More related questions

1/4

1/7