 Variation of constants. This method is well suited for ordinary differential equations of first order, which are linear. The differential equation can be homogeneous or inhomogeneous. The inhomogeneous one is more general. You have this type of differential equation if you can bring your differential equation into the following form. y' plus k times y is equal to s. The inhomogeneous version differs from the homogeneous one only in the single coefficient, that is, the perturbation function s 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 is given by a coefficient c that depends on x multiplied by a homogeneous solution that we denote as yh. You have already learned how to find the homogeneous solution yh with the previous method. All you have to do is to set the perturbation function to zero. Then you have the homogeneous differential equation. You solve it with separation of variables method or directly by using the corresponding solution formula. Let us insert this ansatz into the inhomogeneous equation for y. 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 and yh depend on the x, we need to apply the product rule. You do this by differentiating c1s, leaving yh, and then leaving c and differentiate yh. The result is the derivative of our ansatz. Now we insert the derivative y' into the inhomogeneous differential equation. If you just factor out c of x, you might see why this approach is so awesome. In parentheses is the homogeneous differential equation, which is zero. So we can omit this term completely. You can now rearrange the equation for the unknown coefficient c'. Now to eliminate the derivative c' we have to integrate both sides over x. We cannot integrate the right side concretely because s is different depending on the problem. Or we leave the right side unchanged. The left side, on the other hand, can be integrated and additionally yields an integration constant. We put this constant directly on the right side and define it, for example, as a constant a. If you now just substitute the found coefficient c into the original ansatz, then you get the general solution of an ordinary linear differential equation of first order. Let's take an example from electrical engineering. Consider a circuit consisting of a coil characterized by the inductance l and a resistor r connected in series. Then we take a voltage source, which provides a voltage u0, as soon as we close the circuit with a switch. Then a time-dependent current i flows through the coil and the resistor. The current does not have its maximum value immediately, but increases slowly due to Lenn's law. Using Kirchhoff's laws, we can set up the following differential equation for the current i. Remember that the point above the i means the first time derivative. This is an inhomogeneous linear differential equation of first order. The searched function y corresponds here to the current i. The perturbation function s corresponds to u0 over l and is time-independent in this case. We denote the homogeneous solution by iH. First, we need to determine the homogeneous solution iH. We can quickly calculate this using the solution formula for the homogeneous version of the differential equation that you learned before. The coefficient k in front of the searched function i corresponds to r over l and is also time-independent in this case, so far so good. We may omit the constant cH in the solution formula here because we consider it later anyway in the constant a, which we find in the other solution formula. The coefficient r over l is constant and integrating a constant only introduces a variable t. Thus the homogeneous solution is iH is equal to e to the power of minus r over l times t. Let's insert it into the inhomogeneous solution formula. Note that 1 over the exponential function containing a minus in the exponent is simply equivalent to the exponential function without the minus sign. Now we have to calculate the integral. u0 over l is a constant and can be placed in front of the integral. And when integrating the exponential function, the exponential function is preserved. Only l over r is added as a factor in front of the exponential function. Finally, we hide the constant of integration in the constant a. And this is our general solution. We can simplify it a bit more by multiplying out the parentheses. Two exponential functions simplify to one. To get a solution specific to the problem, we need to determine the unknown constant a. For that, we need an initial condition. If we say that the time t equals 0 is the time when the current i was 0 because we have not yet closed the switch, then our initial condition is y of 0 is equal to 0. Put it into the general solution. e to the power of 0 is equal to 1. Solve for a and you get a is equal to minus u0 over r. Thus we have successfully determined the specific general solution.