Month: August 2026

  • y” + (1-x) y= 0 (Part I)

    In this post we will solve the following basic second-order equation with corresponding initial condition:

    \displaystyle y'' + (1-x)y = 0, \quad y(0) = 1, \quad y'(0) = 0

    We rewrite the equation (inserting \epsilon):

    \displaystyle y'' + (1-\epsilon x)y = 0

    We expand y_{\epsilon}(x) as:

    \displaystyle y_{\epsilon}(x) = \sum_{n=0}^{\infty} a_n(x) \epsilon^n

    The differential equation becomes:

    \displaystyle y_{\epsilon}(x)'' + (1-\epsilon x)y_{\epsilon}(x) = 0
    \displaystyle \sum_{n=0}^{\infty} a_n''(x) \epsilon^n + (1-\epsilon x) \sum_{n=0}^{\infty} a_n(x) \epsilon^n = 0
    \displaystyle \sum_{n=0}^{\infty} a_n''(x) \epsilon^n + \sum_{n=0}^{\infty} a_n(x) \epsilon^n - x \sum_{n=0}^{\infty} a_n(x) \epsilon^{n+1} = 0
  • A nonlinear ODE (Part II)

    We could have directly solved the non-linear differential equation of the previous post exactly. This is now what we’re going to do, and we’ll be able to observe the equivalence between the exact solution and the corresponding perturbative series.

    \displaystyle y' + y + y^2 = 0
    \displaystyle y' = -(y + y^2)
    \displaystyle \frac{1}{y + y^2}\,dy = -\,dx
    \displaystyle \int \left(\frac{1}{y+y^2}\right) dy = - \int dx
    \displaystyle \int \frac{1}{y(1 + y)}\,dy = - \int dx
    \displaystyle \int \left(\frac{1}{y} - \frac{1}{1 + y}\right) dy = - \int dx
    \displaystyle \ln(y) - \ln(1 + y) = - x + C
    \displaystyle \frac{y}{y+1} = k e^{-x}
    \displaystyle \frac{y}{y + 1} - \frac{y+1}{y+1} = k e^{-x} -1
    \displaystyle - \frac{1}{y + 1} = k e^{-x} -1
    \displaystyle -\frac{1}{k e^{-x}-1} = y + 1
    \displaystyle y = \frac{-k e^{-x}}{k e^{-x}-1}

    Using the initial condition y(0) = 1 we have k=\frac{1}{2}. In a similar way, we can show that the exact solution to the perturbed differential equation :

    \displaystyle y' + y + \epsilon y^2 = 0

    is:

    \displaystyle y_{\epsilon} = \frac{-1}{\epsilon - \epsilon e^{x} - e^{x}}

    Which has the following Taylor series (in \epsilon) :

    \displaystyle \frac{-1}{\epsilon - \epsilon e^{x} - e^{x}} = e^{-x} - (e^{x}-1) e^{-2x} \epsilon + (e^{x}-1)^2 e^{-3x} \epsilon^2 + ...

    Which corresponds to the perturbative series derived previously

  • A nonlinear ODE (Part I)

    In this post we would like to solve the following non-linear first-order equation with corresponding initial condition:

    \displaystyle y' + y + y^2 = 0, y(0) = 1

    We rewrite the equation (inserting \epsilon):

    \displaystyle y' + y + \epsilon y^2 = 0

    and y(x)

    \displaystyle y_{\epsilon}(x) = \sum_{n=0}^{\infty} a_n(x) \epsilon^n

    The differential equation becomes:

    \displaystyle y' + y + \epsilon y^2 = 0
    \displaystyle \sum_{n=0}^{\infty} a_{n}'(x)\epsilon^{n} + \sum_{n=0}^{\infty} a_{n}(x)\epsilon^{n} + \epsilon\biggl(\sum_{k=0}^{\infty}\sum_{l=0}^{k}a_{l}(x) a_{k-l}(x)\epsilon^{k}\biggr) = 0

    Selecting the n-th term we have:

    \displaystyle a_n'(x) + a_n(x) + \sum_{k=1}^{n} a_{k-1} a_{n-k} = 0

    for n=0 we obtain:

    \displaystyle a_{0}'(x) + a_{0}(x) = 0
    \displaystyle a_{0}'(x) = - a_{0}(x)
    \displaystyle a_{0}(x) = e^{-x}

    for n=1 we obtain:

    \displaystyle a_{1}'(x) + a_{1}(x) + a_{0}^2(x) = 0
    \displaystyle a_{1}'(x) + a_{1}(x) + e^{-2x} = 0
    \displaystyle a_{1}'(x) = - a_{1}(x) - e^{-2x}

    which implies:

    \displaystyle a_{1}(x) = -e^{-x} + e^{-2x}

    Finally we have:

    \displaystyle y_{\epsilon}(x) = e^{-x} + (-e^{-x} + e^{-2x})\epsilon + ...

    This equation is related to the logistic equation, a classical model used in population dynamics to describe growth and decline. Here, the negative terms indicate that y(x) decreases over time and tends toward zero. The quadratic term adds a nonlinear effect to this decay. Similar equations can also be found in chemical kinetics and in other models involving nonlinear growth or decay.

  • Building the Sine Function Term by Term

    In this post we will solve the following basic second-order equation with corresponding initial conditions:

    \displaystyle y'' = -y, \qquad y(0) = 0, \qquad y'(0)=1

    This equation can be solved very easily exactly. The answer is y(x) = sin(x). Now, let’s pretend that we don’t know how to solve this equation exactly. We introduce a parameter \epsilon and consider the family of equations

    \displaystyle y'' = -\epsilon y
    \displaystyle y'' +\epsilon y = 0

    and the function y(x) in the form:

    \displaystyle y_{\epsilon}(x) = a_0(x) + a_1(x)\epsilon + a_2(x)\epsilon^2 + a_3(x)\epsilon^3 + ...
    \displaystyle y_{\epsilon}''(x) = a_0''(x) + a_1''(x)\epsilon + a_2''(x)\epsilon^2 + a_3''(x)\epsilon^3 + ...

    The differential equation becomes (up to three terms):

    \displaystyle y'' +\epsilon y = 0
    \displaystyle a_0''(x) + a_1''(x)\epsilon + a_2''(x)\epsilon^2 + a_3''(x)\epsilon^3 + \epsilon (a_0(x) + a_1(x)\epsilon + a_2(x)\epsilon^2 + a_3(x)\epsilon^3) = 0
    \displaystyle a_0''(x) + (a_1''(x) + a_0(x))\epsilon + (a_2''(x) + a_1(x))\epsilon^2 + (a_3''(x) + a_2(x)) \epsilon^3 = 0

    This implies that:

    \displaystyle a_0''(x) = 0 \implies a_0(x) = x
    \displaystyle a_1''(x) + x = 0 \implies a_1(x) = -\frac{1}{3!}x^3
    \displaystyle a_2''(x) -\frac{1}{3!}x^3 = 0 \implies a_2(x) = \frac{1}{5!}x^5
    \displaystyle a_3''(x) +\frac{1}{5!}x^5 = 0 \implies a_3(x) = -\frac{1}{7!}x^7

    and

    \displaystyle y_{\epsilon}(x) = x -\frac{1}{3!}x^3 \epsilon + \frac{1}{5!}x^5 \epsilon^2 - \frac{1}{7!}x^7 \epsilon^3

    Setting \epsilon =1 to recover the original problem leads to:

    \displaystyle y_{\epsilon}(x) = x -\frac{1}{3!}x^3 + \frac{1}{5!}x^5 - \frac{1}{7!}x^7

    which corresponds to the first terms of the Taylor series of sin(x) (the exact solution).