Solving a Non-Separable Differential Equation with an Integrating Factor

  • Thread starter Thread starter Jameson
  • Start date Start date
Click For Summary
The discussion focuses on solving the non-separable differential equation y' = x - y using an integrating factor. Participants clarify that the equation can be rewritten in the form y' + y = x, which is a linear differential equation. The integrating factor, p(x), is derived from the equation p'(x) = p(x), leading to p(x) = e^x. By multiplying the original equation by the integrating factor and integrating, the solution y = x - 1 + C/e^x is confirmed. The participants successfully navigate the problem and validate their solution against the original differential equation.
Jameson
Insights Author
Gold Member
MHB
Messages
4,533
Reaction score
13
y'= x-y

I'm in Calc II and my teacher said that this isn't separable. I know this can be solved though. Does this involve an integrating factor? Any help and I'll try to finish it. This isn't for homework though.
 
Physics news on Phys.org
You can solve the homogenous DE y'+y = 0, find a particular solution of the complete DE and add those.
 
That's not separable but it is a linear equation and there is a simple formula for the integrating factor of a linear equation. For this equation, which could be written as y'+ y= x, an integrating factor would be a function p(x) such that p(x)y'+ p(x)y= (p(x)y)'= p(x)x.
(p(x)y)', by the product rule, is equal to p(x)y'+ p'(x)y. If that is equal to p(x)y'+ p(x)y, then p(x)y'+ p'(x)y= p(x)y'+ p(x)y which gives you a simple de for p(x).
 
Hmm.. that makes sense. How do I go about finding p(x) though?
 
Jameson said:
Hmm.. that makes sense. How do I go about finding p(x) though?
Well if you have a linnear differential equation of the form
y' + q(x)y = r(x)
you want to find the integrating factor p(x) such that
p(x)y' + p(x)q(x)y = p(x)r(x) and p(x)y' + p(x)q(x)y is integrable.
If you look at that expression it looks a lot like teh product rule doesn't it
\frac d {dx} [p(x)y] = p(x)y' + p'(x)y
well if we want p(x)y' + p(x)q(x)y to be integrable as a product we know that
p'(x) = p(x)q(x) must be true so you can solve this differential equation which is seperable so you should be able to find a general equation for the integrating factor p(x)
 
Jameson said:
Hmm.. that makes sense. How do I go about finding p(x) though?

I just told you that:
(p(x)y)', by the product rule, is equal to p(x)y'+ p'(x)y. If that is equal to p(x)y'+ p(x)y, then p(x)y'+ p'(x)y= p(x)y'+ p(x)y which gives you a simple de for p(x).
From p(x)y'+ p'(x)y= p(x)y'+ p(x)y, subtract p(x)y' from both sides to get
p'(x)y= p(x)y. Divide both sides by y (which, presumably, is not identically 0) to get p'(x)= p(x). That equation should be simple.
 
Ok, so since this post I've done some work of basic D.E. and can do this problem now. Thanks to the above posters for their help. I'm going to restate some things that are said above just for my own sake.

We have y+y'=x. Now I want to find an integrating factor p(x) such that d\dx(p(x)y)=p(x)+p(x)y'. Solving this out yields that p(x)=p'(x), so obviously this integrating factor is e^x.

Multiplying through by the integrating factor shows that:
\frac{d}{dx}\left((e^x)y\right)=xe^x

So integrating by parts gives that:(e^x)y=xe^x-e^x+C

Thus y=x-1+\frac{C}{e^x} and I confirm this with the original D.E.

Look good?
 

Similar threads

Replies
7
Views
2K
Replies
9
Views
2K
  • · Replies 26 ·
Replies
26
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
Replies
10
Views
2K
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
24
Views
3K