2nd order ODE numerical solution

Click For Summary

Discussion Overview

The discussion revolves around the numerical solution of a second-order ordinary differential equation (ODE) given by y''(x) = ln(ln(x)) with the initial condition y(5) = 0. Participants explore the implications of having only one initial value and the challenges of integrating the equation analytically.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant questions the feasibility of solving the ODE with only one initial condition, suggesting that both y and y' are needed for a complete solution.
  • Another participant proposes that the equation can be integrated twice to express y as a function of constants, but acknowledges the need for additional conditions to determine these constants.
  • Concerns are raised about the integrability of the function ln(ln(x)), with some participants suggesting numerical methods like the Finite Element Method (FEM) as alternatives.
  • There is a suggestion to use integration by parts to derive y(x), but participants express uncertainty about the accuracy and feasibility of this approach without a complete set of initial conditions.
  • One participant notes discrepancies when applying FEM to simpler functions, indicating potential issues with the numerical method or the assumptions made.
  • Another participant emphasizes the necessity of a boundary condition for the derivative to fully solve the ODE, highlighting the limitations of the current setup.
  • A proposal is made to convert the second-order ODE into a system of first-order equations to facilitate numerical solutions, while reiterating the need for a derivative condition.

Areas of Agreement / Disagreement

Participants generally agree that the problem cannot be solved analytically due to the complexity of the integrals involved. However, there is no consensus on the best numerical approach or the necessity of additional initial conditions, leading to multiple competing views on how to proceed.

Contextual Notes

Participants note the dependence on initial conditions for the derivative and the challenges posed by the specific form of the ODE. The discussion reflects varying levels of familiarity with numerical methods and the implications of missing boundary conditions.

Who May Find This Useful

This discussion may be useful for individuals interested in numerical methods for solving differential equations, particularly those dealing with second-order ODEs and the implications of initial conditions in such contexts.

Pcmath
Messages
9
Reaction score
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
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).
 
But the integrand cannot be integrated in terms of elementary functions.

Or maybe you show the steps? Any help will be appreciated?
 
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:
Sorry I don't seem to get it. Can you show me the steps? It does not need to be accurate.
 
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}##.
 
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?
 
Maybe, you need to use more steps in order to get the exact solution/function.
 
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   Reactions: 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.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K