Solve DE by finding an integrating factor (please check my work)

  • Thread starter darryw
  • Start date
  • #1
127
0

Homework Statement



Solve (x + 2) sin y dx + x cos y dy = 0 by finding an integrating factor
..............M....................N.....................

M_y (x+2)siny = (x+2)cosy

N_x xcosy = cos y

M_y not equal to N_x, therefore equation is not exact..
so far so good? thanks


Homework Equations





The Attempt at a Solution

 

Answers and Replies

  • #2
34,534
6,230

Homework Statement



Solve (x + 2) sin y dx + x cos y dy = 0 by finding an integrating factor
..............M....................N.....................

M_y (x+2)siny = (x+2)cosy

N_x xcosy = cos y

M_y not equal to N_x, therefore equation is not exact..
so far so good? thanks
So far, so good.
 
  • #3
127
0
thanks.. actually i am already stuck. I do know i need an integrating factor but i dont know steps to get one. I could start by multiplying whole equation by x, but isnt this just random guessing? I also know that my goal is to make DE exact by finding correct integ factor, and then i can proceed as in other probs. so, i am at roadblock.
 
  • #4
127
0
You can derive it by integrating something. Let's have a go.
Say
y'+fy=g
where f, g are functions of x. It's usually simple to get your DE into this form.

Now we want to multiply by something to make the LHS a 'product' derivative ie
we want to find a p such that
py'+pfy=pg
=d/dx(Py) for some P.

so suppose py'+pfy=d/dx(Py)=Py'+P'y

So we want P=p and pf=P'
ie
Pf=P'
f=(1/P)P'
=> int f dx = logP +const

The const is arbitrary (why?) and doesn't matter.

And so we can find P (exponentiate) that ends up changing the equation to
d/dx(Py)=Pg.

Summary:
Suppose the LHS can be written as d/dx(Py)
expand this
equate 'bits' and solve for P in terms of coefficients
 
  • #5
127
0
I am familiar with getting integrating factor by putting equation in the form y' + p(t)y = g(t)
and so integrating factor is mu(x) = e^integ p(t)dt.

but i am not familiar with using an integrating factor to make an equation exact? isnt my goal to multiply the equation by some factor to make it exact right?
 
  • #6
127
0
Once you've found your integrating factor, you can just write the line
d/dt(Py)=Pg

The whole point of an integrating factor is to make the LHS exact.
 
  • #7
127
0
ok thank you, but i am still confused as to how to actually get the integrating factor? (to make an equation exact)??
 
  • #8
rock.freak667
Homework Helper
6,230
31
ok thank you, but i am still confused as to how to actually get the integrating factor? (to make an equation exact)??
Here is something helpful to know

Given M(x,y)dx+N(x,y)dy =0 is not exact, then an integrating factor can be found as follows:

1) if (∂M/∂y - ∂N/∂x)/N = f(x) then e∫f(x) dx is an integrating factor

2) If (∂M/∂y - ∂N/∂x)/M = -g(y) then e∫g(y) dy is an integrating factor.
 
Last edited:
  • #9
127
0
wow that is useful.

so i have
[(x+2) cos y - cos y] / xcos y = ?

