Solving Differential Equations with the Integrating Factor Method

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
9 replies · 2K views
Kawakaze
Messages
144
Reaction score
0

Homework Statement



Which of the methods of finding analytic solutions of differential equations
could you use to solve this equation? Give reasons for
your answer.

a
[tex]y+\frac{dy}{dx}tan(x) = 2 (\pi/4 \leq x < \pi/2)[/tex]

b
[tex]\sqrt{t^2+9}\frac{dy}{dx}=y^2 (0<y)[/tex]

The Attempt at a Solution



The integrating factor method for both, the initial value part I don't have a problem with,

For part a, I hit a wall when it came to integrating for the solution

I got g(x)=1, and h(x)=2/tan(x)

the integrating factor I got as p(x)=exp(x)

Putting it all back together I came unstuck here

[tex]exp(x)y=\int{exp(x)2cot(x)} dx[/tex]

Mainly because to get the same answer as wolphram alpha, I had to use the exp funion on the RHS to get rid of the LN that came from integrating the cotangent. Meaning then that I can't eliminate the exp from the LHS. So I am confused and haven't attempted part b yet, but I think it is also to be solved in the same way.
 
Physics news on Phys.org
Just re-read my post, not a lot of info for people to go on there :)

For part a I rearranged like so

[tex]\frac{dy}{dx} + y = \frac{2}{tan(x)}[/tex]

The integrating factor

[tex]p=exp(\int{g(x)}dx)[/tex]

g(x) = 1, h(x)=2/tan(x)

so the integrating factor is

[tex]p=exp(x)[/tex]

Subbing this in gave

[tex]\frac{d}{dy}(exp(x)y)=exp(x)\frac{2}{tan(x)}[/tex]

Integrating (here I know I am wrong, the problem is no doubt above somewhere)

[tex]exp(x)y=\int{exp(x)2cot(x)} dx[/tex]

The standard integral of cot involves a natural log so I lose the exp I was hoping to cancel out, please someone explain what I did wrong.

Thanks!
 
Thanks dick, I did it again and got a little further

p(x) = 1/tan(x)

Integrating gives p(x) = exp(ln(sin(x)))

Sub this into

[tex]\frac{d}{dx}(p(x)cot(x))=p(x)h(x)<br /> <br /> I eventually end up with sin(x)cot(x) = sin(x)2cot(x)<br /> <br /> ![/tex]
 
Kawakaze said:
Thanks dick, I did it again and got a little further

p(x) = 1/tan(x)

Integrating gives p(x) = exp(ln(sin(x)))

Sub this into

[tex]\frac{d}{dx}(p(x)cot(x))=p(x)h(x)<br /> <br /> I eventually end up with sin(x)cot(x) = sin(x)2cot(x)<br /> <br /> ![/tex]
[tex] <br /> The integrating factor p(x) is right. That's just sin(x), right? Then I can't tell what you did. What happened to y? You want to solve for y, yes?[/tex]
 
[tex]\frac{dy}{dx}+\frac{y}{tan(x)}=\frac{2}{tan(x)}[/tex]

so ill take g(x) and h(x)
[tex]g(x)=\frac{1}{tan(x)}[/tex]
and
[tex]h(x)=\frac{2}{tan(x)}[/tex]

Rewriting again i get

[tex]p(x)\frac{dy}{dx}+p(x)g(x)y=p(x)h(x)[/tex]

Pull out the differential

[tex]\frac{d}{dx}(p(x)y=p(x)h(x)[/tex]

Direct integration

[tex]p(x)y=\int{p(x)h(x)} dx[/tex]

[tex]sin(x)y=\int{sin(x)\frac{2}{tan(x)} dx[/tex]

[tex]sin(x)y=-cos(x)\frac{2cos(x)}{sin(x)}[/tex]

[tex]y = -cos^2(x)[/tex]

:)

I think that's correct, so how do I tackle the initial value problem?
 
Nope, you missed out a factor.

The ODE reads

[tex]\frac{dy}{dx} + \frac{1}{\tan x} y = \frac{2}{\tan x}[/tex]

The IF is [itex]\sin x[/itex] so that

[tex]\frac{d}{dx}\left( \sin x \, y(x) \right) = 2 \cos x[/tex]

Now integrate and be careful with the integration constant.
 
Which factor did I miss out? Please show the steps I can't follow you.

Integrating i get

[tex]sin(x)y=2sin(x) + C[/tex]

[tex]y=sin(x) + C[/tex]
 
Last edited:
Well, dividing this equation

[tex]\sin(x) \, y = 2 \sin(x) + C[/tex]

through [itex]\sin x[/itex] gives

[tex]y(x) = 2 + \frac{C}{\sin x}[/tex]

[tex]x \in \left[\frac{\pi}{4},\frac{\pi}{2}\right)[/tex]

which is a little different than what you came up with...
 
Lol, you could say a little, but thanks for that I understand now. :)