Solving a differential equation using integrating factor

Click For Summary

Homework Help Overview

The discussion revolves around solving the differential equation \(\frac{dy}{dx} - 2xy = 2x\). Participants are exploring the use of integrating factors and integration techniques to find a solution.

Discussion Character

  • Exploratory, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the choice of integrating factor and the integration process, with some suggesting substitution methods for the integral. There are questions about the correctness of the textbook solution and the implications of integration constants.

Discussion Status

Multiple interpretations of the problem and solutions are being explored. Some participants have provided guidance on the integration process and the importance of constants, while others have questioned the validity of the textbook answer.

Contextual Notes

There is mention of potential confusion regarding the integration process and the treatment of constants, as well as the need for clarity in distinguishing between variables in integration.

chwala
Gold Member
Messages
2,840
Reaction score
427

Homework Statement


Solve ##{dy/dx}-2xy=2x##

Homework Equations

The Attempt at a Solution



Let ##P= -2x ## and Q= 2x,
Integrating factor =## e^{-x^2} ##
##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
##y.e^{-x^2}={x^2} e^{-x^2}+∫ 2{x^3} e^{-x^2}dx##
since ##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
then ##y.e^{-x^2}={x^2}e^{-x^2}+{x^2}.y.e^{-x^2}## dividing through by ##e^{-x^2}, ## we have
##y={x^2}+{x^2}y.##
##y= {x^2}({1+y})##
now textbook says answer is ##y+1=c{x^2} ## where have i gone wrong?
 
Last edited:
Physics news on Phys.org
chwala said:

Homework Statement


Solve ##{dy/dx}-2xy=2x##

Homework Equations

The Attempt at a Solution



Let ##P= -2x ## and Q= 2x,
Integrating factor =## e^{-x^2} ##
##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
##y.e^{-x^2}={x^2} e^{-x^2}+∫ 2{x^3} e^{-x^2}dx##[/QUOTE]
Use substitution u=x2 to find the integral. Do not forget the integration constant.
 
Last edited:
thanks i am getting
## du= 2x dx##
on substitution to the right hand side of the integral:, we get
##ye^{-x^2} = ∫2xe^{-x^2} dx##
##ye^{-x^2}= ∫(2xe^{-u})/(2x)du##
##ye^{-x^2} = -e^{-u} + c##
##y= -e^{-x^2}+c##
## y +1 = ce^{x^2} ## looks like textbook answer is wrong...am i right?
 
Last edited:
I would just let $$u=-x^2$$

Does not really matter, but it is easier to remember the negative sign.
Also, depending on the teacher they may want to see the arbitrary constants of integration. Even tho we can ignore them throughout the problem and just tack them onto the final solution. Ask your instructor. Mine was very picky when I took this course.
 
chwala said:
thanks i am getting
## du= 2x dx##
on substitution to the right hand side of the integral:, we get
##ye^{-x^2} = ∫2xe^{-x^2} dx##
##ye^{-x^2}= ∫(2xe^{-u})/(2x)du##
##ye^{-x^2} = -e^{-u} + c##
##y= -e^{-x^2}+c##
## y +1 = ce^{x^2} ## looks like textbook answer is wrong...am i right?
Yes, the answer in the book is wrong. You can check your solution and that from the book if you substitute them into the original equation.
 
right.
##y= ce^{x^2}-1##
##\frac {dy} {dx}= ce^{x^2}2x ##
substituting this in
##\frac {dy} {dx}-2xy=2x##
we have:,
##ce^{x^2}2x-2x(ce^{x^2}-1)= ce^{x^2}2x-2xce^{x^2}+2x= 2x##
thus shown
 
chwala said:
right.
##y= ce^{x^2}-1##
##\frac {dy} {dx}= ce^{x^2}2x ##
substituting this in
##\frac {dy} {dx}-2xy=2x##
we have:,
##ce^{x^2}2x-2x(ce^{x^2}-1)= ce^{x^2}2x-2xce^{x^2}+2x= 2x##
thus shown
OK, so your solution is correct. What about the formula from the book?
 
The book does not show the method used, it only indicates solutions.
 
chwala said:
The book does not show the method used, it only indicates solutions.
Well, but you can substitute it into the differential equation and see if it is really solution.
 
  • #10
yes, it is a solution.
 
  • #11
Another approach
dy/dx = 2x(y+1)
dy/(y+1) = 2xdx
y+1 = Cex2
 
  • Like
Likes   Reactions: chwala
  • #12
chwala said:

Homework Statement


Solve ##{dy/dx}-2xy=2x##

Homework Equations

The Attempt at a Solution



Let ##P= -2x ## and Q= 2x,
Integrating factor =## e^{-x^2} ##
##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
##y.e^{-x^2}={x^2} e^{-x^2}+∫ 2{x^3} e^{-x^2}dx##
since ##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
then ##y.e^{-x^2}={x^2}e^{-x^2}+{x^2}.y.e^{-x^2}## dividing through by ##e^{-x^2}, ## we have
##y={x^2}+{x^2}y.##
##y= {x^2}({1+y})##
now textbook says answer is ##y+1=c{x^2} ## where have i gone wrong?
Multiplying both sides of your DE by ##e^{-x^2}## we have
[tex]\frac{d}{dx} e^{-x^2} y = e^{-x^2} 2x \Longrightarrow e^{-x^2} y(x) = k + \int_0^x e^{-t^2} 2t \, dt = k - e^{-x^2}+1,[/tex]
or
[tex]y(x) = e^{x^2} (c - e^{-x^2}) = -1 + c e^{x^2},[/tex]
where ##c = k-1##. Basically, ##k=y(0)## is a constant of integration.

I urge you to ALWAYS use definite integration when you solve DE's like you tried to do, and ALWAYS make a distinction between ##x## outside the integral and the dummy variable of integration; that is why I used ##\int \cdots \, dt## instead of ##\int \cdots \, dx##. Doing that makes everything clearer and reduces the chance of making elementary blunders.

Both your solutions and those of the book are incorrect, although the book's solution is correct in the special case that ##c = 0## (giving the trivial solution ##y(x) = -1## for all ##x##).
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
5
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
11K