simplify... (cos y's cancel)

(x+2)/x - (1/x)

= x+1/x
= 1 + 1/x

so integrating factor, mu(x) is e^integ (1+1/x)

e^x+ln|x|

simplifies to: xe^x

so my integrating factor is mu(x) = xe^x

correct so far??

thanks
 
  • #10
rock.freak667
Homework Helper
6,230
31
Yes that should work.
 
  • #11
136
0
ok thank you, but i am still confused as to how to actually get the integrating factor? (to make an equation exact)??
In your problem, we have:

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

[tex]M_y = (x+2)\cos y[/tex]

[tex]N = x\cos y[/tex]

[tex]N_x = \cos y[/tex]

Clearly, we have [tex]M_y \neq N_x[/tex] and we need to multiply the equation by an integrating factor to proceed further.

The theory behind integrating factors is as follows: take your DE and multiply by an integrating factor p:

[tex]pMdx + pNdy = 0[/tex]

We then proceed identically as before, that is to say, we look for a p such that:

[tex]\frac{\partial}{\partial y}\left(pM\right) = \frac{\partial}{\partial x}\left(pN\right)[/tex]

[tex]p_y M + p M_y = p_x N + p N_x[/tex]

The last equation is a result of the Chain Rule. Suppose that p is a function of x alone (not y), then [tex]p_y = 0[/tex], and the last equation reduces to:

[tex]p\left(M_y - N_x\right) = p_x N[/tex]

[tex]\frac{M_y - N_x}{N}dx = \frac{dp}{p}[/tex]

Let [tex]F(x) = \left(M_y - N_x\right)/N[/tex], and the above equation becomes:

[tex]F(x)dx = \frac{dp}{p}[/tex]

[tex]\ln(p) = \int F(x)dx [/tex]

[tex]p(x) = e ^{\int F(x)dx}[/tex]

This has already been posted (in essence), but I thought it's useful to understand where the equations come from, and how they are derived, rather than just memorizing arcane equations by "rote", so to speak..

The integrating factor you derived should be correct for your problem.
 
  • #12
127
0
multiply everything by integ factor, xe^x...

xe^x[ (x + 2) sin y dx + x cos y dy ] = 0
..........M..........................N

M_y = xe^x (x + 2) cos y

N_y = xe^x (x + 2) cos y

since Ive already determined the integ factor that makes equation exact, N_y must be the same as M_y, so it isnt necessary to partial differentiate N_x
Is that valid reasoning? If so i will proceed.. thanks
 
  • #13
127
0
I am asking if that is valid, because if i come across something alot more difficult (time consuming) to differentiate, i can just note that M_y must = N_x and proceed without actually differentiating N_x,
right? thanks
 
  • #14
136
0
multiply everything by integ factor, xe^x...

xe^x[ (x + 2) sin y dx + x cos y dy ] = 0
..........M..........................N

M_y = xe^x (x + 2) cos y

N_y = xe^x (x + 2) cos y

since Ive already determined the integ factor that makes equation exact, N_y must be the same as M_y, so it isnt necessary to partial differentiate N_x
Is that valid reasoning? If so i will proceed.. thanks
I think there might still be a slight error in your reasoning.

You do still need to calculate N_x, in order to show that the new equation is exact.

Your "new" values of M and N, and their derivatives, are as follows:

[tex]M = xe^x(x+2)\sin y[/tex]

[tex]M_y = xe^x(x+2) \cos y[/tex]

[tex]N = x^2e^x \cos y[/tex]

[tex]N_x =xe^x(x+2) \cos y [/tex]

Hence, M_y = N_x as desired, and the equation is exact (i.e., your integrating factor was correct).

However, you do still need to calculate N_x to prove this.
 
  • #15
127
0
i now need to integrate wrt x, xe^x (x + 2) cos y

first i simplify the x's into 2 terms:

x^2e^x + 2xe^x

integrate wrt x using integ by parts on both terms

e^x(x^2 - 2x + 2) + 2xe^x -2e^x

then add the y term

[e^x(x^2 - 2x + 2) + 2xe^x -2e^x ]cos y + h(y)

then take partial derivative of above expression wrt y, and equate to N

[e^x(x^2 - 2x + 2) + 2xe^x -2e^x ](-sin y) + h'(y) = x cos y dy

cancel

-x^2e^x + h'(y) = xcosy

solve for h(y)..

h'(y) = x cos y + -x^2e^x

is this correct so far?
 
  • #16
127
0
thanks psholtx. isnt it already proved by saying that if (∂M/∂y - ∂N/∂x)/N = f(x) then e∫f(x) dx is an integrating factor. If that is true, then wouldnt integrating N_x to show exactness be redundant?
 
  • #17
136
0
It might be simpler to integrate N w.r.t. y... ;-)
 
  • #18
136
0
thanks psholtx. isnt it already proved by saying that if (∂M/∂y - ∂N/∂x)/N = f(x) then e∫f(x) dx is an integrating factor. If that is true, then wouldnt integrating N_x to show exactness be redundant?
It is "proved" by that, but I find it's always best to "check" the answer by taking the derivatives one more time, just to be certain..
 

Related Threads on Solve DE by finding an integrating factor (please check my work)

Replies
9
Views
1K
Replies
9
Views
1K
Replies
1
Views
1K
Replies
29
Views
2K
Replies
3
Views
2K
Replies
11
Views
9K
  • Last Post
Replies
1
Views
1K
Replies
12
Views
1K
Replies
7
Views
1K
  • Last Post
Replies
2
Views
858
Top