Differential equation solving

  • Thread starter Kawakaze
  • Start date
  • #1
144
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 dont 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 cant eliminate the exp from the LHS. So im confused and havent attempted part b yet, but I think it is also to be solved in the same way.
 

Answers and Replies

  • #2
144
0
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!
 
  • #3
Dick
Science Advisor
Homework Helper
26,263
619
The problem is that y+y'*tan(x)=2 doesn't rearrange to y+y'=2/tan(x). If you divide one side by tan(x) you have to divide every term by tan(x). The y just sat there.
 
  • #4
144
0
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)

I eventually end up with sin(x)cot(x) = sin(x)2cot(x)

!!!!
 
  • #5
Dick
Science Advisor
Homework Helper
26,263
619
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)

I eventually end up with sin(x)cot(x) = sin(x)2cot(x)

!!!!

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?
 
  • #6
144
0
[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 thats correct, so how do I tackle the initial value problem?
 
  • #7
dextercioby
Science Advisor
Homework Helper
Insights Author
13,147
708
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.
 
  • #8
144
0
Which factor did I miss out? Please show the steps I cant follow you.

Integrating i get

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

[tex]y=sin(x) + C[/tex]
 
Last edited:
  • #9
dextercioby
Science Advisor
Homework Helper
Insights Author
13,147
708
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...
 
  • #10
144
0
Lol, you could say a little, but thanks for that I understand now. :)
 

Related Threads on Differential equation solving

  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
2
Views
516
  • Last Post
Replies
1
Views
920
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
3
Views
807
  • Last Post
Replies
1
Views
616
  • Last Post
Replies
4
Views
824
  • Last Post
Replies
1
Views
877
  • Last Post
Replies
9
Views
740
  • Last Post
Replies
7
Views
1K
Top