# Another First-Order ODE Question

1. Jan 6, 2009

### bsodmike

1. The problem statement, all variables and given/known data

Going through a book on Numerical Methods, it states,

$$y' = 4e^{0.8x}-0.5y$$

has the analytical solution,

$$y= \dfrac{4}{1.3}(e^{0.8x}-e^{-0.5x})+2e^{-0.5x}$$

2. Relevant equations

This is of the form,

$$y'+p(x)y=q(x)$$

Should I use an Integrating Factor to solve the Linear ODE?, i.e. use an integrating factor $$\mu(x)=e^{\int{p(x)dx}}$$

$$\mu(x)\left[y'+p(x)y\right]=\mu(x)q(x)$$

$$\left(\mu(x)y\right)'=\mu(x)q(x)$$

$$\mu(x)y=\int{\mu(x)q(x)dx+C}$$

...and divide through by $$\mu(x)$$ ???

3. The attempt at a solution

$$\mu(x)=e^{\int{p(x)dx}}=e^{0.5x}$$

thus,
$$e^{0.5x}y=4\int{e^{0.8x}e^{0.5x}dx+C}$$

and it is given: y(0) = 2

Any pointers? Dick, your help would be much appreciated once again!

Thanks and happy new year to all as well,

Cheers
Mike

Last edited: Jan 6, 2009
2. Jan 6, 2009

### Integral

Staff Emeritus
When computing your integrating factor what did you use as your p(t)? Your integrating factor is not correct.

3. Jan 6, 2009

### bsodmike

Note: with p(t)dt, consider it as p(x)dx. I used some old latex definition I had already typed for the 'method'. i.e., rather than dy/dt, this is dy,dx. dy/dt = f(t,y) -> dy/dx = f(x,y).

*Definition updated in OP, w.r.t to (x).

Last edited: Jan 6, 2009
4. Jan 6, 2009

### bsodmike

I used,

$$\mu(x) = e^{\int{p(x)dx}}=e^{\int{\dfrac{1}{2}dx}} = e^{0.5x}$$

Well, isn't this,

$$y'+0.5y=4e^{0.8x}=y'+p(x)y=q(x)$$

hence, $$p(x)=0.5$$ and $$q(x)=4e^{0.8x}$$ ???

Last edited: Jan 6, 2009
5. Jan 6, 2009

### Integral

Staff Emeritus
$$e^{\int{\dfrac{1}{2}dx}}$$ Try doing this integral again. Where did the ln 2 come from?

6. Jan 6, 2009

### bsodmike

Oooops!!! thanks for spotting that blatant error. $$IF=e^{\int{p(x)dx}}=e^{0.5x}$$.

7. Jan 6, 2009

### bsodmike

This is what I am getting now,

Since,
$$\mu(x)=e^{\int{0.5\,dx}}=e^{0.5x}$$

$$\begin{split} e^{0.5x}y&=4\int{e^{1.3x}}\,dx+C\\ &=4\left(\dfrac{e^{1.3x}}{1.3}\right)+C\\ &=\dfrac{4}{1.3}e^{1.3x}+C \label{eq:} \end{split}$$

Hence,
$$\begin{split} y=\dfrac{4}{1.3}e^{0.8x}+Ce^{-0.5x} \label{eq:} \end{split}$$

Where am I going wrong again?!?

Last edited: Jan 7, 2009
8. Jan 7, 2009

### bsodmike

*bump*

When I left the problem earlier as $$e^{0.5x}y=4\int{e^{0.8x}e^{0.5x}\,dx}+C$$, I thought I'd need to use integration by parts. But once I got it in the simpler form above (adding the powers) it just seems 'too simple' and the solution is missing a term.

*confused*...hmm..