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

In summary: Keep in mind that your goal is to make the LHS of the equation as exact as possible, so you may want to experiment with different integrating factors to see which one works best for you.
  • #1
darryw
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

 
Physics news on Phys.org
  • #2
darryw said:

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
thanks.. actually i am already stuck. I do know i need an integrating factor but i don't know steps to get one. I could start by multiplying whole equation by x, but isn't 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
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
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? isn't my goal to multiply the equation by some factor to make it exact right?
 
  • #6
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
ok thank you, but i am still confused as to how to actually get the integrating factor? (to make an equation exact)??
 
  • #8
darryw said:
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
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
Yes that should work.
 
  • #11
darryw said:
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
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 I've already determined the integ factor that makes equation exact, N_y must be the same as M_y, so it isn't necessary to partial differentiate N_x
Is that valid reasoning? If so i will proceed.. thanks
 
  • #13
I am asking if that is valid, because if i come across something a lot 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
darryw said:
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 I've already determined the integ factor that makes equation exact, N_y must be the same as M_y, so it isn't 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
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
thanks psholtx. isn't 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 wouldn't integrating N_x to show exactness be redundant?
 
  • #17
It might be simpler to integrate N w.r.t. y... ;-)
 
  • #18
darryw said:
thanks psholtx. isn't 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 wouldn't 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..
 

1. How do I determine the integrating factor for a differential equation?

The integrating factor for a differential equation can be determined by multiplying both sides of the equation by an appropriate function. This function can be found by solving the differential equation using the method of variation of parameters or through inspection of the equation's coefficients.

2. Can I use any function as the integrating factor for a differential equation?

No, the function used as the integrating factor must satisfy certain conditions. It must be continuous, non-zero, and have a non-zero derivative. Additionally, it must be able to cancel out the coefficient of the highest derivative term in the differential equation.

3. How do I check if my integrating factor is correct?

To check if your integrating factor is correct, substitute it into the original differential equation and see if it reduces the equation to one that can be easily solved. Also, make sure that the integrating factor satisfies the conditions mentioned in the previous answer.

4. Is finding the integrating factor the only method for solving a differential equation?

No, there are other methods for solving differential equations such as separation of variables, substitution, and the method of undetermined coefficients. However, finding the integrating factor can be useful for solving certain types of differential equations, particularly those involving linear first-order equations.

5. Are there any tips for finding the integrating factor?

One tip for finding the integrating factor is to look for patterns or similarities in the coefficients of the differential equation. These patterns can help identify a suitable function to use as the integrating factor. Additionally, practicing solving differential equations using different methods can improve one's ability to identify the appropriate integrating factor.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
773
  • Calculus and Beyond Homework Help
Replies
24
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
431
  • Calculus and Beyond Homework Help
Replies
15
Views
735
  • Calculus and Beyond Homework Help
Replies
5
Views
596
  • Calculus and Beyond Homework Help
Replies
2
Views
416
  • Calculus and Beyond Homework Help
Replies
10
Views
203
  • Calculus and Beyond Homework Help
Replies
7
Views
606
  • Calculus and Beyond Homework Help
Replies
4
Views
866
  • Calculus and Beyond Homework Help
Replies
4
Views
941
Back
Top