# Homework Help: Analytic solution of this ordinary differentiale equation

1. Jan 8, 2009

### bsodmike

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

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

This question was obtained from a text book, where it is used as an example for the application of Heun's method (of ODE integration). They state that it has a 'simple' analytic solution of,

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

2. Relevant equations
It is of the form.
https://www.physicsforums.com/latex_images/20/2024026-2.png [Broken]

3. The attempt at a solution
Attempted to use an integrating factor, https://www.physicsforums.com/latex_images/20/2024278-0.png [Broken]
https://www.physicsforums.com/latex_images/20/2024026-6.png [Broken]

Obtaining,
https://www.physicsforums.com/latex_images/20/2024278-1.png [Broken]

Hence,
https://www.physicsforums.com/latex_images/20/2024278-2.png [Broken]

Any ideas ?!?

Last edited by a moderator: May 3, 2017
2. Jan 8, 2009

### bsodmike

It is also given, y(0) = 2. i.e. at x=0, y=2.

3. Jan 8, 2009

### HallsofIvy

Yes, that is correct.

Then since
$$y(x)= \frac{4}{1.3}e^{.8t}+ Ce^{-.5t}$$
$$y(0)= \frac{4}{1.3}+ C= 2$$
so
$$C= 2- \frac{4}{1.3}[/itex] That is, [tex]y(x)= \frac{4}{1.3}e^{.8t}+ \left(2- \frac{4}{1.3}\right)e^{-.5t}$$

$$y(x)= \frac{4}{1.3}\left(e^{.8t}+ e^{-.5t}\right)+ 2e^{-.5t}$$

exactly as given.

Last edited by a moderator: May 3, 2017
4. Jan 8, 2009

### Thaakisfox

This differential equation is quite simple, so its better if we see whats behind this integration factor. Its basically Lagranges method, this "fits" to your hand a bit more:

So we have:

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

As we know the general solution of the DE can be obtained by adding the $$Y$$ general solution of the homogenous part and a $$y_0$$ particular solution of the entire DE.

first of all lets solve the homogenous part, that is:

$$Y'+p(x)Y=0 \Longrightarrow \frac{dY}{Y}=-p(x)dx \Longrightarrow Y=C\exp\left(-\int^x p(x')dx'\right)$$

Now we only have to find a particular solution of the entire DE. Here is the trick, lets consider the constant in the homogenous part to be some function of the free variable, that is: $$C=C(x)$$
so we have: $$y_0=C(x)\exp\left(-\int^x p(x')dx'\right)$$

Now plug this back into the DE to get the C(x) function, and then you have the particular and add this to the homogenous part, and then you have the general solution:
$$y=y_0+Y$$

So basicaly the integration factor is a solution of the homogenous part of the DE.

5. Jan 8, 2009

### bsodmike

Thanks HallsOfIvy!!

I was trying to evaluate the following,

$$y(x)= \frac{4}{1.3}e^{.8t}+ Ce^{-.5t}$$

at y(0) and x=0 (in your example, t=0) as all the exp() expressions tend to 1; and tried to substitute back C=-14/13

$$y(x)= \frac{4}{1.3}e^{.8t} - \dfrac{14}{13}e^{-.5t}$$

d'oh!!!! Cheers :) :)

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

### bsodmike

Thanks Thaakisfox!