# Differential equations (DEQ): Important basics + 4 solving methods Level 3 requires the basics of vector calculus, differential and integral calculus. Suitable for undergraduates and high school students.
Content of the lesson

For example, if you plan to deal with...

• the atomic world,

• the movement of the planets,

• chemical processes,

• electrical circuits,

• weather forecasts

• or with the spread of a virus

then you will eventually encounter so-called differential equations.

Once you understand how differential equations work and how to solve them, you will be able to see into the past and into the future. In this lesson you will learn the basics for it.

## What is a differential equation?

Let's look at Hooke's Law as a simple example:

Hooke's Law
Formula anchor

This law describes the restoring force $$F$$ on a mass attached to a spring. The mass experiences this force when you displace it by the distance $$y$$ from the equilibrium position. $$D$$ is a constant coefficient that describes how hard it is to stretch or compress the spring.

The mass $$m$$ is hidden in the force. We can write the force according to Newton's second law as $$m \, a$$:

Newton axiom equal to Hooke's law
Formula anchor

Here $$a$$ is the acceleration that the mass experiences when it is displaced by the distance $$y$$ from its rest position. As soon as you pull on the mass and release it, the spring will start swinging back and forth. Without friction, as in this case, it will never stop swinging.

While the mass oscillates, the displacement $$y$$ changes. The displacement is therefore dependent on the time $$t$$. Thus also the acceleration $$a$$ depends on the time $$t$$. The mass of course remains the same at any time, no matter how much the spring is displaced. This is also true in good approximation for the spring constant $$D$$:

Newton axiom equal to Hooke's law with time dependence
Formula anchor

If we now bring $$m$$ to the other side, we can use this equation to calculate the acceleration experienced by the mass at each displacement $$y$$:

Acceleration using Newton's axiom and Hooke's law
Formula anchor

But what if we are interested in the question:

At which displacement $$y$$ will the spring be after 24 seconds?

To be able to answer such a future question, we must know how exactly $$y$$ depends on the time $$t$$. We only know that $$y$$ DOES depend on time, but not HOW.

And exactly when dealing with such future questions differential equations come into play. We can easily show that the acceleration $$a$$ is the second time derivative of the distance traveled, so in our case it is the second derivative of $$y$$ with respect to time $$t$$:

Second time derivative of the deflection - differential equation for the spring law
Formula anchor

Now we have set up a differential equation for the displacement $$y$$! You can recognize a differential equation (in short: DEQ) by the fact that in addition to the searched function $$y(t)$$ it also contains derivatives of this function. Like in this case the second derivative of $$y$$ with respect to time $$t$$.

## Different notations of a differential equation

You will certainly encounter many notations of a differential equation. We have written down our differential equation 1.4 in the so-called Leibniz notation:

Leibniz notation
Formula anchor

You will often encounter this notation in physics. We can also write it down a bit more compactly without mentioning the time dependence:

Formula anchor

If the function $$y$$ depends only on the time $$t$$, then we can write down the time derivative even more compactly with the so-called Newton notation. One time derivative of $$y$$ corresponds to one point above $$y$$. So if there is a second time derivative as in our case, there will be two points:

Newton notation
Formula anchor

Obviously, this notation is rather unsuitable if you want to consider the tenth derivative...

Another notation you are more likely to encounter in mathematics is the Lagrange notation. Here we use primes for the derivatives. So for the second derivative, two primes:

Lagrange notation
Formula anchor

In Lagrange notation, it should be clear from the context, with respect to which variable the function is differentiated. If it is not clear, then you should write out explicitly on which variables $$y$$ depends:

Spring law-DEQ in Lagrange notation
Formula anchor

Each notation has its advantages and disadvantages. However, remember that these are just different ways of writing down the same physics. Even rearranging and renaming does not change the physics under the hood of this differential equation. We could call the deflection $$y$$ for example also as $$x$$:

Spring law-DGL in Lagrange notation all moved to one side
Formula anchor

## What should I do with a differential equation?

At which displacement $$y$$ will the spring be after 24 seconds?

