Initial value problem - value returns invalid operation

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
misterlimbo
Messages
1
Reaction score
0

Homework Statement



Solve the initial value problem
Given: x=0, y=-2

Homework Equations



2x(y+1)dx - ydy = 0

The Attempt at a Solution



Manipulating the given equation:
--> 2x(y+1)dx - ydy = 0
--> 2xdx = ydy/(y+1)
--> 2xdx = (1 - 1/y+1)dy
--> 2x2/2 = y - ln(y+1) + lnC

(where lnC is a constant)

Here's my problem:
- Putting y = -2 to the equation will result to the evaluation of the natural logarithm of a negative number, which I assume is not the intended solution that our lecturer wants. Have I done something wrong in obtaining the general solution to the DE?
- Is there another way to "work my way around" the initial value condition? I tried substituting the value (just for to see where it goes). I let x = 0 then manipulate the remaining expression but still I get that negative value for C.

Thank you very much in advance!
 
Last edited:
Physics news on Phys.org
misterlimbo said:

Homework Statement



Solve the initial value problem
Given: x=0, y=-2


Homework Equations



2x(y+1)dx - ydy = 0


The Attempt at a Solution



Manipulating the given equation:
--> 2x(y+1)dx - ydy = 0
--> 2xdx = ydy/(y+1)
--> 2xdx = (1 - 1/y+1)dy
--> 2x2/2 = y - ln(y+1) + lnC

(where lnC is a constant)

Here's my problem:
- Putting y = -2 to the equation will result to the evaluation of the natural logarithm of a negative number, which I assume is not the intended solution that our lecturer wants. Have I done something wrong in obtaining the general solution to the DE?
- Is there another way to "work my way around" the initial value condition? I tried substituting the value (just for to see where it goes). I let x = 0 then manipulate the remaining expression but still I get that negative value for C.

Thank you very much in advance!

Sometimes you have to be careful and write the integral of 1/y as log(|y|). This works ok because if f(y)=log(-y) then f'(y) is also 1/y.