Having a problem with soling a second order ODE equation using Matlab

Click For Summary

Discussion Overview

The discussion revolves around solving a complex second-order ordinary differential equation (ODE) using Matlab. The equation is derived from linearized Einstein equations related to black hole physics, specifically the Schwarzschild metric. Participants explore numerical methods, including the shooting method and finite difference method, while addressing the challenges posed by singularities in the equation.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Amos presents a complex ODE and describes the difficulties encountered with the shooting method due to singularities at the boundaries.
  • Michel questions the boundary conditions and suggests exploring intuitive approaches to handle singularities, including transforming the second-order equation into a first-order system.
  • Amos clarifies the origin of the equation and the significance of the variable nu, which is derived from previous calculations related to quasi-normal modes of black holes.
  • Michel proposes finding analytical solutions around singularities to integrate into the finite difference method, emphasizing the importance of understanding solution behavior near these points.
  • Michel also suggests considering Fourier analysis and the possibility that nu might relate to an eigenvalue problem, which could influence the approach to solving the ODE.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to solve the ODE, with no consensus on the effectiveness of the proposed methods or the handling of singularities. The discussion remains unresolved regarding the optimal numerical technique.

Contextual Notes

The discussion highlights the complexity of the ODE, the presence of singularities, and the challenges in defining boundary conditions. Participants acknowledge the need for a deeper understanding of the mathematical properties of the equation and its physical implications.

kubekas
Messages
9
Reaction score
0
I am having a problem coding a Matlab code that solves a second ODE equation which I give below:

x^3*(1-2*x*M)d^2J(x)/dx^2+2*(2*x^2+i*nu*x-7*x^3*M)*dJ(x)/dx
-2*(2*x+8*M*x^2+i*nu)*J(x)=0.

where

M = 1 (Mass of a black hole),
nu = 0.74734+0.17792*i,
J is a function of x,
i represents a complex number.

This equation is very complex to solve. Fistly I tried the Matlab shooting
method and it did not work because this equation is singular at the boundries i.e
0 and 1. Now I am trying to solve it using Matlab Finite Difference Method. I must point out that this problem has no analytic solution and we hope that it can be solved numerically.

Can anyone out there help me with this problem.
Thanks
Amos
 
Last edited:
Physics news on Phys.org
kubekas,

You did not specify the boundary conditions. Boundary conditions, or initial values ?
I assume J is a complex function.
I am surprised by the fixed complex value for nu in your formulation. Where does that come from (I am not a computer!).
Could you state the problem a little bit more clearly and eventually give the physical meaning.

Before trying rigorous handling of this problem, have you tried some intuitive approach, like by suppressing numerically the singularities?

I don't see why x=1 is singular, but have you noticed that x=1/2 is a singularity?

Have you tried to turn this 2nd order equation in a 1st order system?

Have you tried to write analytical solutions for constant coefficients and to patch these solutions together? By this, I mean developing a simple personnal solver instead of relying on a general purpose solver: this could provide you a better understanding of the question and possibly a specialised solver that could be simpler and more efficient.

Have you read something about singularities in differential equations, have you seen other examples of that in other field of physics. I could suggest you wave propagation in inhomogeneuous plasmas, for example, where such singularites occurs when the refractive index changes sign. Physically there is often an improved model where the singularity disappears, and the solution can be physically very different. (for example: wave attenuation effects in plasmas or magnetisation/finite larmor radius/ effects that remove the singularity)

Michel
 
Last edited:
Hi, Michel

Thanks for the replay. We derived the above equation by solving linearized Einstein equations for the Bondi-Sachs metric when the background is Schwarzschild. To do that we solved hypersurface, evolution, and contraints equations and in the end we ended up with the above equation when {\it l}(angular momentum)=2. This equation is similar to both the Regge-Wheeler and Zerilli equations in that they all discribe the same linear perturbations of the Schwarzschild black. By solving the above equation, we hope to produce quasi-normal modes of a Schwarzcshild black hole hence to see that the above equation is solverable, we are using the already calculated \nu for {\it l}=1 from the Zerilli equation.

Yes that is true at x=1/2 we got a singulary, typing error. Like I outlined, I tried to surprise these singularity when I was trieying the shooting method and I was advised by my promoter that unfortunately this method will not for this problem. In that processe we god four 1st order systems of equation and that is because J is complex as you have pointed out, that means firslty we separated the above equation into two 2nd order equations, i.e. one real and the other imaginary and then were able to reduce the oder for these two equations. Right now we think that the Finit Difference method will work since we will not have to separate this equation and that we will not have deal we singularities.

The aboundry condition are: x(0)=0 and at x(1/2)=1.


Amos
 
Last edited:
Another suggestion.

It might not be too complicated to find some analytical solutions around the singularities. These solutions will depends only on a few integration constants. These special solution in these finite domains around the singularities can be integrated in the full Finite Difference system of equations and solve the problem as usual by solving the FD linear system.

I think it is rather logical to study the behaviour of the solutions in the vicinity of the singularities. An analytical approach can be used numerically and can also give further insight in the physics. A fully numerical approach means a numerical analysis of the singularity and implies a capable software.

You could also see what Mathematica can offer you. I can't tell you a lot about it because I own a very old version.

Michel
 
One more suggestion,

You could try a Fourier analysis.
You would have to pay for a bunch of FFT's and solving then a large system.

I also wondered if you were not dealing with an eignevalue problem.
Would the "nu" variable not be some evaluation of this eigenvalue?
If I am not mistaken, then you would need to solve the eigenvalue problem with some ad-hoc method (one eigenvalue or the full spectrum). And you could compare with your reference model. Solving the system with an approximate eigenvalue might not lead to the correct result.

Michel
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K