we must solve the posed differential equation. Solving a differential equation means that you have to find out how the function $$y$$ you are looking for exactly depends on the variable $$t$$:

Searched function in a DGL
Formula anchor

For simple differential equations, like the one of the oscillating mass, there are solving methods you can use to find the function $$y(t)$$. Keep in mind, however, that there is no general recipe for how you can solve an arbitrary differential equation. For some differential equations there is not even an analytic solution! Here the expression 'not analytic' means that you cannot write down a concrete equation for the function $$y(t)$$:

No solution of the DGL
Formula anchor

The only possibility in this case is to solve the differential equation on the computer numerically. Then the computer does not spit out a concrete formula, but data points, which you can represent in a diagram and then analyze the behavior of the differential equation.

## How to identify a differential equation?

Once you encounter a differential equation, the first thing you need to figure out is

• which one is the function you are looking for

• and which variables it depends on.

In our differential equation 5 of the oscillating mass, the function we are looking for is called $$y$$ and it depends on the variable $$t$$:

Hooke Law-DEQ
Formula anchor

As another example, look at the wave equation that describes the electric field of an electromagnetic wave propagating at the speed of light $$c$$:

Wave equation-DEQ for the E-field
Formula anchor

What is the function you are looking for in this differential equation? It is the function $$E$$, because its derivatives occur here. On which variables does the function $$E$$ depend? The dependence is not explicitly given here but from the derivatives you can immediately see that $$E$$ must depend on $$x$$, $$y$$, $$z$$ and on $$t$$. That is, on a total of four variables: $$E(t,x,y,z)$$.

Let's look at a slightly more complex example. This system of differential equations describes how a mass moves in a three dimensional gravitational field:

DEQ for the motion of a mass point in the gravitational field
Formula anchor

Here you have a so-called coupled differential equation system. In this case a single differential equation is not sufficient to describe the motion of a mass in the gravitational field. In fact, three functions are searched here, namely the trajectories $$x(t)$$, $$y(t)$$ and $$z(t)$$, which determine a position of the mass in three-dimensional space. Each function describes the motion in one of the three spatial directions. And all three trajectories depend only on the time $$t$$.

What does it even mean, if we have coupled differential equations? The word 'coupled' means that, for example, in the first differential equation for the function $$x$$, there is also the function $$y$$. So we cannot simply solve the first differential equation independently of the second one, because the second equation tells us how $$y$$ behaves in the first equation. In all three differential equations, all of the searched functions $$x$$, $$y$$ and $$z$$ occur, which means that we have to solve all three differential equations simultaneously.

## Classification: Which DEQ types are there?

There are various types of differential equations out there. However, if you look closely, you will notice that some differential equations have similarities between them.

After you have found out what function you are searching for and which variables it depends on, you should answer some more basic questions to get to know the differential equation better:

• Is the differential equation ordinary or partial?
Partial differential equations describe multidimensional problems and are significantly more complex.

• Of which order is the differential equation?
1st order differential equations are usually easy to solve and describe, for example, exponential behavior such as radioactive decay or the cooling of a liquid. Differential equations of 2nd order, on the other hand, are somewhat more complex and also often occur in nature. Maxwell's equations of electrodynamics, Schrödinger's equation of quantum mechanics - these are all 2nd order differential equations. Only starting from the 2nd order a differential equation can describe an oscillation. And only starting from the third order a differential equation can describe chaos.

• Is the differential equation linear or non-linear?
The superposition principle applies to linear differential equations, which is incredibly useful, for example, in the description of electromagnetic phenomena. Non-linear differential equations are much more complex and occur, for example, in non-linear electronics in the description of superconducting currents. Moreover, chaos can only occur in non-linear differential equations of third order and higher. When you encounter such an equation sometimes the only thing you can do is throw away your pen and paper and solve the equation numerically on the computer. Many non-linear differential equations cannot even be solved analytically!

• Is the linear differential equation homogeneous or inhomogeneous?
Homogeneous linear differential equations are simpler than the inhomogeneous ones and describe, for example, an undisturbed oscillation, while inhomogeneous differential equations are also able to describe externally disturbed oscillations.

