How is Mathematica solving this ODE with periodic coefficients?

  • Thread starter Robin04
  • Start date
  • Tags
    Ode
In summary, the conversation discusses the use of Mathematica to solve a specific type of ODE and suggests using series solutions or searching for Mathieu functions to better understand the solution. The speaker also mentions that Mathematica's output does not seem very informative and suggests using Floquet theory to handle ODEs with periodic coefficients.
  • #1
Robin04
260
16
Homework Statement
##y''(x)=a\cdot \cos{(\omega x)}(b+c\cdot y(x))##
Relevant Equations
-
245639

Mathematica gives this solution but how does it calculate it? What's the method here?
 
Physics news on Phys.org
  • #2
If there is a particular method or if this is a specific type of ode that lends itself to a straight forward solution, then I don't off hand, know what it is. Sooo, what I would generally do after rearranging it and trying to change variables into something I recognize is to just find a series solution and see if the recursion relation or the resulting terms can be collected into some standard functions. Personally, I think I'd go for leaving it as a series given the output from mathematica, which doesn't seem very illuminating.
 
  • Like
Likes Robin04
  • #3
The solution WolframAlpha gives is a giant mess! (Similar to what you have.)
I would search for the Mathieu functions, i.e. try to figure it out from behind.
 
  • Like
Likes Robin04
  • #4
bobob said:
If there is a particular method or if this is a specific type of ode that lends itself to a straight forward solution, then I don't off hand, know what it is. Sooo, what I would generally do after rearranging it and trying to change variables into something I recognize is to just find a series solution and see if the recursion relation or the resulting terms can be collected into some standard functions. Personally, I think I'd go for leaving it as a series given the output from mathematica, which doesn't seem very illuminating.
Képkivágás.PNG

I wasn't able to derive a recursion relation due to the term ##y(x) \cdot \cos{(\omega x)}## as in power series form I get an infinite sum times an infinite sum, not sure how to deal with that. Calculating the coefficients one by one didn't look like a useful thing to do, as Mathematica can do it too. Moreover, the power series doesn't seem to converge even in higher orders (I tried it for 30), and it does not match the numerical solution:
Képkivágás.PNG

Does this mean that this cannot be solved with power series or I missed something?
 
  • #5
I am not an expert on this, but ODEs with periodic coefficients are handled with Floquet theory. Your particular equation is essentially Mathieu’s equation
https://en.m.wikipedia.org/wiki/Mathieu_functionThe homogeneous equation has two solutions (of course), which are called Matthieu functions.

You have a non-homogeneous version ( your sinusoid forcing function). So Mathematica’s solution looks like what you would get if you applied variation of parameters using the two solutions to the homogeneous equation.

Jason
 

FAQ: How is Mathematica solving this ODE with periodic coefficients?

What is an ODE?

An ODE, or ordinary differential equation, is a mathematical equation that involves an unknown function and its derivatives. It represents a relationship between a function and its rate of change.

How do you solve an ODE?

There are several methods for solving an ODE, including separation of variables, substitution, and using an integrating factor. The specific method used depends on the form and complexity of the ODE.

What are the steps for solving an ODE?

The general steps for solving an ODE are: 1) Identify the type of ODE and determine the appropriate method for solving it. 2) Apply the chosen method to the ODE. 3) Solve for the unknown function. 4) Check the solution by plugging it back into the original equation.

Can all ODEs be solved analytically?

No, not all ODEs can be solved analytically. Some ODEs are too complex or do not have a closed-form solution, meaning they cannot be expressed using elementary functions. In these cases, numerical methods must be used to approximate a solution.

How do you know if your solution to an ODE is correct?

To check the solution to an ODE, you can plug it back into the original equation and see if it satisfies the equation. Additionally, you can use initial or boundary conditions to verify that the solution meets the given constraints.

Back
Top