 Exponential Ansatz The exponential ansatz is suitable for ordinary differential equations of arbitrary order that are linear and have constant coefficients. 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 second-order linear differential equation looks like this. y prime prime plus k1 times y prime plus k0 times y is equal to s. Here we assume that the coefficients k1 and k0 as well as the perturbation function s are independent of x. They are a constant. If the perturbation function is not 0, then you must first ask a mathematician. Then he will tell you that the general solution y of an inhomogeneous linear differential equation is composed of two parts, a homogeneous solution yh of the homogeneous differential equation and of a particular solution which we denote by yp. The homogeneous solution yh solves the differential equation if you set the perturbation function s equal to 0. In the method of the exponential ansatz, as the name suggests, we make the guess that the homogeneous solution yh has the form of an exponential function. yh is equal to c times e to the power of lambda times x. Since the first and second derivatives of yh occur in the general formula of the differential equation, we must differentiate our exponential ansatz twice. The first derivative is yh prime is equal to c times lambda times e to the power of lambda times x. And the second derivative is c times lambda squared times e to the power of lambda x. Now we can insert the exponential ansatz and the corresponding derivatives into the differential equation. Let us factor out c times e to the lambda x. If we divide by this factor, then we get the so-called characteristic equation for lambda. 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 your differential equation with a characteristic equation. The coefficient in front of lambda squared 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, k1. And the coefficient k0 in front of the function y itself stands alone in the characteristic equation. By the way, if you had a homogeneous third-order differential equation, then the characteristic equation would start with the cubic term and so on. A quadratic equation has two solutions, lambda 1 and lambda 2, and you can determine these, for example, with a quadratic formula. 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 differential equation of second order. Depending on the values of the coefficients k1 and k0, the solutions may show different behavior, because if k0 is greater than k1 squared over 4, then you are taking the square root of a negative number. In this case, you get a solution that describes oscillations. I will show you this in an example. If the differential equation to be solved is inhomogeneous, that is, the perturbation function is not 0, then we still have to add the particular solution, yp, 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 a perturbation function divided by the coefficient k0. yp is equal to s over k0. Now, to get a general solution of such an inhomogeneous differential equation, we have to add the homogeneous solution and the particular solution. The two unknown constants, c1 and c2, are determined by the constraints, as you know. Also note that this method of the exponential ansatz is a gas 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. Let's make an example. Do you remember the differential equation for the oscillating mass? This is a second-order differential equation with constant coefficients. The perturbation function is zero. That means we only have to find out the homogeneous solution and we do that with the exponential ansatz we just learned. Let's take the fastest way and directly write down the characteristic equation. We expect a quadratic equation because we have a second-order differential equation. The second derivative is preceded by the coefficient 1, so we just write lambda squared. Then the coefficient in front of the first derivative. Since the first derivative is missing in the differential equation, the lambda term is absent as well. Next up is the coefficient d over m that is in front of the searched function. This coefficient stands alone in the characteristic equation. All together, the characteristic equation reads lambda squared plus d over m is equal to zero. For this equation, we don't even need the quadratic formula. We get the solution directly if we first bring d over m to the other side and then take the square root. Consider that the inverse of squaring gives two solutions, a positive and a negative square root. Also, we have an interesting case here when the square root of a negative number is taken. Square root of a negative number is not a real number, but an imaginary number. Do you remember what that means? We expect that the system must oscillate. Even if you don't know imaginary or complex numbers yet, you can split the term inside the square root into a product of minus 1 and d over m. According to the square root laws, you can split this product into two square roots. Square root of minus 1 is defined as the imaginary unit, a number which we denote by the letter I. That's all you need to know about imaginary numbers. Let us denote square root of d over m shortly as omega. If we insert the lambda values we have just found into the exponential ansatz, we get the general solution for the considered differential equation. This solution seems very abstract, but I will show you that this solution corresponds to an oscillation. Before that, let us determine the unknown constants c1 and c2 with initial conditions for our problem. For example, we could have observed that at the time t equals 0, the displacement of the spring was 1. The spring was displaced to the maximum, so the initial condition is y of 0 is equal to 1. Insert this condition into the solution to determine c1. e to the power of 0 is 1, rearrange for c1 and you get c1 is equal to 1 minus c2. Next step is to determine the unknown constant c2 using the second initial condition. For this, we use the fact that at t equals 0, the velocity of the mass was 0. In physics, you learn that velocity corresponds to the first-time derivative of the displacement. So our second initial condition is given by y prime of 0 is equal to 0. So let's differentiate our general solution with respect to time t. The factor in front of t becomes a factor in front of the exponential function. And then we insert the second initial condition into the derivative. The exponential functions become 1 and the factor i omega cancels out, rearranging for c2. We find out that c2 is equal to c1. So we know that c2 must be equal to c1. Nice. Let's replace c2 with c1 to determine concrete value for the constants. The equation results in c1 is equal to 1 half. Since c1 and c2 are equal, c2 must be also equal to 1 half. Insert 1 half into our general solution. Now let's find out what this abstract solution has to do with oscillations. For this, we get our friend Euler to help us who tells us his famous Euler formula. e to the power of i omega t is equal to cosine of omega t plus i times sine of omega t. This relation tells us how the complex exponential function is related to cosine and sine functions. So the first complex exponential in our solution becomes cosine and sine with positive omega t and the second complex exponential becomes cosine and sine with negative omega t. We can omit the minus sign in the argument of the cosine function because cosine is symmetric. That means it has the same value for arguments x and minus x. The sine function, on the other hand, is anti-symmetric. Therefore, we cannot omit the minus sign in the argument, but rather pull it out in front of the sine function. Very nice. The complex sine function drops out and the cosine can be summed up. And this is our final solution. As you can see, the displacement y changes periodically with time. The mass attached to the spring oscillates back and forth and the oscillation is described by the cosine function.