Why Does My Differential Equation Solution Differ from the Textbook's?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
jwxie
Messages
278
Reaction score
0

Homework Statement



[itex]\[\frac{\mathrm{dy} }{\mathrm{d} x} = \frac{x - e^{-x}}{y + e^{y}}<br /> \][/itex]


Homework Equations



The Attempt at a Solution



This is how I did it...
[1] multiple
[itex]\[y + e^{y} (dy) = x - e^{-x} (dx)\][/itex]

[2] integrate both sides and I get
[itex]\[\frac{1}{2}y^{2} + e^{y} = \frac{1}{2}x^{2} + e^{-x} +c\][/itex]

However, the solution gives
[itex]\[y^{2} - x^{2} +2(e^{y} - e^{-x}) = c\][/itex]
Notice the 2? I can't figure out what I did wrong.

I thank for any helps in advance!
Thanks.
 
Physics news on Phys.org
They just solved for c, then multiplied through by 2 to eliminate the 1/2's.
 
c is an arbitrary constant, your equation is the same as their's but, with [itex]2c \rightarrow c[/itex]. You are free to rename your arbitrary constants, as long as you do it consistently all throughout the equation.