Posts

Calculus of complex-valued functions

Image
We briefly summarize the calculus of complex-valued functions with a real variable, which is needed to deal with differential equations and Fourier series. In the following, let \(g = g(x)\) be a complex-valued function with a real variable \(x\in \mathbb{R}.\) That is, \(g: \mathbb{R} \to \mathbb{C}\). In short, we can apply all the calculus of real-valued functions to complex-valued functions by treating the imaginary unit \(i=\sqrt{-1}\) as just another constant that happens to satisfy \(i^2 = -1\). Continuity \(g(x)\) is said to be continuous at \(x = x_0\) if \[\lim_{x\to x_0}g(x) = g(x_0)\] which is equivalent to \[\lim_{x\to x_0}|g(x) - g(x_0)| = 0,\] or, to \[\lim_{x\to x_0}\Re{g(x)} = \Re{g(x_0)}, ~~~\lim_{x\to x_0}\Im{g(x)} = \Im{g(x_0)}\tag{eq:Ccont}\] where \(\Re{g(x)}\) and \(\Im{g(x)}\) are the real and imaginary parts of \(g(x)\), respectively. According to (eq:Ccont), \(g(x)\) is continuous at \(x=x_0\) if and only if the real part \(\Re{g(x)}\) and the imaginary ...

First-order linear differential equations

