[Cymraeg]

Second order

To solve a second-order ODE with constant coefficients: $a_2\frac{{\rm d}^2y}{{\rm d}x^2}+a_1\frac{{\rm d}y}{{\rm d}x}+a_0y=0$,
divide by the highest-order coefficient: $\frac{{\rm d}^2y}{{\rm d}x^2}+\frac{a_1}{a_2}\frac{{\rm d}y}{{\rm d}x}+\frac{a_0}{a_2}y=0$,
and factor out the $y$: $\left(\frac{{\rm d}^2}{{\rm d}x^2}+\frac{a_1}{a_2}\frac{{\rm d}}{{\rm d}x}+\frac{a_0}{a_2}\right)y=0$,

The LHS is zero either if $y=0$, which isn't generally true as it's the dependent variable, or if the bracket expression is zero. Finding the roots of the bracket expression is entirely analogous to solving a polynomial equation of second order: The roots of the equation $x^2+px+q=0$, which can be factorised as $(x+k_1)(x+k_2)=0$, are $k_{1,2}=-\frac{p}{2}\pm\sqrt{\frac{p^2}{4}-q}$.

In the same way, the roots of $\frac{{\rm d}^2}{{\rm d}x^2}+\frac{a_1}{a_2}\frac{{\rm d}}{{\rm d}x}+\frac{a_0}{a_2}=0$
are $-\frac{a_1}{2a_2}\pm\sqrt{\frac{a_1^2}{4a_2^2}-\frac{a_0}{a_2}}$.
The ODE becomes $\left(\frac{{\rm d}}{{\rm d}x}-\frac{a_1}{2a_2}+\sqrt{\frac{a_1^2}{4a_2^2}-\frac{a_0}{a_2}}\right)\left(\frac{{\rm d}}{{\rm d}x}-\frac{a_1}{2a_2}-\sqrt{\frac{a_1^2}{4a_2^2}-\frac{a_0}{a_2}}\right)y=0$,
or, by renaming the constants, $\left(\frac{{\rm d}}{{\rm d}x}-k_1\right)\left(\frac{{\rm d}}{{\rm d}x}-k_2\right)y=0$,
where $k_{1,2}=-\frac{a_1}{2a_2}\pm\sqrt{\frac{a_1^2}{4a_2^2}-\frac{a_0}{a_2}}$.

Although operators in general aren't commutative, the order in which the two operators (bracket terms) are applied to $y$ does not matter in this case because they only differ in a constant factor, which doesn't affect differentiation. This is why this technique requires constant coefficients: If they were functions of $x$ instead, the two operators would no longer commute, and the analogy with polynomial equations would break down. Because the order in which the two operators are applied doesn't matter, we can split up the 2nd-order equation in two separable 1st-order ones:

First operator: $\frac{{\rm d}y}{{\rm d}x}-k_1y=0$, and second operator: $\frac{{\rm d}y}{{\rm d}x}-k_2y=0$.
Separate: $\frac{1}{y}{\rm d}y=k_1{\rm d}x$ - $\frac{1}{y}{\rm d}y=k_2{\rm d}x$,
integrate: $\ln{y}=k_1x$ - $\ln{y}=k_2x$,
and solve for $y$: $y_1={\rm e}^{k_1x}$ - $y_2={\rm e}^{k_2x}$.
The general solution of the original ODE: $a_2\frac{{\rm d}^2y}{{\rm d}x^2}+a_1\frac{{\rm d}y}{{\rm d}x}+a_0y=0$
is any linear combination of the two: $y=c_1{\rm e}^{k_1x}+c_2{\rm e}^{k_2x}$,
where $k_{1,2}=-\frac{a_1}{2a_2}\pm\sqrt{\frac{a_1^2}{4a_2^2}-\frac{a_0}{a_2}}$.

Note that $k_{1,2}$ may be complex.

Higher order

Linear ODE with constant coefficients of higher order can be solved following the same principle. The number of 1st-order ODEs to be solved is equal to the order of the original equation. The corresponding constants $k_{1,2,3,\dots}$ are found by finding the roots of the associated auxiliary polynomial.

Armed with that, we can return to solving Laplace's equation.

At this point, you may want to try the second worksheet. Check your solutions when you've finished.