2nd order ODE numerical solution

In summary, the problem is that you need a derivative at some point in order to solve the equation for y(x).
  • #1
Pcmath
9
0
I would like to solve the following differential equation, it seems easy but only given one initial value.

y''(x) = ln(ln(x))
y(5) = 0
Solve for y(10)

I know it can be directly integrated but cannot be expressed in terms of elementary functions.

Most numerical method involves expressing the ODE in terms of first order ODE, but it need to have to initial value of y and also y'.

Is it even possible to solve this, given only y(5) = 0?
 
Physics news on Phys.org
  • #2
Hello,

As long as it says "solve for y(10)", you can integrate two times without using the initial values, so y=y(x,c1, c2).
In order to find c2, you will use x=5, y=y(5)=0. In order to express c1 as a function of y(10), you will use x=10, y=y(10).
 
  • #3
But the integrand cannot be integrated in terms of elementary functions.

Or maybe you show the steps? Any help will be appreciated?
 
  • #4
I didn't mean that you can solve it analytically (You must deal with ##\int \frac {dx} {lnx}## if you proceed and try to solve it with integration by parts)

However, as long as you have a 2nd order DE with y(5)=0, you can solve it (numerically) and get y as a function of x and y(10).

You can try to solve it numerically with FEM (Finite Element Method).
 
Last edited by a moderator:
  • #5
Sorry I don't seem to get it. Can you show me the steps? It does not need to be accurate.
 
  • #6
Pcmath said:
Sorry I don't seem to get it. Can you show me the steps? It does not need to be accurate.

If you don't know the finite element method, it is useless. Try to solve it analytically by parts and let the integrals with ##\frac {dx} {lnx}## in the solution or try to find them with wolfram alpha/with the help of a calculator.

I can show you how to start:

##\frac {dy} {dx} = \int ln(lnx) \, dx=\int (x)'ln(lnx)\, dx \Rightarrow \frac {dy} {dx} = [xln(lnx)]- \int x (ln(lnx))'\, dx \Rightarrow
\frac {dy} {dx} = [xln(lnx)]- \int x (\frac {\frac {1} {x}} {lnx})'\,dx=[xln(lnx)]-\int \frac {1} {lnx}\, dx + c_1##

Proceed to find y(x) this way (integration by parts) and show us your work please.

Finally, you will need the initial conditions and a calculator to get the values for the integrals ##\int \frac {dx} {lnx}##.
 
  • #7
I tried FEM method.

However, if I change ln(ln(x)) to a simple one that can be integrated easily, like x2, then I would get different answer if I use FEM (assuming the function cannot be integrated analytically) when compared to answer obtained by finding the function y(x) directly. What's the problem here?
 
  • #8
Maybe, you need to use more steps in order to get the exact solution/function.
 
  • #9
DoItForYourself said:
However, as long as you have a 2nd order DE with y(5)=0, you can solve it (numerically) and get y as a function of x and y(10).
You are still missing a boundary condition for the derivative. Some numerical methods will just assume y' at the starting point to be zero and start anyway.

By the way, a second order ode of the form y"(x)=f(x) can always be reduced to a first order ode by introducing the variable w=y', w'=y"
so you would have w'(x) = f(x)=log(log(x)), the solution is some exponential integral in your case.
You need a boundary condition for it though to completely solve it, or you will end up with an unknown integration constant. And this boundary condition is missing. As was said in post #2, you can still express y(10) in terms of the integration constant (or y'(5) )
 
  • Like
Likes DoItForYourself
  • #10
I propose, as suggested by bigfooted, to convert the equation to a system of to first-order differential equations. You can then use, e.g., Runge-Kutta method to solve the problem. However, for a unique solution you need a value for the derivative at some point. Alternatively, you can use Numerov's method to solve the 2nd order equation directly.
 

1. What is a 2nd order ODE?

A 2nd order ODE (ordinary differential equation) is a type of mathematical equation that involves a function and its first and second derivatives. It is commonly used to model physical systems, such as motion and growth.

2. What is a numerical solution for a 2nd order ODE?

A numerical solution for a 2nd order ODE is an approximation of the exact solution using numerical methods. This involves dividing the domain of the function into smaller intervals and using algorithms to calculate approximate values at specific points within those intervals.

3. Why is a numerical solution necessary for 2nd order ODEs?

In many cases, it is not possible to find an exact analytical solution for a 2nd order ODE. Therefore, a numerical solution is necessary to obtain an approximation of the solution that is accurate enough for practical purposes.

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

Some common numerical methods for solving 2nd order ODEs include Euler's method, Runge-Kutta methods, and the finite difference method. These methods vary in complexity and accuracy, and the choice of method depends on the specific problem being solved.

5. What are the advantages and disadvantages of using a numerical solution for 2nd order ODEs?

The main advantage of using a numerical solution is that it allows for a solution to be obtained even when an analytical solution is not possible. However, numerical solutions are not exact and can introduce errors, and they can also be computationally intensive depending on the method used.

Similar threads

  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
3
Views
2K
Replies
3
Views
795
  • Differential Equations
Replies
16
Views
899
  • Differential Equations
Replies
2
Views
995
Replies
24
Views
3K
  • Differential Equations
2
Replies
52
Views
834
Replies
3
Views
2K
  • Differential Equations
Replies
6
Views
2K
Back
Top