Initial value problem - value returns invalid operation

In summary: So the solution is y = log(|x|) - log(|y+1|) + C, and you can still find C using the initial condition. In summary, you need to be careful with evaluating natural logarithms in order to solve this initial value problem.
  • #1
misterlimbo
2
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
  • #2
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.
 

FAQ: Initial value problem - value returns invalid operation

What is an initial value problem?

An initial value problem (IVP) is a type of differential equation that involves finding a function that satisfies a given equation and a set of initial conditions. This means that the function must satisfy the equation at a specific starting point, or initial value.

What does it mean when the value returns an invalid operation?

When the value of a function returns an invalid operation, it means that the function is undefined or not well-defined at that point. This could be due to a division by zero, taking the square root of a negative number, or other mathematical errors.

How do you solve an initial value problem?

To solve an initial value problem, you must first rewrite the equation in its standard form and then use integration techniques to find a general solution. The initial conditions are then used to determine the value of any unknown constants in the solution, resulting in a specific solution that satisfies both the equation and the initial values.

Why are initial value problems important in science?

Initial value problems are important in science because they allow us to model and understand real-world phenomena, such as the growth of a population or the spread of a disease. They also provide a way to predict future behavior based on current conditions, making them useful in fields such as physics, engineering, and economics.

What are some common methods for solving initial value problems?

Some common methods for solving initial value problems include the Euler method, the modified Euler method, and the Runge-Kutta method. These numerical methods involve approximating the solution using a series of points and then using these points to approximate the solution at other points. Other methods include separation of variables, Laplace transforms, and power series solutions.

Back
Top