Image
In this post, we'll see how we solve first-order linear differential equations. Consider the following first-order homogeneous linear differential equation \[y' +p(x)y = 0. \tag{Eq:homdiff}\]  By separating variables, we have \[\frac{dy}{y} = -p(x)dx.\] Integrating both sides gives \[\log|y| = -\int p(x)dx + c\] so that \[y = Ce^{-\int p(x)dx}\tag{Eq:homsol}\] where \(C\) is a constant. Example . Let's solve \[y' + 2y = 0.\] By separating variables, we have \[\frac{dy}{y} = -2dx.\] Integrating both sides, \[\log|y| = -2x + c.\] Exponentiating both sides, we have \[y = Ce^{-2x}.\] where \(C\) is a constant. □ Method of variation of parameters Next, consider the inhomogeneous differential equation \[y' + p(x)y + q(x) = 0.  \tag{Eq:inhomdiff}\] As we have learned in a previous post, we need to find one special solution to construct the general solution. How do we find a special solution? See also : Linear differential equations: Introduction Here's one way. This is...

Linear differential equations: Introduction

Image
Let \(q(x), p_0(x), p_1(x), \cdots, p_{n-1}(x)\) be functions of \(x\). The equation \[y^{(n)} + p_{n-1}(x)y^{(n-1)} + \cdots + p_1(x)y' + p_0(x)y + q(x) = 0\tag{Eq:linode}\] of an unknown function \(y = y(x)\) is called an \(n\)-th order linear differential equation . If \(q(x) = 0\), then (Eq:linode) is said to be homogeneous ; otherwise, it is said to be inhomogeneous . Let's rewrite (Eq:linode) using differential operators. Let \(D = \frac{d}{dx}\) denote the differential operator with respect to \(x\). That is, \(Dy = \frac{d}{dx}y = y'\) and \(D^ny = \frac{d^n}{dx^n}y = y^{(n)}\), etc. By combining these operators, we can define a new operator \(E\) by \[E = D^n + p_{n-1}(x)D^{n-1} + \cdots + p_1(x)D + p_0(x). \tag{eq:diffop}\] Then, (Eq:linode) is concisely denoted as \[Ey + q(x) = 0.\] Theorem (Linear combinations of solutions of a homogeneous linear ODE) Let \(y_1(x)\) and \(y_2(x)\) be functions. For any \(a, b \in \mathbb{R}\), the following holds: \[E(ay_1 + by_...

Exact differential equations

Image
Consider the differential equation of the form \[P(x,y)dx + Q(x,y)dy = 0 \tag{Eq:exact}\]  where \(P(x,y)\) and \(Q(x,y)\) are some bivariate functions. In this differential equation, the variables \(x\) and \(y\) have equal status (neither is an independent nor dependent variable). Thus, the solution should also be given as some equation of \(x\) and \(y\). If necessary, \(y\) may be interpreted as an implicit function of \(x\). The above differential equation (Eq:exact) is said to be an exact or total differential equation if there exists a function \(F(x,y)\) of class \(C^1\) such that \[\begin{eqnarray*} F_x(x,y) &=& P(x,y),\\ F_y(x,y) &=& Q(x,y). \end{eqnarray*}\] This function \(F(x,y)\) is called a potential function . Remark . Recall that \[\begin{eqnarray} F_x(x,y) &=& \frac{\partial F}{\partial x}(x,y),\\ F_y(x,y) &=& \frac{\partial F}{\partial y}(x,y). \end{eqnarray}\] □ As the following theorem shows, exact differential ...

Separable differential equations

Image
Separable differential equations are the simplest differential equations. They are of the following form: \[y' - f(x)g(y) = 0\] where \(f(x)\) is a function of \(x\) and \(g(y)\) is a function of \(y\). This equation can be formally rearranged into \[\frac{dy}{g(y)} = f(x)dx\] which can be integrated as \[\int\frac{dy}{g(y)} = \int f(x)dx.\] This method of solving differential equations is called the separation of variables . Example . Let us solve the differential equation \[y' = xy\]. If \(y = 0\) (constant), the given differential equation is clearly satisfied. Thus, \(y = 0\) is a solution. Next, suppose \(y \neq 0\). By separating variables, we have \[\frac{dy}{y} = xdx.\] Integrating both sides, \[\log y = \int\frac{dy}{y} = \int xdx = \frac{1}{2}x^2 + c\] where \(c\) is a constant. Thus, we have \[y = C e^{\frac{1}{2}x^2}\tag{Eq:egode}\] where we set \(C = e^c\). But this solution includes the case when \(y = 0\) (constant) if we set \(C = 0\). Thus, the general solutio...

Differential equations: Introduction

Image
An equation involving the derivatives of a (univariate) function \(y = y(x)\) of \(x\) is called an ordinary differential equation . That is, an ordinary differential equation (ODE) is an equation of the form \[F(x, y, y', \cdots, y^{(n)}) = 0\tag{Eq:ode}\] where \(F(x, z_0, z_1, \cdots, z_n)\) is a function of \((n+2)\) variables. If the highest order of the derivatives involved in a differential equation is \(n\), then it is called an \(n\)-th order (ordinary) differential equation. Example .  \(3y - xy' + 2(y')^2 = 0\) is a (non-linear) first-order differential equation. \(3y - xy' + 2y'' = 0\) is a (linear) second-order differential equation. □ If the function \(y = y(x)\) on an interval \(I\) satisfies (Eq:ode) for any \(x \in I\), that is, \[F(x, y(x), y'(x), \cdots, y^{(n)}(x)) = 0,\] then \(y = y(x)\) is said to be a solution of the differential equation (Eq:ode) on \(I\). Example . Consider the second-order differential equation \[y'' + y =...

Taylor series, Maclaurin series

Image
Suppose the function \(f(x)\) is of class \(C^\infty\) in the neighbor of \(x = a\). Then, we can define the following power series: \[\begin{eqnarray*} \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}t^n &=& \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n\\ &=&f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots \end{eqnarray*}\] where \(t = x - a\). If this power series has a positive radius of convergence, and the function defined by it matches \(f(x)\) in the neighbor of \(x = a\), we say the function \(f(x)\) is analytic . \(f(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n\) is called the Taylor series of \(f(x)\) at \(x=a\). A Taylor series at \(x = 0\) is called a Maclaurin series . Example . Let us define the function \(f(x)\) on the open interval \((a-r, a+r)\) by the following power series \[f(x) = \sum_{n=0}^{\infty}a_n(x-a)^n\tag{Eq:eg1}\] where \(r > 0\) is the radius of convergence of the pow...