# Thread: Differential Equations: Solve dy/dx = e^(2x) - 3y and y=1 when x=0.

1. ## Differential Equations: Solve dy/dx = e^(2x) - 3y and y=1 when x=0.

Solve the following differential equation.
dy/dx = e^(2x) - 3y and y=1 when x=0.
Hint: Recognize this as a first-order linear differential equation and follow the general method for solving these and use the initial conditions to find the integration constant.

Solution:
y=
(e^(2x))/5 + 4/(5e^(3x))

Can someone please solve this step by step and explain how to get to the solution?

2. Originally Posted by MBhatti
Solve the following differential equation.
dy/dx = e^(2x) - 3y and y=1 when x=0.
Hint: Recognize this as a first-order linear differential equation and follow the general method for solving these and use the initial conditions to find the integration constant.

Solution:
y=
(e^(2x))/5 + 4/(5e^(3x))

Can someone please solve this step by step and explain how to get to the solution?
Can you solve the homogeneous part, i.e.:

y' + 3y = 0

3. Do you not have a teacher or at least a text book? There is a pretty standard formula for converting any linear first order differential equation to a single derivative using an "integrating factor". Given $\frac{dy}{dx}+ f(x)y= g(x)$, multiply the equation by the "integrating factor" $\mu(x)$: $\mu \frac{dy}{dx}+ \mu f y= \mu g$.

A single derivative would be of the form $\frac{d(\mu y)}{dx}$ which, by the product rule, is equal to $\mu \frac{dy}{dx}+ \frac{d\mu}{dx}y$. Comparing that to $\mu \frac{dy}{dx}+ \mu f y$, we see that we must have $\frac{d\mu}{dx}= \mu f$. Solve that differential equation (which is a separable equation) for $\mu$.

In fact, for any f(x) we can write that as $\frac{d\mu}{\mu}= f(x)dx$ and, integrating $ln(\mu)= \int f(x)dx+ C$. Taking the exponential, $\mu(x)= C'e^{\int f(x)dx}$. Since we only need an integrating factor, we can take C' to be 1.

With this linear first order differential equation, $\frac{dy}{dx}+ 3y= e^{2x}$, f(x) is the constant 3 so the integrating factor is $\mu(x)= e^{\int 3dx}= e^{3x}$.

Multiplying on both sides of the equation by that $e^{3x}\frac{dy}{dx}+ 3e^{3x}y= \frac{d(e^{3x}y)}{dx}= e^{5x}$. Integrate $d(e^{3x}y)= e^{5x}dx$.

Subhotosh Kahn is suggesting a different method that applies to linear equations of any order, 1 or higher. A linear equation of order "n" would be an equation where the function, y, and its derivatives up to nth derivative are multiplied by functions of x and added. It is "homogeneous" if that is equal to 0, "non-homogeneous" if not. The idea is that we can find the general solution to a non-homogeneous equation by finding the general solution to the corresponding homogeneous equation (drop the function of x that is not multiplied by y or a derivative of y) then add to that any one solution to the entire equation.

Here the differential equation is $\frac{dy}{dx}+ 3y= e^{2x}$ is "non-homogeneous" because of the "$e^{2x}$". Dropping that gives the "homogeneous" equation $\frac{dy}{dx}+ 3y= 0$. That is the same as $\frac{dy}{dx}= -3y$. We can separate that as $\frac{dy}{y}= -3dx$ and integrate. To find a single solution to the entire equation, seeing that the "non-homogeneous part" is $e^{2x}$, I would recommend setting $y= Ae^{2x}$, for A a constant, putting it into the equation, and seeing what A must be in order to satisfy the equation.

4. Originally Posted by MBhatti
Can someone please solve this step by step and explain how to get to the solution?