# Show that y=2/3e^x+e^(-2x) is a solution of the differential equation y'+2y=2e^x?

## I am having trouble coming up with a method to the solution of this general differential equation without the use of an integration factor. It is the first question in Ch. 9.1 of James Stewart's Calculus. At this point, the integration factor has not been introduced. Thanks!

Jan 2, 2017

I don't have that text to refer to, so I will try but depending upon how far you have progressed in solving DE's it may be a out of scope

$y ' + 2 y = 2 {e}^{x}$

This is a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

$\frac{\mathrm{dy}}{\mathrm{dx}} + P \left(x\right) y = Q \left(x\right)$

If we had knowledge of the Integrating Factor then we could use:

$I F = {e}^{\int P \left(x\right) \mathrm{dx}}$

In this example $P \left(x\right) = 2$, a constant, and so our differential equation also has constant coefficients.

We could just take the answer and take its derivative and show that it satisfies the differential equation but that is not a method of "coming up with a method to the solution", so let's assume we have no knowledge of the solution.

There are two methods I could use to solve this equation.

Method 1 - Use the fact that it is a linear DE with constant coefficients

We use the same method used to solve a second order (or in fact any order) differential equation with constant coefficients. We can solve the homogeneous equation to find the Complementary Function (CF):

$y ' + 2 y = 0$

by turning to the Auxiliary Equation. This is made up with the coefficients of the derivatives, viz;

$m + 2 = 0 \implies m = - 2$

And so we can immediately conclude that $y = A {e}^{- 2 x}$ is a solution of the homogeneous equation, where $A$ is an Arbitrary constant.

We now need to find a particular integral (PI) solution, so because $Q \left(x\right) = 2 {e}^{x}$ we try a solution of the form $y = \alpha {e}^{x}$, where $\alpha$ is a constant to be found

$y = \alpha {e}^{x} \implies y ' = \alpha {e}^{x}$

Substitute this into the DE, and we get

$y ' + 2 y = \left\{\alpha {e}^{x}\right\} + 2 \left\{\alpha {e}^{x}\right\}$
$\text{ } = \alpha {e}^{x} + 2 \alpha {e}^{x}$
$\text{ } = 3 \alpha {e}^{x}$

We require that $y ' + 2 y = 2 {e}^{x} \implies 3 \alpha {e}^{x} = 2 {e}^{x} \implies \alpha = \frac{2}{3}$

Hence the general solution is :

$y = C F + P I$
$\setminus \setminus = A {e}^{- 2 x} + \frac{2}{3} {e}^{x}$, consistent with the given solution

Method 2 -Use an Integrating Factor but from First Principles

$y ' + 2 y = 2 {e}^{x} \text{ }$,or $\frac{\mathrm{dy}}{\mathrm{dx}} + 2 y = 2 {e}^{x}$

We cannot separate the variables for this DE because we cannot find:

$\int \left(\frac{\mathrm{dy}}{\mathrm{dx}} + 2 y\right) \mathrm{dy}$

