# Homework Help: Solving differential equations

1. Aug 9, 2011

### Shannabel

1. The problem statement, all variables and given/known data
If (x^2+1)dy/dx = xy for all y>0, and y(2) = 5, then y(3) = ?

2. Relevant equations

3. The attempt at a solution
dy/y = xdx/(x^2+1) -- use substitution with u=x^2
lny = 2(u+1)/du
lny = 2ln(x^2+1)+c
y = e^(2ln(x^2+1)+c)
5 = e^(2ln(5)+c)
5 = e^(ln25+c)
5 = 25+c
c = 20

y(3) = e^(2ln10+20)
= e^ln100+20
= 100+20
= 120

.... the answer should be 5sqrt(2), so I am very off, but I can't find why. help?
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Aug 9, 2011

### CompuChip

If $u = x^2$, then $du = 2 x dx$.
$$\ln y = 2(u+1)/du$$
you get
$$d(\ln y) = du/[2(u + 1)]$$
and, integrating,
$$\ln y = \ln[ 2(u + 1) ] + c$$.

Last edited: Aug 9, 2011
3. Aug 9, 2011

### Ray Vickson

We have exp[(1/2)*ln(x^2+ 1) + c] = k*sqrt(x^2+1), where k =exp(c). Note: x*dx/(1+x^2) = (1/2)du/(u+1).

RGV

4. Aug 9, 2011

### Shannabel

if y = e^(1/2)ln(x^2+1)+c
5 = e^lnsqrt(5)+c
then i end up with c = 5-sqrt(5), and then
y(3) = e^1/2ln10+5-sqrt(5)
= sqrt(10)+5-sqrt(5)
.... confused?

5. Aug 9, 2011

### I like Serena

@CompuChip: you forgot a factor (1/2) in your last line...

6. Aug 9, 2011

### I like Serena

You forgot a couple of brackets...

You should use:
$$5 = e^{[\ln \sqrt 5+c]}$$
You'll see that you'll get a different value for c.

7. Aug 9, 2011

### Shannabel

do you mean then i should get
5 = sqrt5 +e^c?
how do i simplify that?

8. Aug 9, 2011

### I like Serena

No, that is not right.
Let's take it one step back.
Let me put the braces slightly diffently for clarity.
$$5 = e^{(\ln \sqrt 5)+c}$$
Here you need to simplify by applying the rules for powers.
That is $e^{a+b}=e^a \cdot e^b$.

9. Aug 9, 2011

### Shannabel

so then don't i get
5 = e^ln(sqrt5) + e^c?
and e^ln(sqrt5) = sqrt5?

10. Aug 9, 2011

### I like Serena

Yes!

No.

11. Aug 9, 2011

### Shannabel

oh, durrr
5 = sqrt5*e^c?

12. Aug 9, 2011

### I like Serena

Yes!

13. Aug 9, 2011

### Shannabel

YAY!
so from there, i get
5/sqrt5 = e^c?
so c = ln(5/sqrt5)?

14. Aug 9, 2011

### I like Serena

Yes, so...

15. Aug 9, 2011

### Shannabel

hahaha
f(3) = e^lnsqrt10+ln5/sqrt5
= sqrt10+5/sqrt5

.... annnd i'm off track again lol

16. Aug 9, 2011

### I like Serena

Err... can you do the "oh, durrr" thing again? :shy:

17. Aug 9, 2011

### Shannabel

well that was dumb.
e^lnsqrt10+ln5/sqrt5 = e^lnsqrt10*e^ln5/sqrt5
= sqrt10*5/sqrt5

I GOT IT YAYYYY :):)
thanksyou :)

18. Aug 9, 2011

### I like Serena

Congratulations!

One thing though...

You started with:
$$y = e^{(1/2)\ln(x^2+1)+c}$$
But that is not the equation you had in your first post...

How did you get it?

19. Aug 9, 2011

### Shannabel

:D

i changed the first equation to
dy/y = xdx/(x^2+1), then used the substitution u=x^2 on the right side :)

20. Aug 9, 2011

### I like Serena

Yeah, I got that...
So did you follow CompuChip's correction and then my correction on CompuChip's correction?