After you have classified a differential equation, you can then specifically apply an appropriate method to solve the equation. Even if there is no specific solving method, you will know how complex a differential equation is based on the classification.

### Is a differential equation ordinary or partial?

Our equation for the oscillating mass:

Formula anchor

is an ordinary differential equation. Ordinary means that the function $$y(t)$$ we are looking for only depends on one variable. In this case on the time $$t$$.

The wave equation, on the other hand:

Formula anchor

is a partial differential equation. 'Partial' means that the searched function $$E$$ depends on at least two variables and derivatives with respect to these variables occur in the equation. In this case $$E$$ depends on four variables: $$t$$, $$x$$, $$y$$ and $$z$$. And in the differential equation also derivatives with respect to these variables appear.

### Of which order is a differential equation?

Furthermore our equation for the oscillating mass is a differential equation of 2nd order. The order of a differential equation is the highest occurring derivative of the searched function:

Formula anchor

Since in our equation the second derivative of $$y$$ is the highest one, this is therefore the 2nd order differential equation.

Convert higher order DEQ's into 1st order DEQ's
It is always possible to convert a higher order differential equation into a system of 1st order differential equations. Sometimes this procedure is helpful in solving the differential equations. For example, we can convert this 2nd order differential equation into two coupled 1st order differential equations. For this we just have to introduce a new function, let's call it $$v$$ and define it as the first time derivative of $$y$$:

Velocity as time derivative of the displacement is a first order DEQ
Formula anchor

This is already one of the two 1st order DEQ. Now we only have to express the second derivative in the original DEQ with the derivative of $$v$$. Then we get the second DEQ of 1st order:

First order DEQ for Hooke's law
Formula anchor

The two equations are coupled differential equations, which we must solve simultaneously. They are coupled because both $$y$$ and $$v$$ occur in the first DEQ as well as in the second DEQ. You can use this procedure whenever you want to reduce the order of a differential equation. The price you have to pay is additional coupled differential equations.

The differential equation for the radioactive decay law,

Formula anchor

on the other hand, is a first-order differential equation because the highest occurring derivative of the searched function $$N(t)$$ is the first derivative.

### Is a differential equation linear or non-linear?

Moreover, our equation for the oscillating mass is linear:

Formula anchor

Linear means that the searched function and its derivatives contain only powers of 1 and there occur no products of derivatives with the function, like $$y^2$$ or $$y \, \frac{\text{d}^2y}{\text{d}t^2}$$. There also occur no composed functions, such as $$\sin(y(t))$$ or square root of $$y(t)$$.

The radioactive decay law is also linear:

Formula anchor

What about the wave equation? It is also linear:

Formula anchor

The coupled differential equation system for the motion of a mass in the gravitational field, on the other hand, is non-linear:

Example of a non-linear DEQ - mass in the gravitational field
Formula anchor

Here the searched functions $$x(t)$$, $$y(t)$$ and $$z(t)$$ occur in quadratic form. But even if the squares were not there, there would still be the square root and the fraction, which make the differential equation system non-linear!

### Is a linear differential equation homogeneous or inhomogeneous?

In the next types of differential equations the coefficients multiplied by the searched function and its derivatives are important. In some solving methods it is important to distinguish between...

• constant coefficients - do NOT depend on the variables on which the searched function also depends.

• non-constant coefficients - do DEPEND on the variables on which the searched function depends.

A coefficient must not necessarily be multiplied with the searched function or its derivative. It can also stand alone! In this case we call the single coefficient a perturbation function.

In our differential equation for the oscillating mass there is an interesting coefficient which is multiplied by the searched function $$y$$, namely $$D/m$$. Strictly speaking, there is also a coefficient in front of the second derivative, namely 1, and the single coefficient, i.e. the perturbation function, is 0 here. So it does not exist:

Formula anchor

The wave equation is also homogeneous:

Formula anchor

Because here there is also no single coefficient, the perturbation function is zero.

The differential equation for a forced oscillation, on the other hand, is inhomogeneous:

