Numerical Solution for ODE with Critical Point: A General Procedure Guide

In summary, the conversation discusses solving a numerically ODE with a "critical point," or a singular point. One suggestion is to define the integrand as 1 for the critical point, and another suggestion is to explore the behavior near the critical point and check for stability using methods such as Lyapunov's criteria. Additionally, it is mentioned that the system can be represented as a special case of Pfaff's PDE in 3D. The conversation concludes with a request for literature on this topic.
  • #1
Vrbic
407
18
Hello,
can someone advise me how to solve numerically ODE which consist of function with "critical point" (Im not sure if it is good definition)? I mean for example this one:
[itex]y'(x)=\frac{\sin{x}}{x}[/itex], where in x=0 has function a "problem". I know that limit ->1 but in numerical solutions it blows up.
I know that for example Mathematica can do that analytically but I would like to know general procedure for this issue.
Thank you for your comments or advices.
 
Physics news on Phys.org
  • #2
Writting polynomial expansion of sin x , than integrating term by term is one way.
 
  • #3
zoki85 said:
Writting polynomial expansion of sin x , than integrating term by term is one way.
Ou, nice and easy idea :) Can you think of another way?
I have system of two eq. and problem is coming from zero in denominator subtracting these unknowns... [itex]x'(r)=\frac{f(x(r),y(r),r)}{x(r)-y(r)}, y'(r)=\frac{g(x(r),y(r),r)}{x(r)-y(r)}[/itex]. Any idea? :)
And thank you for reply ;)
 
  • #4
Vrbic said:
I have system of two eq. and problem is coming from zero in denominator subtracting these unknowns... [itex]x'(r)=\frac{f(x(r),y(r),r)}{x(r)-y(r)}, y'(r)=\frac{g(x(r),y(r),r)}{x(r)-y(r)}[/itex]. Any idea? :)
And thank you for reply ;)
I'm affraid I don't understand meaning of notation you used here. Why don't you write instead of f(x(r),y(r),r) and g(x(r),y(r),r) just f(r) and g(r)?
 
  • #5
zoki85 said:
I'm affraid I don't understand meaning of notation you used here. Why don't you write instead of f(x(r),y(r),r) and g(x(r),y(r),r) just f(r) and g(r)?
I wanted to emphasize that there are unknown functions and I am not able to carry any trick like expansion. Exact form of equation is here https://www.physicsforums.com/threa...umerical-solution-with-critical-point.783090/ but no comments. I wrote it probably in wrong way so I am trying step by step find how to solve it.
 
  • #6
Vrbic said:
Hello,
can someone advise me how to solve numerically ODE which consist of function with "critical point" (Im not sure if it is good definition)?

The word you're are looking for is "singular point."

The integrand [itex] \frac{\sin{x}}{x} [/itex] has a removable singularity. We can get around it by defining [itex] \frac{\sin{x}}{x} =1 [/itex] for x=0 . This insight comes from observing the limiting behavior for small [itex] x [/itex] . Integrating the Taylor series term by term works for small x but fails miserably for x>1.
What are the functions [itex] f\left(x,y,r\right) [/itex] and [itex] g\left(x,y,r\right)[/itex]. There are a number of "tricks" that allow you to treat different kinds of singularities. But different tricks work for different kinds of singular points.
 
  • #7
the_wolfman said:
The word you're are looking for is "singular point."

The integrand [itex] \frac{\sin{x}}{x} [/itex] has a removable singularity. We can get around it by defining [itex] \frac{\sin{x}}{x} =1 [/itex] for x=0 . This insight comes from observing the limiting behavior for small [itex] x [/itex] . Integrating the Taylor series term by term works for small x but fails miserably for x>1.
Ah, yes it is clear. Thank you for a comment.

What are the functions [itex] f\left(x,y,r\right) [/itex] and [itex] g\left(x,y,r\right)[/itex]. There are a number of "tricks" that allow you to treat different kinds of singularities. But different tricks work for different kinds of singular points.

[itex]u'=\frac{D_1}{D}[/itex]
[itex]\rho'=\frac{D_2}{D}[/itex], where [itex]D_1=\frac{2a^2/r-\alpha/r^2}{\rho}[/itex], [itex]D_2=\frac{2u^2/r-\alpha/r^2}{u}[/itex] and [itex]D=\frac{u^2-a^2}{\rho u}[/itex], where [itex]a(r)=a_0\big(\frac{\rho(r)}{\rho_0}\big)^{(\Gamma-1)/2}[/itex], [itex]\rho(r)[/itex] and [itex]u(r)[/itex] are function of r and [itex]\Gamma, a_0, \rho_0, \alpha[/itex] are constant.[itex][/itex]

This is the system. Here is described all this problem: https://www.physicsforums.com/threa...umerical-solution-with-critical-point.783090/
Thank you again.
 
  • #8
