I was looking at the differential equation (x^2 + 1) \frac{dy}{dx} + xy = 0.
This solution to this equation has to be y = \frac{c}{\sqrt{x^2 +1}}
So, when do we usually need to use the method of integrating factor? Can we solve all linear equations (1st order) using this method?
Because in this example I used the method of separation of variables and I arrived at the correct answer!
(x^2 + 1) \frac{dy}{dx} + xy = 0
\frac{dy}{dx} + xy = \frac{1}{(x^2 + 1)}
\frac{1}{y} dy = \frac{1}{(x^2 + 1)} -xy dx
\frac{1}{y} = \frac{-x}{(x^2 + 1)}
\int \frac{1}{y} = \int \frac{-x}{(x^2 + 1)}
y = - \frac{1}{2} ln (x^2 + 1) + ln c = ln \frac{c}{\sqrt{x^2 +1}}
& it follows that y = \frac{c}{\sqrt{x^2 +1}}!!
But how do we get the same answer using the method of integrationg factor?
(x^2 + 1) \frac{dy}{dx} + xy = 0.
Since it is in the form P(x) \frac{dy}{dx} + Q(x)y = R(x), we get it in the form \frac{dy}{dx} + p(x)y = q(x);
\frac{dy}{dx} + xy = \frac {1}{x^2 +1)};
\mu = e^{\int p(x) dx} so, since the p(x) is just x, then ∫x = 1/2x^2
yields => e^{\frac{x^2}{2}}
Multiplying both sides of the equation by the integrating factor;
Did I do it correctly so far? How do we do this question using an integrating factor?
Thanks.
rock.freak667
Jun18-08, 07:45 PM
(x^2 + 1) \frac{dy}{dx} + xy = 0
\frac{dy}{dx}+\frac{x}{x^2+1}y=0
and p(x)=x/x^2+1
roam
Jun18-08, 08:59 PM
Well, thank you, but how did you get from (x^2 + 1) \frac{dy}{dx} + xy = 0 to \frac{dy}{dx}+\frac{x}{x^2+1}y=0.....?
We had to devide through by x^2 +1 in order to make the coefficient of dy/dx equal to 1. But don't we need to devide the other side by it as well? i.e., \frac{dy}{dx} + xy = \frac {1}{(x^2 +1)}?!
But if p(x)= \frac{x}{x^2 +1} , we need to find \int \frac{x}{x^2 +1} dx
Integrating that gives \frac{1}{2} ln (x^2 + 1) = ln \sqrt{x^2 +1}
Is e^{ln\sqrt{x^2 +1}} the integrating factor?
I'm confused with that...
rock.freak667
Jun18-08, 09:29 PM
Well, thank you, but how did you get from (x^2 + 1) \frac{dy}{dx} + xy = 0 to \frac{dy}{dx}+\frac{x}{x^2+1}y=0.....?
We had to devide through by x^2 +1 in order to make the coefficient of dy/dx equal to 1. But don't we need to devide the other side by it as well? i.e., \frac{dy}{dx} + xy = \frac {1}{(x^2 +1)}?!
the equation is
(x^2+1)\frac{dy}{dx}+xy=0
if you divide by (x^2+1), the right side is still 0
But if p(x)= \frac{x}{x^2 +1} , we need to find \int \frac{x}{x^2 +1} dx
Integrating that gives \frac{1}{2} ln (x^2 + 1) = ln \sqrt{x^2 +1}
Is e^{ln\sqrt{x^2 +1}} the integrating factor?
I'm confused with that...
Yeah that is the integrating factor.
then recall that
e^{lnf(x)}=f(x)
so your integrating factor,reduces to \sqrt{x^2+1}
roam
Jun20-08, 12:34 AM
Yes, of course. :smile:
All that remains is to multiply both sides of the equation by the µ;
The integrating factor is e^{ln \sqrt{x^2 +1}} => \sqrt{x^2+1},
As we should multiply through by the integrating factor the overall effect is to devide through by \sqrt{x^2+1},
It'd would it be like:
\frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{1}{\sqrt{x^2 +1}} .xy = 0
.·. \frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{x}{\sqrt{x^2 +1}} y = 0
I don't know if this is right, (please correct me if I'm wrong), I know that there is a formula for this that goes like; y = \frac{1}{\mu} \int \mu q(x) dx but in this case I'm not sure~
Thanks.
HallsofIvy
Jun20-08, 07:48 AM
Any linear order differential equation has an integrating factor but there is no general method for finding it.
Any linear first order equation, like the one you give, has an integrating factor given by a simple formula. An integrating factor for the linear equation dy/dx+ p(x)y= q(x) is given by
e^{\int p(x)dx}
By the way, any linear homogeneous first order differential equation, again, what you have here, is separable. You can integrate that as
[tex]\frac{dy}{y}= -\frac{xdx}{x^2+ 1}[/itex]
roam
Jun20-08, 04:10 PM
By the way, any linear homogeneous first order differential equation, again, what you have here, is separable. You can integrate that as
\frac{dy}{y}= -\frac{xdx}{x^2+ 1}
Yes, I know. As you see in my first post I did solve this equation by separation of variables but I am rather curious as how to get the same solution using an integrating factor.
Anyway, I did find the integrating factor i.e., \mu = e^{\int p(x) dx}; it's \sqrt{x^2+1};
(x^2 + 1) \frac{dy}{dx} + xy = 0
So the integrating after deviding through by x^2 + 1 (to make the coefficient of dy/dx = 1) is e^{ln\sqrt{x^2 +1}} = \sqrt{x^2+1}
Now we have to multiply both sides by this integrating factor and I attempt at it before and that's where I'm stuck...
Would it be something like: \frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{x}{\sqrt{x^2 +1}} y = 0 ?
Thanks.
Jitse Niesen
Jun20-08, 05:33 PM
(x^2 + 1) \frac{dy}{dx} + xy = 0
So the integrating after deviding through by x^2 + 1 (to make the coefficient of dy/dx = 1) is e^{ln\sqrt{x^2 +1}} = \sqrt{x^2+1}
Now we have to multiply both sides by this integrating factor and I attempt at it before and that's where I'm stuck...
Would it be something like: \frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{x}{\sqrt{x^2 +1}} y = 0 ?
\sqrt{x^2+1} is the integrating factor for the equation \frac{dy}{dx} + \frac{xy}{x^2+1} = 0 that you get after you divide the original equation through by x^2 + 1. You have to multiply that equation by \sqrt{x^2+1}, not the original one.
roam
Jun21-08, 11:30 PM
Thanks for your message!
Yes, I made a slight error. So, multiplying \frac{dy}{dx} + \frac{xy}{x^2+1} = 0 by \sqrt{x^2+1} we get;
So, is that it? What else do we need to do in order to finish the job?
you then integrate both sides of the equation.
Noticing that the left side will always become y \mu because the left side is actually:
\frac{d}{dx}(y \sqrt{x^2+2})
roam
Jun22-08, 01:38 AM
Noticing that the left side will always become y \mu because the left side is actually:
\frac{d}{dx}(y \sqrt{x^2+2})
Errr..... I don't understand how you got from \sqrt{x^2 +2}\frac{dy}{dx} + \sqrt{x^2 +1}. \frac{x}{x^2 +1}y = 0 to \frac{d}{dx}(y \sqrt{x^2 +1}) = 0 per se.
I appreciate that if you could show me how you got the left side like that.
Yes, we do have y \mu on the left, but what happens to the rest of the stuff? I'm confused...
But I'm pretty sure it's right, since y \sqrt{x^2 +1} it's a constant, say c, from which we can get the correct answer, y = \frac{c}{\sqrt{x^2 +1}}.
Thanks a lot. :smile:
rock.freak667
Jun22-08, 05:15 PM
ah I have too many typos with 2s being 1s...so I'll start over.
We have to solve
(x^2 + 1) \frac{dy}{dx} + xy = 0
Dividing by x^2+1 we now get:
\frac{dy}{dx}+\frac{x}{x^2+1}y=0
which is in the form \frac{dy}{dx}+P(x)y=Q(x)
where P(x)=\frac{x}{x^2+1}
and Q(x)=0
and when you integrate the differential of "something",you just get the "something".
So,after you multiply by the integrating factor and then integrate both sides w.r.t. x, the left side will always become y \mu, and you just now deal with the right side.
so you now have
y \sqrt{x^2+1}= \int 0 dx
which is y \sqrt{x^2+1}= C
roam
Jun24-08, 02:41 AM
Thanks. That makes perfect sense now, except;
and when you integrate the differential of "something",you just get the "something".
So,after you multiply by the integrating factor and then integrate both sides w.r.t. x, the left side will always become y \mu, and you just now deal with the right side.
In the equation \frac{dy}{dx} + 4y = e^{-3x}, which is already in the form \frac{dy}{dx}+P(x)y=Q(x),
The way it looks atm, I am not sure, would the left side be y (e^{4x}) (?) - "?"
Cheers!
rock.freak667
Jun24-08, 01:52 PM
yep. the left side is ye^4x.
You just deal with the right side now.
roam
Jun25-08, 04:37 AM
That's a no brainer! :wink: I get it!
And about the right side...
y (e^{4x}) = \int e^{-3x} . e^{4x}
Do you think I should just try integrating it with respect to x, using the method of integration by parts since it's in the form \int f(x) g(x) dx? *and* then devide the whole thing by e^{4x}? .......so that we get y = ...
Do you think that would work? ~~
Thanks for the tips.
rock.freak667
Jun25-08, 01:11 PM
That's a no brainer! :wink: I get it!
And about the right side...
y (e^{4x}) = \int e^{-3x} . e^{4x}
Do you think I should just try integrating it with respect to x, using the method of integration by parts since it's in the form \int f(x) g(x) dx? *and* then devide the whole thing by e^{4x}? .......so that we get y = ...
Do you think that would work? ~~
Thanks for the tips.
No need for integration by parts when you know the rules of indices.
remember that a^m \times a^n =a^{m+n in your integral...'a' is 'e' ,m=-3 and n=4
roam
Jun25-08, 06:34 PM
my bad my bad...
Yes, I knew the rules of indices, so e^{-3x} \times e^{4x} = e^x
and \int e^x = e^x + c
Now we have y (e^{4x}) = e^{x} so we have to devide both sides by e^4x.
But that surely wouldn't produce the right answer. The right answer has to be y = e^{-3x} + Ce^{-4x}, something like that.
I don't know, what do you reckon is wrong here? :rolleyes:
rock.freak667
Jun25-08, 06:36 PM
my bad my bad...
Yes, I knew the rules of indices, so e^{-3x} \times e^{4x} = e^x
and \int e^x = e^x + c
Now we have y (e^{4x}) = e^{x} so we have to devide both sides by e^4x.
But that surely wouldn't produce the right answer. The right answer has to be y = e^{-3x} + Ce^{-4x}, something like that.
I don't know, what do you reckon is wrong here? :rolleyes:
You forgot to add the constant of integration so you'd have e^x + C which would give the correct answer.
epenguin
Jun26-08, 11:42 AM
I may have misunderstood the intent but if it is just about solving this equation it seems to me making a big meal of something fairly easy to solve.