Can initial conditions for an ODE be given by functions instead of constants?

In summary, initial conditions for an ODE can be given by functions instead of constants. This allows for a more flexible and dynamic approach to solving ODEs, as the initial conditions can vary over time. Additionally, using functions allows for a more accurate representation of real-world systems, where initial conditions may change or be dependent on other variables. However, this approach may also require more complex calculations and may not always be necessary, depending on the specific ODE and its application.
  • #1
SeM
Hi, I am trying to solve an ODE, however, the initial conditions are not known. From PDE examples, which are quite different, I see that some examples have initial conditions given by functions, and not by constants, i.e::

y(0) = x^2

I may have not modeled the problem correctly yet, however, I see that the inhomogenous ODE should have a condition which is as such:

y(0) = cos(x)

MATLAB can't do it. Is it something that can't be done at all?

Thanks!
 
Physics news on Phys.org
  • #2
Do we have to guess what ODE ? Why don't you post it ?
 
  • #3
y'' + iy' = 0
 
  • #4
In other words, y(0) = 1 ?

(your ODE doesn't look inhomogeneous to me at all ?!)
 
  • #5
BvU said:
In other words, y(0) = 1 ?

(your ODE doesn't look inhomogeneous to me at all ?!)
Thanks, I think that explains it. I see this is a PDE not an ODE I want to solve. Cheers (y(0)=cos(theta)
 
  • #6
Don't see no partial differential either. Is it me ?
 
  • #7
BvU said:
Don't see no partial differential either. Is it me ?
It's not you, don't worry. It's me who is horribly wrong here.
 
  • #8
SeM said:
y'' + iy' = 0

SeM said:
I see this is a PDE not an ODE I want to solve.
y appears to be a function of a single variable, so the above is an ODE. BTW, the solution I get, without considering an initial condition, is ##y = -\frac i C e^{-it} + D = -\frac i C (\cos(t) - i\sin(t)) + D##.
 
  • Like
Likes SeM
  • #9
Mark44 said:
y appears to be a function of a single variable, so the above is an ODE. BTW, the solution I get, without considering an initial condition, is ##y = -\frac i C e^{-it} + D = -\frac i C (\cos(t) - i\sin(t)) + D##.

Thanks Mark!

Cheers
 
  • #10
As C is an arbitrary constant anyway, this can be written shorter as ##y=Ce^{-it} + D##.
 
  • Like
Likes SeM
  • #11
mfb said:
As C is an arbitrary constant anyway, this can be written shorter as ##y=Ce^{-it} + D##.
Right. I thought of this, but didn't let i be absorbed into the constant, so as to make things a bit clearer.
 
  • Like
Likes SeM

1. What are initial conditions for an ODE?

Initial conditions for an ODE, or ordinary differential equation, refer to the values or conditions at the starting point of the equation. These conditions are necessary for solving the equation and finding the value of the dependent variable at any given point.

2. Why are initial conditions important in solving an ODE?

Initial conditions are important because they provide the starting point for the ODE and help determine the specific solution to the equation. Without initial conditions, it would be impossible to solve the equation and find the value of the dependent variable at any given point.

3. How do you determine the initial conditions for an ODE?

The initial conditions for an ODE can be determined by looking at the problem or system being modeled and identifying the values of the dependent variable and its derivatives at the starting point. These values are typically provided in the problem or can be estimated based on the context of the situation.

4. Can initial conditions change the solution to an ODE?

Yes, initial conditions can change the solution to an ODE. This is because the specific solution to an ODE is dependent on the initial conditions, and even a slight change in these conditions can result in a different solution. However, the general behavior and form of the solution will remain the same.

5. What happens if the initial conditions for an ODE are not specified?

If the initial conditions for an ODE are not specified, then it is impossible to solve the equation and find the value of the dependent variable at any given point. The solution will remain undefined until the initial conditions are provided. In some cases, the initial conditions may be estimated or assumed based on the context of the problem, but this may not always be accurate.

Similar threads

  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
4
Views
1K
  • Differential Equations
Replies
22
Views
2K
Replies
7
Views
2K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
3
Views
2K
Replies
4
Views
1K
  • Math POTW for University Students
Replies
10
Views
1K
  • Differential Equations
Replies
3
Views
1K
Back
Top