Yet another first order differential equation

squareroot
Messages
76
Reaction score
0

Homework Statement


okey, so i got stuck at another step in the way of solving de's.I've been studying DE of this form:

y' + P(x)y = Q(x)


Homework Equations





The Attempt at a Solution



So, first we solve y' + P(x)y=0 for y. \frac{dy}{y} = -P(x)dx , we integrate this and get that \int \frac{1}{y}\,dy = -\int P(x)\,dx ln(y) + C= -\int P(x)\,dx y= e^{-C-\int P(x)\,dx} this is my attempt to solve but the textbook says that the answer is C(x)e^{-\int P(x)\,dx } . I don't understand that C(x)...Isn't C just a constant?Why does it depend on x?

Thank you




 
Physics news on Phys.org
Well this would be extremely subtle for me as I would have done the same thing you have, but I think since you are integrating with respect to y on the left, C can be C(x) since when differentiated with respect to y it would disappear.

Thinking it over again, you would then have to differentiate to check your answer.

Differentiating the y they say is the answer would require the product and chain rules to obtain:

$$y' = C'(x)e^{-\int P(x) dx} - P(x)C(x)e^{-\int P(x) dx}$$

Now we check to see if this solves the homogeneous equation:

$$y' + P(x)y = 0$$

$$C'(x)e^{-\int P(x) dx} - P(x)C(x)e^{-\int P(x) dx} + P(x)C(x)e^{-\int P(x)dx} = 0$$

The last two terms cancel, then we divide the exponential function with the C'(x) and find that:

$$C'(x) = 0$$ which would imply that C(x) is NOT a function of x. I don't know what your book is trying to say now D:.

Good luck!
 
Last edited:
##y=Ce^{-\int P(x)\,dx }## is solution of the homogeneous equation y' + P(x)y = 0, but you need the solution of the equation y' + P(x)y = Q(x), and you try to find a particular solution in the form ##y=C(x)e^{-\int P(x)\,dx }##.

See

http://www.math.vt.edu/people/renardym/class_home/firstorder/node1.html

ehild
 
squareroot said:

Homework Statement


okey, so i got stuck at another step in the way of solving de's.I've been studying DE of this form:

y' + P(x)y = Q(x)


Homework Equations





The Attempt at a Solution



So, first we solve y' + P(x)y=0 for y. \frac{dy}{y} = -P(x)dx , we integrate this and get that \int \frac{1}{y}\,dy = -\int P(x)\,dx ln(y) + C= -\int P(x)\,dx y= e^{-C-\int P(x)\,dx} this is my attempt to solve but the textbook says that the answer is C(x)e^{-\int P(x)\,dx } . I don't understand that C(x)...Isn't C just a constant?Why does it depend on x?

The method of solving <br /> y&#039; + P(x)y = Q(x)<br /> is to multiply both sides by e^{\int P(x)\,dx} to obtain <br /> e^{\int P(x)\,dx}y&#039; + e^{\int P(x)\,dx}P(x)y = \frac{d}{dx}\left(ye^{\int P(x)\,dx}\right)<br /> = e^{\int P(x)\,dx} Q(x). Hence <br /> ye^{\int P(x)\,dx} = \int e^{\int P(x)\,dx} Q(x)\,dx \equiv C(x)
 
ehild said:
##y=Ce^{-\int P(x)\,dx }## is solution of the homogeneous equation y' + P(x)y = 0, but you need the solution of the equation y' + P(x)y = Q(x), and you try to find a particular solution in the form ##y=C(x)e^{-\int P(x)\,dx }##.

See

http://www.math.vt.edu/people/renardym/class_home/firstorder/node1.html

ehild


I ve looked over the link you posted but there they say "let C be eK , where K is a constant but in my textbook they wrote C(x) as if C depends on the value of x, but if C depends on x then C is no longer a constant...
 
Read further, from the sentence
Now we look at an inhomogeneous equation


y'+p(t)y=g(t)

ehild
 
pasmith has the best response so far...just to expand a bit though...

In order to solve the first order linear nonhomogenous differential equation: y'(x) + P(x)y(x) = Q(x) , you do have to solve the homogenous form of this equation, but in a slightly different way - let me explain by using the technique known as the "integrating factor" (which is essentially what pasmith did).

we start with the original nonhomogenous differential equation: y'(x) + P(x)y(x) = Q(x)

I am going to create a new variable μ(x), which will be our integrating factor, such that:

μ(x)[y'(x) + P(x)y(x) = Q(x)]

⇔ μ(x)y'(x) + μ(x)P(x)y(x) = μ(x)Q(x) {Equation 1}

1). if we differentiate μ(x)y(x) using the product rule, what do we obtain?

→ u = μ(x), u' = μ'(x), v = y(x), v' = y'(x)

so d/dx[μ(x)y(x)] = u'v + v'u

so d/dx[μ(x)y(x)] = μ(x)y'(x) + μ'(x)y(x) ...but wait doesn't this look familiar?

well if μ'(x) was equal to μ(x)P(x), then it would read: d/dx[μ(x)y(x)] = μ(x)y'(x) + μ(x)P(x)y(x) which we know from {Equation 1} must be equal to μ(x)Q(x)

2). now we want to create μ(x) such that: μ'(x) = μ(x)P(x)

and thus: d/dx[μ(x)y(x)] = μ(x)y'(x) + μ'(x)y(x) = μ(x)Q(x)

ergo, d/dx[μ(x)y(x)] = μ(x)q(x)

⇔ ∫d/dx[μ(x)y(x)]dx = ∫μ(x)q(x)dx

⇔ μ(x)y(x) = ∫μ(x)q(x)dx

∴ y(x) = [1/μ(x)] * ∫μ(x)q(x)dx

3). great, we have a value for y(x), but it's still in terms of our integrating factor...so what is this integrating factor actually equal to??

we already created μ(x) such that μ'(x) = μ(x)P(x), so now we have to FIND μ(x) such that μ'(x) = μ(x)P(x)

⇔ μ'(x) - μ(x)P(x) = 0 //this is where you solve for the "homogenous" differential equation, which you already did...this is just in terms of μ(x) instead of y(x)//

⇔ μ(x) = C * exp(∫P(x)dx) //note that this integral within e's exponent has NO constant of integration when you are actually solving//

4). so putting this all together we now have:

y(x) = [1/μ(x)] * ∫μ(x)q(x)dx where μ(x) = C * exp(∫P(x)dx)

hope this helps!
 
Excellent! :D
 
Back
Top