Homework Help: Ordinary DE using integrating factor?

1. Apr 2, 2010

cheddacheeze

1. The problem statement, all variables and given/known data
solve the following initial condition problem
$$x (d/dx) y(x) + 4xy(x) = -8-y(x)$$
$$y(4)=-6$$

2. Relevant equations

3. The attempt at a solution
first i rearranged

$$xy'+y+4xy=-8$$
$$xy'+y(1+4x)=-8$$
$$y'+y(1/x+4)=-8/x$$

integrating factor:$$e^\int(1/x+4)$$
$$e^(lnx+4x)$$
$$x+e^4x$$

multiplying integrating factor:
$$d/dx(x+e^4x) y'+(1/x+4)(x+e^4x)y=-8/x(x+e^4x)$$
$$d/dx(x+e^4x])y=-8/x(x+e^4x)$$
$$\int d/dx(x+e^4x])y=\int-8/x(x+e^4x)$$
$$(x+e^4x)y=\int(-8-8e^4x/x)$$

just wondering if im going alright so far... and if i am how do you integrate
$$\int (8e^4x/x)$$

Last edited: Apr 2, 2010
2. Apr 2, 2010

gabbagabbahey

Careful, $e^{a+b}=e^a e^b \neq e^a+e^b$

3. Apr 2, 2010

cheddacheeze

$$x+e^(4x)$$ its
$$xe^(4x)$$?

4. Apr 2, 2010

gabbagabbahey

Yup.

On a side note, to get exponents with more than one character to display properly in $\LaTeX$, simply enclose them in curly brackets. For example, $xe^{4x}$ is generated using xe^{4x}.

5. Apr 2, 2010

cheddacheeze

haha cheers for both advices, this should make things easier

6. Apr 2, 2010

cheddacheeze

ok after using:
$$xe^{4x}$$ as an integrating factor
i got
$$xe^{4x} y(x)=\int-8e^{4x}$$
$$xe^{4x} y(x)= -2e^{4x} +C$$
$$y(x)=-2e^{4x}/xe^{4x} + C$$
$$y(x)=-2/x +C$$

using initial conditions:
$$y(4) = -2/4+C = -6$$
$$c=-11/2$$
$$y(x)=-2/x-11/2$$

and it doesnt seem to be the right answer

7. Apr 2, 2010

gabbagabbahey

Shouldn't you also divide $C$ by $xe^{4x}$ here?

8. Apr 2, 2010

cheddacheeze

hmmmm tried doing that before but still didnt get the right answer

9. Apr 2, 2010

cheddacheeze

using:

$$y(x) = -2/x + C/(xe^{4x})$$

and by substituing initial conditions i got:

$$y(4)=-2/4+C/(4e^{16})=-6$$
$$-11/2=C/(4e^{16})$$
$$C=(-22e^16)/2$$

is this right or did i miss something...

Last edited: Apr 2, 2010
10. Apr 2, 2010

gabbagabbahey

11*4=44, not 22

11. Apr 2, 2010

cheddacheeze

sorry there wasnt supposed to be
$$C=(-22e^16)/2$$
divide 2 there, i just simplified and got
$$C=(-22e^16)$$

12. Apr 2, 2010

gabbagabbahey

Okay, that looks correct then

13. Apr 3, 2010

cheddacheeze

ok i must have done algebra somewhere incorrect then, cant get the right answer out

14. Apr 3, 2010

gabbagabbahey

15. Apr 3, 2010

cheddacheeze

my answer is $$y(x) = -2/x -22e^{-16}$$
as for the solution i dont know since its a computer entered assignment

16. Apr 3, 2010

gabbagabbahey

What happened to the $xe^{4x}$ in $y(x) = -2/x + C/(xe^{4x})$?

17. Apr 3, 2010

cheddacheeze

i substituted the initial conditions into the equation and found what the value of C was and entered my answer as that, maybe i'll try keeping the constant and see if thats right

18. Apr 3, 2010

cheddacheeze

didnt think ordinary differential equations could be so annoying
haha...

19. Apr 3, 2010

gabbagabbahey

You had $y(x) = -2/x + C/(xe^{4x})$ as your general solution, substituting your initial condition gave you $C=-22e^{16}$, so your particular solution should be

$$y(x)=-\frac{2}{x}-\frac{22e^{16}}{xe^{4x}}$$

Not what you had in post #15. You need to pay more attention to basic algebra steps like substitution.

20. Apr 3, 2010

cheddacheeze

ohhhh... C was over $$xe^{4x}$$
keep making stupid mistakes... looks like i need to look at things with more care
thanks a lot :)

Last edited: Apr 3, 2010