Example of an inhomogeneous DEQ - Forced oscillation
Formula anchor

Here the external force $$F(t)$$ corresponds to the perturbation function. As you can see, it stands alone without being multiplied by the function $$y(t)$$ or its derivatives. Moreover, the perturbation function $$F(t)$$ is time dependent, so it is a non-constant coefficient.

## Constraints: Boundary and initial conditions

A differential equation alone, is not sufficient to describe a physical system uniquely. The solution of a differential equation describes quite a few possible systems that have a certain behavior. For example, the solution of the radioactive decay law describes an exponential behavior. However, the knowledge about an exponential behavior is not sufficient to be able to say concretely how many atomic nuclei have decayed after 10 seconds.

This is exactly why for every differential equation there are usually given constraints. These are additional information, which must be given to a differential equation, in order to specify the solution of the equation. The number of necessary constraints depends on the \textit{order} of the differential equation.

For a 1st order differential equation, a single constraint is necessary, namely

• a function value of the searched function $$y(t)$$.

For the radioactive decay law, for example, it should be stated how many not yet decayed atomic nuclei $$N$$ were present at the time $$t = 0$$. For example one 1000 atomic nuclei: $$N(0) = 1000$$.

For a 2nd order differential equation two constraints are necessary:

• a function value of the searched function $$y(t)$$ and

• for example a function value of the first derivative $$y'(t)$$

For an oscillating mass, the function value could be $$y(0) = 1$$, which sets the initial displacement, and the function value of the first derivative could be $$y'(0) = 0$$, which sets the initial velocity of the mass.

For a 3rd order differential equation then three constraints would be necessary to describe a system uniquely:

• a function value of the searched function $$y(t)$$

• a function value for example of its first derivative $$y'(t)$$ and

• a function value for example of its second derivative $$y''(t)$$

For a 4th order differential equation then four constraints would be necessary and so on...

Most of the time you will come across the so-called initial conditions and boundary conditions. These are also just names for constraints that tell you what kind of information you have about the system.

Sometimes, for example, you know in which state the system was at a certain time. This could be the initial time at which you displaced and released a mass on a spring. In such a case we speak of initial conditions. You specify at one certain point in time, for example at time $$t=0$$, wich value the displacement $$y(0)$$ had. And since we need two constraints, you also specify which value the derivative $$y'(0)$$ (that is the velocity) had at that same point in time $$t = 0$$.

