# dy/dx=e^(-x^2) - 2xy subject to y(2)=0

• Jun 3rd 2011, 06:14 AM
metalkakkarot
dy/dx=e^(-x^2) - 2xy subject to y(2)=0
hi,
need some help for this question, i tried solving by seperating dy to one side and dx to the other and integrating however dont get the right answer...how can i solve this
any help much appreciated

solve the following differential equation for y giving answer in form y=f(x)

dy/dx=e^(-x^2) - 2xy subject to y(2)=0

thankyou
• Jun 3rd 2011, 07:04 AM
Ackbeet
The equation is linear in y, so use the integrating factor approach. What do you get?
• Jun 3rd 2011, 07:21 AM
metalkakkarot
i used the integrating factor method
integrating factor being e^(x^2)
i got the answer to be y=2/(e^(x^2))

y = (x-2)e^(-x^2)

• Jun 3rd 2011, 07:24 AM
Ackbeet
Quote:

Originally Posted by metalkakkarot
i used the integrating factor method
integrating factor being e^(x^2)

That is correct.

Quote:

i got the answer to be y=2/(e^(x^2))

y = (x-2)e^(-x^2)

• Jun 3rd 2011, 08:05 AM
metalkakkarot
i did the question again and essentially had forgotten to integrate the RHS first time round...
now i get close to the correct answer except a sign difference...
at the end i subbed y=2 and x=0 to get c=2
http://i808.photobucket.com/albums/z...6-03164700.jpg

http://i808.photobucket.com/albums/z...6-03164706.jpg
• Jun 3rd 2011, 08:15 AM
Ackbeet
Your working is correct up to the determination of the arbitrary constant. If you plug in x = 2, do you get y = 0? (I suspect you may have reversed the roles of x and y, perhaps?)
• Jun 3rd 2011, 08:21 AM
metalkakkarot
thankyou so much...it was as you said i had switched the x and the y and the end....got the answer

+thanks
• Jun 3rd 2011, 08:22 AM
Ackbeet
You're very welcome. Have a good one!