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

In summary, the integrating factor allows you to rewrite the equation as a product rule and simplify it. 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.
  • #1
Bucky
82
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:
[itex]
P = \frac{2}{x} [/itex]
[itex]
Q = 1-\frac{2}{x}? or just \frac{2}{x} ?
[/itex]
Integrating factor is therefore
[itex]F = e^{2 \int \frac{1}{x}}
...
F = x^2
[/itex]

Upon multiplying by [itex]F = x^2 [/itex], we find

[itex] x^2 \frac{dy}{dx} + 2xy= x^2 - 2x [/itex]

Where does the 2xy go?
[itex]
((x^2) y)' = x^2 + 2x
[/itex]
so that
[itex]
x^2 y = \int (x^2 - 2x) dx [/itex]

[itex]
x^2y = \frac{x^3}{3} - x^2 + C
[/itex]
when x = 1, y = 2

[itex]
x^2 y = \frac{x^3}{3} - x^2 + C
2 = \frac{1}{3} -1 + C
C = \frac{8}{3}
[/itex]

therefore, sollution is
[itex]
y = \frac{x}{3} - x + \frac {8}{3x^2}
[/itex]

where did the x^2 come from at the end?
 
Last edited:
Physics news on Phys.org
  • #2
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:
[itex]
P = \frac{2}{x} [/itex]
[itex]
Q = 1-\frac{2}{x}? or just \frac{2}{x} ?
[/itex]
Integrating factor is therefore
[itex]F = e^{2 \int \frac{1}{x}}
...
F = x^2
[/itex]

Upon multiplying by [itex]F = x^2 [/itex], we find

[itex] x^2 \frac{dy}{dx} + 2xy= x^2 - 2x [/itex]

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:
[tex]
f=yx^2
[/tex]
y is a function of x, and x^2 is a function of x. what is the derivative of f? Use the product rule:
[tex]
\frac{df}{dx}=\frac{dy}{dx}x^2+y\frac{d(x^2)}{dx}
[/tex]
but of course I know the derivative of x^2 with respect to x, it's just 2x. I.e.
[tex]
\frac{df}{dx}=\frac{dy}{dx}x^2+y2x
[/tex]

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

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

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

with C=8/3 this is
[tex]
y=\frac{x}{3}-1+\frac{8}{3x^2}
[/tex]

which would agree with your answer if you had divided by x^2 correctly. cheers.
 
Last edited:

What is a first order differential equation?

A first order differential equation is an equation that involves the first derivative of a function. In this case, dy/dx is the first derivative of the function y.

What is an integrating factor?

An integrating factor is a function that is used to solve a first order differential equation. It is multiplied to both sides of the equation to make the left side of the equation a perfect derivative, making it easier to solve.

How do you find the integrating factor for a given differential equation?

To find the integrating factor for a given differential equation, you can use the formula e^∫P(x)dx, where P(x) is the coefficient of dy/dx. In this case, P(x) = 2/x, so the integrating factor would be e^∫(2/x)dx.

What is the general solution to a first order differential equation?

The general solution to a first order differential equation is the equation that satisfies the given differential equation. It includes a constant of integration, which allows for an infinite number of solutions. In this case, the general solution would be y = Cx^2 - x + 2xln|x|, where C is the constant of integration.

How do you solve a first order differential equation using an integrating factor?

To solve a first order differential equation using an integrating factor, you would first find the integrating factor, then multiply it to both sides of the equation. This will make the left side a perfect derivative, which can be easily integrated. Once you have integrated both sides, you can solve for y and add the constant of integration to get the general solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
528
  • Calculus and Beyond Homework Help
Replies
3
Views
329
  • Calculus and Beyond Homework Help
Replies
6
Views
835
  • Calculus and Beyond Homework Help
Replies
21
Views
819
  • Calculus and Beyond Homework Help
Replies
12
Views
975
  • Calculus and Beyond Homework Help
Replies
6
Views
539
  • Calculus and Beyond Homework Help
Replies
8
Views
865
  • Calculus and Beyond Homework Help
Replies
7
Views
688
  • Calculus and Beyond Homework Help
Replies
3
Views
237
  • Calculus and Beyond Homework Help
Replies
20
Views
442
Back
Top