Sometimes you are unlucky and do not know the velocity of the oscillating mass at a certain initial time $$t = 0$$. So you don't know the derivative of $$y'(0)$$ at the time $$t = 0$$, at which you also know the displacement $$y(0$$. But you really need two constraints, otherwise you can't calculate concrete numbers... But maybe you know that for example after $$t = 6 \, \text{s}$$ the oscillating mass was in the maximum displaced state. So you know the displacement $$y(6)$$.

If you have constraints, such as $$y(t_1)$$ and $$y(t_2)$$, given to describe the system at two \textit{different} points in time $$t_1$$ and $$t_2$$, then we call them boundary conditions.

The 'function values at two different points in time' was of course just an example. Instead of time, it could be any variable that fixes the system at the boundaries. At different times, at different positions, at different angles and so on.

So far so good. Now let's look at four methods with which you can solve simple differential equations.

## Solving method #1: Separation of variables Illustration : Separation of variables is suitable for ordinary 1st order DEQ's which are homogeneous.

The method of separation of variables is suited for:

• ordinary DEQ of 1st order,

• which is linear

• and homogeneous.

Remember that if a DEQ is homogeneous, it is also linear. This type of DEQ has the form:

Form of a homogeneous linear DGL
Formula anchor

Here the coefficient $$K$$ must not necessarily constant, but can also depend on $$x$$! Also note that before the first derivative $$y'$$ the coefficient must be equal to 1. If this is not the case for you, then you simply have to divide the whole equation by the coefficient which is in front of $$y'$$. Then you have the right form.

In this solving method, $$y$$ and $$x$$ are considered as two variables and separated from each other by bringing $$y$$ to one side and $$x$$ to the other side of the equation. The Leibniz notation of the differential equation is best suited for this purpose:

Form of a homogeneous linear DEQ in Leibniz notation
Formula anchor

Bring $$K(x)\,y$$ to the right hand side:

Formula anchor

Multiply the equation by $$\text{d}x$$ and then divide the equation by $$y$$. This way you have only $$y$$ dependence on the left side and only $$x$$ dependence on the right side:

Formula anchor

Now you can integrate over $$y$$ on the left hand side and over $$x$$ on the right hand side:

Formula anchor

Integrating $$1 / y$$ gives the natural logarithm of $$y$$. It's best to know this by heart, because you will often encounter such an integral. Also, don't forget the integration constant! Let's call it $$A$$ for example:

Formula anchor

Now you have to solve for the function $$y$$. Use the exponential function $$\mathrm{e}^{...}$$ on both sides:

Formula anchor

You can split the sum in the exponential term on the left into a product, where $$\mathrm{e}^{\ln(y)}$$ is simply $$y$$:

Formula anchor

Bring the constant $$\mathrm{e}^{A}$$ to the right side:

Formula anchor

and rename the coefficient to a new constant $$C$$.

As a result, you get a general solution formula that you can always use to solve homogeneous linear differential equations. You don't have to apply the separation of variables method again and again, but you can use the solution formula directly:

Solution formula for ordinary homogeneous DEQ of 1st order
Formula anchor

## Lösungsmethode #2: Variation der Konstanten (VdK) Illustration : Variation of constants is suitable for ordinary 1st order DGL which are inhomogeneous.

The method of variation of constants is well suited for:

• ordinary DGL of first order

• which are linear

• and inhomogeneous.

The homogeneous DEQ is a special case of the inhomogeneous DEQ, therefore the variation of constants method is also suitable for homogeneous DEQ. You have this type of differential equation if you can put your differential equation into the following form:

Formula anchor

The inhomogeneous version differs from the homogeneous one only in the single coefficient, that is the perturbation function $$S(x)$$ is not zero. Thus, this type of differential equation is somewhat more difficult to solve.

In this solving method, you make the ansatz that the general solution $$y(x)$$ is given by a coefficient $$C(x)$$ that depends on $$x$$, multiplied by a homogeneous solution that we denote as $$y_{\text h}(x)$$:

Formula anchor

You have already learned how to find the homogeneous solution $$y_{\text h}$$ with the previous method. All you have to do is to set the perturbation function to zero: $$S(x) = 0$$. Then you have the homogeneous differential equation. You solve it with separation of variables or directly by using the corresponding solution formula 39.

We put this ansatz 45 into the inhomogeneous equation 44 for $$y$$:

Formula anchor

We also want to replace the derivative $$y'$$ with our ansatz. To do this, we must first differentiate $$y$$ with respect to $$x$$. Since both $$C(x)$$ and $$y_{\text h}(x)$$ depend on $$x$$, we need to apply the product rule. You do this by differentiating $$C(x)$$ once, leaving $$y_{\text h}$$, and then leaving $$C(x)$$ and differentiate $$y_{\text h}$$. The result is the derivative of our ansatz:

Formula anchor

We insert the derivative $$y'$$ into the general form of the differential equation 45:

Formula anchor

If you just factor out $$C(x)$$, you might see why this approach is so awesome:

Formula anchor

In parenthesis is the homogeneous differential equation 30, which is zero. So we can omit this term completely:

Formula anchor

You can now rearrange the equation for the unknown coefficient $$C'(x)$$:

Formula anchor

Now, to eliminate the derivative $$C'(x)$$, we have to integrate both sides over $$x$$. You know, the integration is the inverse, so to speak, of a derivative:

Formula anchor

We cannot integrate the right side concretely, because$$S(x)$$ is different depending on the problem. Therefore we leave the right side unchanged. The left side, on the other hand, can be integrated and additionally yields an integration constant, let's call it $$B$$:

Formula anchor

We bring it directly to the right side and define it for example as a constant $$A := -B$$:

Formula anchor

If you now just substitute the found coefficient $$C(x)$$ into the original ansatz, then you get the general solution of an ordinary inhomogeneous linear differential equation of 1st order:

Solution formula for ordinary inhomogeneous DEQ of 1st order
Formula anchor

## Solving method #3: Exponential ansatz Illustration : Exponential approach is suitable for ordinary DEQ of any order, which are linear.

The exponential ansatz is suitable for

• differential equations of arbitrary order with constant coefficients

• and which are linear.

Of course, the method quickly becomes complex for higher orders. The method is best suited for second order differential equations. The general form of a 2nd order linear differential equation looks like this:

Form of a linear DEQ of second order
Formula anchor

Here we assume that the coefficients $$K_1$$ and $$K_0$$, as well as the perturbation function are independent of $$x$$. They are constant.

If the perturbation function is not zero, then you must first ask a mathematician. Then he will tell you that a general solution $$y$$ of an inhomogeneous linear differential equation is composed of two parts:

• a homogeneous solution $$y_{\text h}$$ of the homogeneous differential equation

• and of a particular solution, which we denote by $$y_{\text p}$$.

Sum of homogeneous and special solution
Formula anchor

The homogeneous solution $$y_{\text h}$$ solves the differential equation 9 if you set the perturbation function $$S$$ equal to zero:

Formula anchor

In the method of the exponential ansatz, as the name suggests, we make the guess that the homogeneous solution $$y_{\text h}$$ has the form of an exponential function:

Homogeneous solution with exponential approach
Formula anchor

Since the first and second derivatives of $$y_{\text h}$$ occur in the general form 70 of the differential equation, we must differentiate our exponential ansatz twice. The first derivative is:

Formula anchor

And the second derivative is:

Formula anchor

Now we can insert the exponential ansatz and the corresponding derivatives into the homogeneous differential equation 70:

Formula anchor

Let us factor out $$C \, \mathrm{e}^{\lambda \, x}$$:

Formula anchor

If we divide by this factor $$C \, \mathrm{e}^{\lambda \, x}$$, then we get the so-called characteristic equation for $$\lambda$$:

Formula anchor

When we solve this equation, we find the unknown $$\lambda$$. Since it is a quadratic equation for $$\lambda$$, we get two solutions $$\lambda_1$$ and $$\lambda_2$$. We have to consider both of them.

Basically, you can set up the characteristic equation directly by looking at your differential equation without having to do all these steps. Compare the homogeneous differential equation with the characteristic equation. The coefficient in front of $$\lambda^2$$ is in front of the second derivative of $$y$$. In this case the coefficient is 1. The coefficient of $$\lambda$$ is in front of the first derivative of $$y$$, in this case $$K_1$$. And the coefficient $$K_0$$ in front of the function $$y$$ itself stands alone in the characteristic equation. By the way, if you had a homogeneous 3rd order differential equation, then the characteristic equation would start with the cubic term $$\lambda^3$$ and so on.

A quadratic equation has two solutions $$\lambda_1$$ and $$\lambda_2$$ and you can determine these for example with the quadratic formula:

Formula anchor

Since you get two $$\lambda$$ values, we have to consider both. To do this, you have to extend the exponential ansatz by another term in which the second $$\lambda$$ value is in the exponent. With the corresponding $$\lambda$$-values this is the solution of the homogeneous 2nd order differential equation 70:

Solution ansatz of the homogeneous linear DGL of 2nd order
Formula anchor

Depending on the values of the coefficients $$K_1$$ and $$K_0$$, the solutions may show different behavior. Because, if $$K_0$$ is greater than $$\frac{{K_1}^2}{4}$$, then you are taking the root of a negative number. In this case you get a solution that describes oscillations. I will show you this in an example.

On the other hand, if the differential equation to be solved is inhomogeneous, that is the perturbation function is not zero, then we still have to add the particular solution $$y_{\text p}$$ to the homogeneous one to find a general solution.

For the particular solution we have to choose an appropriate approach depending on what form the perturbation function $$S$$ has. Here we look at the simplest possible form, namely, when the perturbation function $$S$$ is constant. Then the particular solution is given by perturbation function divided by the coefficient $$K_0$$: $$y_{\text p} = \frac{S}{K_0}$$. Now, to get a general solution of such an inhomogeneous differential equation, we have to add the homogeneous solution and the particular solution:

Solution ansatz of the inhomogeneous DEQ of 2nd order with constant perturbation function
Formula anchor

The two unknown constants $$C_1$$ and $$C_2$$ are determined by the constraints, as you know. Also note that this method of the exponential ansatz is a guess method. This is the case if the actual solution of the differential equation is not of exponential form. Therefore, if you use a solving method that contains the word 'ansatz' in its name, be sure to check your solution. You do this by substituting the solution you have found in the differential equation and checking if both sides are equal.

## Solving method #4: Product ansatz (separation ansatz) Illustration : Separation approach is used to convert partial DEQ of arbitrary order into ordinary DEQ.

Let's look at the last solving method, the separation ansatz. This is sometimes called the product ansatz for reasons we will soon understand. This method, however, is suitable:

• for partial differential equations

• of arbitrary order.

This solution method is mainly used only to transform a partial DEQ into several ordinary DEQ's and to solve these then with other methods (e.g. with the exponential ansatz).

Let us illustrate this method directly with an example. The one-dimensional wave equation for an electric field is best suited for this:

Formula anchor Illustration : An electromagnetic wave whose E-field and B-field components oscillate.

The function we are looking for is the electric field $$E(t,x)$$. This depends on $$x$$ and on $$t$$. Since the function depends on two variables and their derivatives appear in the equation, it is a partial differential equation.

Here we make a product ansatz for the searched solution $$E$$:

Product ansatz for searched function
Formula anchor

We assume that the solution $$E$$ can be split into a product of two functions that we call $$R(x)$$ and $$U(t)$$. One function, $$R$$, depends only on $$x$$. And the other function, $$U$$, depends only on $$t$$. In the wave equation, we have a second derivative of $$E$$ with respect to location $$x$$ and a second derivative with respect to time $$t$$. So we must first differentiate our product ansatz before we insert it into the wave equation. Differentiating the product ansatz with respect to $$x$$ yields $$U(t)\,\frac{\partial^2 R(x)}{\partial x^2}$$, since $$U$$ is independent of $$x$$ and thus acts like a constant. In contrast, in the derivative of the product with respect to time $$t$$, the function $$R$$ acts like a constant because it does not depend on $$t$$:

Formula anchor

The goal now is to separate everything that depends on $$x$$ from what depends on $$t$$. For this we divide this equation by $$R(x) \, U(t)$$:

Formula anchor

Thus we have achieved that everything that depends on $$x$$ is on the left side and everything that depends on $$t$$ is on the right side. If you manage to separate a partial differential equation this way, then the separation ansatz was successful.

Now we can vary $$x$$ on the left side without changing the right side, because there is no $$x$$ on the right side. The same is true for the time $$t$$. If we vary the time on the right side, the left side remains unchanged, because there is no time $$t$$. Thus both sides must be constant. So let's set the left and the right side equal to a constant $$K$$:

Formula anchor

Thus we have transformed a partial differential equation into two ordinary differential equations. And the good thing is that the two differential equations are not coupled. That is, you can solve them independently and then multiply the solutions like in the product ansatz 100 to get the general solution for the partial differential equation.

You can solve the two ordinary differential equations with the exponantial ansatz you learned before.

So. Now you have learned everything necessary to classify and to solve simple differential equations.

• Separation of variables for ordinary homogeneous differential equations of 1st order

• Variation of constants for ordinary inhomogeneous differential equations of 1st order

• Exponential ansatz for ordinary differential equations of higher order

• And separation ansatz for partial differential equations

There are of course more classifications and solving methods. There are entire books devoted to solving differential equations. Some differential equations are so complex that it is better to not even try to solve them by hand, such as the Navier-Stokes differential equations. Numerical solving with the computer is the best approach here. But that's another big topic that you'll learn in another lesson.