Left to Solve
Problems / MathOverflow (not formalized)

Problem using finite difference to solve a initial value problem

Open, not yet stated in LeanMathOverflow (not formalized)Real Functionsdifficulty55/100

Statement

I tried to use 'finite difference' method to solve an Initial Value Problem (IVP). For the two boundaries I used periodical condition and for the differential operators I used 4th degree center approximations. But as result, I got this thing. Where comes this strange oscillation What do you think could be the problem. Should I use a smaller x step size? Will use a forward approximation help? Thanks. Actually I am using Matlab's odes15s.

The strange thing is that, if I use a bigger x stepsize, say 0.1, I will get a smooth result. With s step size 0.06, I will get the result showed in the picture. I tried ode45, which is based on an explicit Runge-Kutta (4,5) formula, the Dormand-Prince pair and ode23tb, which is an implementation of TR-BDF2. I got the same result.

\begin{aligned} \dot{q} & = -\frac{\partial (6*q^2/5*h)}{\partial x}-\frac{3*q}{h^2}+h*h'''-(1+10*cos(pi*t))*h*h'\\ \end{aligned}

\begin{aligned} \dot{h} & = -\frac{\partial q}{\partial x} \end{aligned}

\begin{aligned} h(t,0) = h(t,10),q(t,0) = q(t,10) \end{aligned}

, are known.

Posed by gstar2002 · finite-differences, na.numerical-analysis, differential-equations

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-103137.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-103137.lean

import Mathlib

/-!
# Problem using finite difference to solve a initial value problem

Source: https://mathoverflow.net/questions/103137
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_103137

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_103137