Vrbic said:
Ou, nice and easy idea :) Can you think of another way?
I have system of two eq. and problem is coming from zero in denominator subtracting these unknowns... [itex]x'(r)=\frac{f(x(r),y(r),r)}{x(r)-y(r)}, y'(r)=\frac{g(x(r),y(r),r)}{x(r)-y(r)}[/itex]. Any idea? :)
And thank you for reply ;)
Ok then. Without getting into mess of other thread, here is what I can say. This is a system of differential equation (generally, a nonlinear one):

dx/dr = G(x,y,r)/z(x,y)
dy/dr = F(x,y,r)/z(x,y)
where z(x,y)= x-y

For behaviour near singularity you must specify or explore what's going on when z(x,y) → 0. Also explore if there is a stability issue for solutions to the system ( for instance, check Lyapunov's criteria etc). And for z(x,y) ≠ 0 the system yields equation F(x,y,r)⋅dx - G(x,y,r)⋅dy = 0 which is a special case of well known Pfaff's PDE in 3D: P(x,y,z)⋅dx + Q(x,y,z)⋅dy +T(x,y,z)⋅dz =0

Regards
 
Last edited:
  • #9
zoki85 said:
Ok then. Without getting into mess of other thread, here is what I can say. This is a system of differential equation (generally, a nonlinear one):

dx/dr = G(x,y,r)/z(x,y)
dy/dr = F(x,y,r)/z(x,y)
where z(x,y)= x-y

For behaviour near singularity you must specify or explore what's going on when z(x,y) → 0. Also explore if there is a stability issue for solutions to the system ( for instance, check Lyapunov's criteria etc). And for z(x,y) ≠ 0 the system yields equation F(x,y,r)⋅dx - G(x,y,r)⋅dy = 0 which is a special case of well known Pfaff's PDE in 3D: P(x,y,z)⋅dx + Q(x,y,z)⋅dy +T(x,y,z)⋅dz =0

Regards
Ou thank you very much. And what about z(x,y)=0. What possibilities are? And could you give me a reference to literature which concern in this problems or something like that. Thank you very very much ;)
 
  • #10
Vrbic said:
And what about z(x,y)=0. What possibilities are? And could you give me a reference to literature which concern in this problems or something like that. Thank you very very much ;)
For z(x,y)=0 you have to explore at line y=x : If G≠0,F≠0 than "asymptotic" cases. If G=0 or/and F=0 than "0/0" cases to check .
Since you can't exactly solve your nonlinear system you should linearize it. Here is instructional video how to do it.
And for probing system stability see this paper . Treating all the variables like they are independent (via Pfaffian) sometimes may help to explore behaviour of system too . Many things depend on form of the functions F, G.
 
  • #11
zoki85 said:
For z(x,y)=0 you have to explore at line y=x : If G≠0,F≠0 than "asymptotic" cases. If G=0 or/and F=0 than "0/0" cases to check .
Since you can't exactly solve your nonlinear system you should linearize it. Here is instructional video how to do it.
And for probing system stability see this paper . Treating all the variables like they are independent (via Pfaffian) sometimes may help to explore behaviour of system too . Many things depend on form of the functions F, G.
Thank you again, understand.
Im looking for solution which is in "0/0". In my def. of function I am looking specially for case when "my" D=D1=D2=0 and (I mean) it is "smooth" solution.
I check your links.
 

Related to Numerical Solution for ODE with Critical Point: A General Procedure Guide

1. What is a numerical solution for ODE?

A numerical solution for ODE (ordinary differential equation) is a method of approximating the solution to a differential equation using numerical calculations. This is often necessary when there is no analytical solution available or when the equation is too complex to solve by hand.

2. What are some common numerical methods used for solving ODEs?

Some common numerical methods for solving ODEs include Euler's method, Runge-Kutta methods, and finite difference methods. Each method has its own advantages and limitations, so the choice of method depends on the specific problem at hand.

3. How accurate are numerical solutions for ODEs?

The accuracy of a numerical solution for an ODE depends on several factors, such as the chosen method, the step size used in the calculations, and the complexity of the equation. Generally, the accuracy increases as the step size decreases, but this also increases the computational time.

4. Can numerical solutions be used for all types of differential equations?

No, numerical solutions are not suitable for all types of differential equations. They are most commonly used for first-order equations, but they can also be applied to some higher-order equations. However, for stiff equations or those with discontinuities, other methods such as numerical integration may be more appropriate.

5. How can I check the accuracy of a numerical solution for an ODE?

To check the accuracy of a numerical solution, you can compare it with an analytical solution, if available. If not, you can vary the step size and see how it affects the solution. Additionally, there are mathematical techniques for estimating the error in a numerical solution, such as Richardson extrapolation or the Runge-Kutta-Fehlberg method.

Similar threads

Replies
24
Views
3K
  • Differential Equations
Replies
9
Views
2K
  • Differential Equations
Replies
8
Views
3K
  • Differential Equations
Replies
5
Views
1K
Replies
14
Views
2K
  • Differential Equations
Replies
8
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Differential Equations
Replies
4
Views
2K
  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
3
Views
2K
Back
Top