Solving Differential Equations with the Integrating Factor Method

In summary, the integrating factor method for solving the initial value problem for part a is to use the integrating factor p(x) = exp(x) to get rid of the exp from the LHS and then substitute it back into the equation. However, for part b, the integrating factor p(x) is the same as the original equation which results in the same answer as Wolfram Alpha. Both methods have the same problem with y+y'*tan(x) not rearranging to y+y'=2/tan(x). Part b can be solved in the same way as part a, with rearranging and integrating.
  • #1
Kawakaze
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 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
  • #2
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
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
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
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)

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
[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?
 
  • #7
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
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:
  • #9
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
Lol, you could say a little, but thanks for that I understand now. :)
 

1. What is a differential equation?

A differential equation is a mathematical equation that relates a function with its derivatives. It describes the relationship between a quantity and its rate of change.

2. Why do we need to solve differential equations?

Differential equations are used to model real-life phenomena in various fields such as physics, engineering, economics, and biology. By solving these equations, we can understand and predict the behavior of systems in these fields.

3. How do we solve differential equations?

There are various methods for solving differential equations, depending on the type of equation and its complexity. Some common methods include separation of variables, substitution, and the use of integrating factors.

4. What are the applications of solving differential equations?

Differential equations are used in many real-life applications, such as predicting population growth, modeling the spread of diseases, and analyzing the behavior of electrical circuits. They are also used in designing and optimizing systems in engineering and economics.

5. Is there a universal method for solving all differential equations?

No, there is no universal method for solving all types of differential equations. Each equation may require a different approach or combination of methods to find a solution. It is important to have a good understanding of the properties and characteristics of different types of differential equations to choose the most appropriate method for solving them.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
896
  • Calculus and Beyond Homework Help
Replies
7
Views
490
  • Calculus and Beyond Homework Help
Replies
8
Views
753
  • Calculus and Beyond Homework Help
Replies
10
Views
465
  • Calculus and Beyond Homework Help
Replies
7
Views
674
  • Calculus and Beyond Homework Help
Replies
7
Views
692
  • Calculus and Beyond Homework Help
Replies
3
Views
901
  • Calculus and Beyond Homework Help
Replies
4
Views
931
  • Calculus and Beyond Homework Help
Replies
21
Views
826
  • Calculus and Beyond Homework Help
Replies
1
Views
819
Back
Top