# Solving a linear first order differential equation

#### LLand314

##### Member
4y'=e^(x/4) + y

First I need to divide through by 4 correct?
To obtain
y'=(e^(x/4))/4 + (y/4)

But then when I try to find integrating factor I just come up with e^(x/4) which I think is incorrect

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Re: Solving a differential equation

First put the equation in the standard form.

#### MarkFL

Staff member
I have edited the title to make it a bit more descriptive of the problem. A topic's title should give at least one level of information more than is implied by the forum in which it is posted. I would first arrange the ODE in standard linear form by subtracting through by $y$ and then dividing through by 4:

$$\displaystyle \frac{dy}{dx}-\frac{1}{4}y=\frac{1}{4}e^{\frac{x}{4}}$$

Now, what is your integrating factor $\mu(x)$?

Last edited:

#### LLand314

##### Member
I have edited the title to make it a bit more descriptive of the problem. A topic's title should give at least one level of information more than is implied by the forum in which it is posted. I would first arrane the ODE in standard linear form by subtracting through by $y$ and then dividing through by 4:

$$\displaystyle \frac{dy}{dx}-\frac{1}{4}y=\frac{1}{4}e^{\frac{x}{4}}$$

Now, what is your integrating factor $\mu(x)$?
I still keep getting e^(x/4)

Do I not put it as e^(1/4)(integral e^(x/4))

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Don't forget the sign !.

#### MarkFL

Staff member
Don't forget the sign !.
Yes, in this problem, we have $$\displaystyle P(x)=-\frac{1}{4}$$.

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
$$\displaystyle 4y' - y = e^{\frac{x}{4}}$$

Divide by $$\displaystyle 4 e^{\frac{x}{4}}$$

$$\displaystyle y'e^{-\frac{x}{4}} - \frac{1}{4}\,y\,e^{-\frac{x}{4}} = \frac{1}{4}$$

Now we realize that $$\displaystyle \frac{d}{dx} \left( y e^{-\frac{x}{4}}\right) = y'e^{-\frac{x}{4}} -\frac{1}{4} y\,e^{-\frac{x}{4}}$$

Hence $$\displaystyle \frac{d}{dx} \left( y e^{-\frac{x}{4}}\right)=\frac{1}{4}$$

Integrating with respect to x :

$$\displaystyle y\, e^{-\frac{x}{4}}=\frac{1}{4}x\,+\,C$$

$$\displaystyle y\,=\frac{1}{4}\,x\, e^{\frac{x}{4}}+\,C e^{\frac{x}{4}}$$

#### LLand314

##### Member
Yes, in this problem, we have $$\displaystyle P(x)=-\frac{1}{4}$$.
So no matter what we use the information on the left to compute the integrating factor? Even in this case with no x just (-1/4)

In that case would it be (-1/4)x?

e^(-1/4)integral dx

Oh the integrating factor is e^(-x/4)?

MHB Math Helper

#### HallsofIvy

##### Well-known member
MHB Math Helper
You want something of the form
$$\frac{dY}{dx}= f(x)$$

Initially we have
$$4\frac{dy}{dx}- y= e^{x/4}$$
where I have put all the "y" dependence on the left.

Yes, you can if you like divide by 4- that is not necessary but makes the calculations simpler
$$\frac{dy}{dx}- y/4= e^{x/4}/4$$

We want to multiply by some u(x) that will make the left side a single derivative: that the left side becomes $$\frac{d(uy)}{dx}$$.

By the product rule, $$\frac{d(uy)}{dx}= u\frac{dy}{dx}+ \frac{du}{dx}y$$ and, we can see that, by multiplying by u we would have $$u\frac{dy}{dx}- \frac{uy}{4}$$. Comparing those, we see we must have $$\frac{du}{dx}= -\frac{u}{4}$$, a simple, separable equation: $$\frac{du}{u}= -\frac{dx}{4}$$ and integerating $$ln(u)= -\frac{x}{4}+ C$$ or $$u= Ce^{-x/4}$$.

That is, an "integrating factor" is $$e^{-x/4}$$:
$$e^{-x/4}\frac{dy}{dx}- \frac{e^{-x/4}y}{4}= \frac{d(e^{-x/4}y}{dx}$$

so multiplying both sides of the original equation by $$e^{-x/4}$$ we have
$$\frac{d(e^{-x/4}y}{dx}= \frac{1}{4}$$
and we can integrate both sides to get
$$e^{-x/4}y= \frac{x}{4}+ C$$
so that $$y= \frac{x}{4}e^{x/4}+ Ce^{x/4}$$.