Solve 1st Order Diff Eq Using Integrating Factor: 2y/x + dy/dx = 1-2/x

Bucky
Messages
79
Reaction score
0

Homework Statement


Use the integrating factor to solve the first order differential equation

dy/dx + (2/x)y = 1 - 2/x

subject to the initial condition y(1) = 2

The Attempt at a Solution



I have the full answer (it's an example), but my lecturer is notorious for omitting steps, to my constant irritation. It might be fine for pure mathmaticians, but for some of us comp sci fakers, it makes everything much more difficult :wink:
<br /> P = \frac{2}{x}
<br /> Q = 1-\frac{2}{x}? or just \frac{2}{x} ?<br />
Integrating factor is therefore
F = e^{2 \int \frac{1}{x}}<br /> ...<br /> F = x^2<br />

Upon multiplying by F = x^2, we find

x^2 \frac{dy}{dx} + 2xy= x^2 - 2x

Where does the 2xy go?
<br /> ((x^2) y)&#039; = x^2 + 2x<br />
so that
<br /> x^2 y = \int (x^2 - 2x) dx

<br /> x^2y = \frac{x^3}{3} - x^2 + C<br />
when x = 1, y = 2

<br /> x^2 y = \frac{x^3}{3} - x^2 + C<br /> 2 = \frac{1}{3} -1 + C<br /> C = \frac{8}{3}<br />

therefore, sollution is
<br /> y = \frac{x}{3} - x + \frac {8}{3x^2}<br />

where did the x^2 come from at the end?
 
Last edited:
Physics news on Phys.org
Bucky said:

Homework Statement


Use the integrating factor to solve the first order differential equation

dy/dx + (2/x)y = 1 - 2/x

subject to the initial condition y(1) = 2

The Attempt at a Solution



I have the full answer (it's an example), but my lecturer is notorious for
omitting steps, to my constant irritation. It might be fine for pure mathmaticians, but for some of us comp sci fakers, it makes everything much more difficult :wink:
<br /> P = \frac{2}{x}
<br /> Q = 1-\frac{2}{x}? or just \frac{2}{x} ?<br />
Integrating factor is therefore
F = e^{2 \int \frac{1}{x}}<br /> ...<br /> F = x^2<br />

Upon multiplying by F = x^2, we find

x^2 \frac{dy}{dx} + 2xy= x^2 - 2x

Where does the 2xy go?
...
where did the x^2 come from at the end?

The point of the integrating factor is that you make the LHS of the equation look like the total derivative with respect to x of something. Consider this function:
<br /> f=yx^2<br />
y is a function of x, and x^2 is a function of x. what is the derivative of f? Use the product rule:
<br /> \frac{df}{dx}=\frac{dy}{dx}x^2+y\frac{d(x^2)}{dx}<br />
but of course I know the derivative of x^2 with respect to x, it's just 2x. I.e.
<br /> \frac{df}{dx}=\frac{dy}{dx}x^2+y2x<br />

In other words, I can rewrite
<br /> \frac{dy}{dx}x^2+2xy<br />
as
<br /> \frac{d(yx^2)}{dx}<br />

...that's where the 2x went.
 
...so, now I have
<br /> \frac{d(yx^2)}{dx}=x^2-2x<br />
then the integral of the LHS is trivial
<br /> yx^2=\int (x^2-2x)<br />
...and, well, the integral of the RHS is easy too
<br /> yx^2=\frac{x^3}{3}-x^2+C<br />

so then, dividing both sides by x^2 I find
<br /> y=\frac{x}{3}-1+\frac{C}{x^2}<br />

with C=8/3 this is
<br /> y=\frac{x}{3}-1+\frac{8}{3x^2}<br />

which would agree with your answer if you had divided by x^2 correctly. cheers.
 
Last edited:
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top