The trick is to find a way to manipulate $\left(\frac{\mathrm{dy}}{\mathrm{dx}} + 2 y\right)$ into a derivative of some expression. (and this in the general case leads us to the IF formula ${e}^{\int P \left(x\right) \mathrm{dx}}$.

If we multiplied the solution $y \left(x\right)$ by some factor $\mu \left(x\right)$ and use the product rule for differentiation then we have:

$\frac{d}{\mathrm{dx}} \left(\mu \left(x\right) y \left(x\right)\right) = \mu \left(x\right) \frac{\mathrm{dy}}{\mathrm{dx}} + \frac{\mathrm{dm} u}{\mathrm{dx}} y \left(x\right)$

If we multiply both sides of our DE by $\mu \left(x\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} + 2 y = {2}^{x} \implies \mu \left(x\right) \frac{\mathrm{dy}}{\mathrm{dx}} + 2 \mu \left(x\right) y = 2 \mu \left(x\right) {e}^{x}$

By comparing our two expressions then we can see that we should choose $\mu \left(x\right)$ such that

$\frac{\mathrm{dm} u}{\mathrm{dx}} = 2 \mu$

Which we can solve as it is a First Order separable DE so we can find the $\mu$ that we seek as follows:

$\int \setminus \frac{1}{\mu} \setminus \mathrm{dm} u = \int \setminus 2 \setminus \mathrm{dx}$
$\therefore \ln \mu = 2 x$
$\therefore \mu = {e}^{2 x}$

So if we now multiply our DE by this factor $\mu \left(x\right)$ it will turn the LHS into the differential of a product, as follows:

${e}^{2 x} \frac{\mathrm{dy}}{\mathrm{dx}} + 2 {e}^{2 x} y = 2 {e}^{2 x} {e}^{x}$
$\therefore \frac{d}{\mathrm{dx}} \left\{{e}^{2 x} y\right\} = 2 {e}^{2 x} {e}^{x}$
$\therefore \frac{d}{\mathrm{dx}} \left\{{e}^{2 x} y\right\} = 2 {e}^{3 x}$

Which is now a separable DE which we can just integrate to get:

${e}^{2 x} y = \int \setminus 2 {e}^{3 x} \setminus \mathrm{dx}$
$\therefore {e}^{2 x} y = \frac{2}{3} {e}^{3 x} + A \text{ }$, where $A$ is an Arbitrary constant.
$\therefore y = \frac{2}{3} {e}^{3 x} {e}^{- 2 x} + A {e}^{- 2 x}$
$\therefore y = \frac{2}{3} {e}^{x} + A {e}^{- 2 x}$, as above.

Jan 2, 2017

If you are asked to SHOW that this is a solution, you do not need to solve the DE.

#### Explanation:

$y = \frac{2}{3} {e}^{x} + {e}^{- 2 x}$

Differentiate

$y ' = \frac{2}{3} {e}^{3} - 2 {e}^{- 2 x}$

Multiply $2 y$

$2 y = \frac{4}{3} {e}^{x} + 2 {e}^{- 2 x}$

$y ' + 2 y = \frac{6}{3} {e}^{x} + 0 = 2 {e}^{x}$

Note

I do not have a copy of Stewart here, but if this is the first exercise in the first section on differential equations, then the point may be to show that this is a solution, not to show how to arrive at this solution.

In a similar way, we might ask an algebra student to show that $\frac{2}{3}$ is a solution to $12 {x}^{4} - 11 {x}^{3} + 23 {x}^{2} - 41 x + 18$ without expecting the student to be able to find solutions..

Jan 2, 2017

See explanation.

#### Explanation:

Showing that something is a solution to an equation means plugging in the given expression (and any implied expressions necessary) to that equation, and making sure it holds true.

Here, we are given the differential equation $y ' + 2 y = 2 {e}^{x}$, and we are asked to verify that it works when $y = \frac{2}{3} {e}^{x} + {e}^{- 2 x}$.

Since the differential equation needs $y '$ as well as $y$, we first find $\frac{\mathrm{dy}}{\mathrm{dx}}$ for the given $y$:

$\textcolor{w h i t e}{\implies '} y = \frac{2}{3} {e}^{x} + {e}^{- 2 x}$

$\implies y ' = \frac{\mathrm{dy}}{\mathrm{dx}}$

$\textcolor{w h i t e}{\implies y '} = \frac{2}{3} {e}^{x} - 2 {e}^{- 2 x}$

Great—now we have expressions for both $y$ and $y '$, which we can plug into our differential equation. If this produces a true statement, then the given expression for $y$ is a valid solution.

$\text{ "color(blue)(y')" "+" "2color(red)(y)" } = 2 {e}^{x}$

$\iff \textcolor{b l u e}{\frac{2}{3} {e}^{x} - 2 {e}^{- 2 x}} + 2 \left[\textcolor{red}{\frac{2}{3} {e}^{x} + {e}^{- 2 x}}\right] \stackrel{\text{? }}{=} 2 {e}^{x}$

$\iff \frac{2}{3} {e}^{x} - \cancel{2 {e}^{- 2 x}} + \frac{4}{3} {e}^{x} + \cancel{2 {e}^{- 2 x}} \stackrel{\text{? }}{=} 2 {e}^{x}$

$\iff \text{ } 2 {e}^{x} = 2 {e}^{x}$

Since the differential equation holds true for the given $y$, it is a valid solution of the differential equation.