Differential equations

Course ID Course Professor Time Location
Differential equations -

Differential equations

In the previous chapters, you have just learnt the essentials about differential and integral calculus. Now you are going to know another application of the theory of equations. Up to now the task has been to calculate from some equation, e.g.

ax + b = cx + d

to find and determine the value of x. The equation is solved for x. For x one obtains a value that consists in a, b, c and d. So the solution to this equation is:

x = (d – b) / (a ​​- c)

You can check this result by inserting that result into the above equation. ax + b = cx + d.

The same expressions are obtained on both sides of the equation to the left and right, namely (ad – cb) / (a ​​- c).

This procedure is especially important if you want to solve differential equations effortlessly: What exactly is it about?

What are we looking for here? In the differential equation, the solution is not a number but a function.

The problem is not only to find a solution, i.e. the function, but also to set up the differential equation.

The latter happens mainly on the basis of scientific experiments. In this course we will mainly focus on solving them.

 

Examples of differential equations

f ‘(x) = -a*f(x) e.g. radioactive decay

f ‘(x) = b*f(x) e.g. Population growth

k ‘(t) = c*k(t)*[M – k(t)] e.g. Spread of infection: k(t) = Number of infected people at time t, [M – k(t)] = Number of healthy people at time t, M = number of individuals (people)

m’ (t) = A(e – m(t))*(d – m(t)),  K > 0. e.g. a chemical reaction: E + D ==> P i.e. E and D react to form P. At time, t, the concentration of the substance E and D is e – m (t) and d – m (t), respectively. The concentrations of the starting materials E and D each decrease over time. At the beginning, t = 0, P = 0. We don’t have any products yet, but E and D correspond to the initial concentrations. K must be greater than 0 because P increases over time.

K’ (t) = D(K – K(t)) e.g. Diffusion, the even distribution of a substance in a room whose volume remains constant. Fick’s law.

These differential equations are discussed here.

More difficult examples

Mf ” (x) = -K * f (x), K> 0 e.g. The spring force according to Hook’s law

Mf ” (x) = -K * f (x) – R * f ‘(x), K, R> 0. With the spring force above, the friction is also taken into account.

The last two equations are worked on in a higher math lesson. Mathematics for natural scientists in progress.

Essentials about differential equations

Again, a function f (x) is sought in the differential equation. So the unknown is a function with one or more variables. Therefore, a distinction is first made between

a) Ordinary differential equation, the function sought has only one variable.

and

b) Partial differential equation, the function sought has several variables.

Only ordinary differential equations are covered in this course.

In the examples above, the functions we are looking for would be f (x), k (t), m (t) and K (t).

For the sake of simplicity and clarity, the variables should each be designated with x and the function sought, f (x), with y = y (x).

So the above examples could look like this:

  1. f ‘(x) = -a*f(x), y’ = -ay
  2. f ‘(x) = b*f(x), y’ = by
  3. k ‘(t) = c*k(t)*[M – k(t)], y’ = cy(M – y)
  4. m’ (t) = A(e – m(t))*(d – m(t)), y’ = A(e – y)(d – y)
  5. K’ (t) = D(K – K(t)), y’ = D(K – y)
  6. Mf ”(x) = -K*f(x), My” = -Ky
  7. Mf”(x) = -K*f(x) – R*f'(x), My” = -Ky-Ry’ 

In the case of the differential equations of the first derivative, y ‘, one speaks of 1st order, the second derivative, y’ ‘, of 2nd order.

Differential equations that are solved for y ‘are called explicit. The following two equations

y’ = f(x)

y’ = f(x,y)

are explicit and 1st order, with y ‘= f (x,y) the function F has two variables.

Examples:

y’ = x + y² + 3

y’ = y – sinx

but

y’ + x = tany’ – y

is not explicit!

The examples 1) to 6) listed above consist just in one function of y on the right side. On the right side you may also find x alone: e.g. y’ = x

 

Possible solutions

Just explicit first-order differential equations are dealt with here.

y’ = f(x,y)

It is recommended to repeat the knowledge you have already acquired about differential and integral calculus over and over again.

simple examples:

explicite differential equations

  1. y’ = x
  2. y’ = 2x
  3. y’ = x²
  4. y’ = y
  5. y’ = 2xy

examples 1 – 3:  The right side of the equation contains only x

examples 4. und 5: The right side contains x and y

Solutions

  1. y = x²/2 + C
  2. y= x² + C
  3. y = x³/3 + C
  4. y = Ce×  (e× = e high x)
  5. y = Ceײ (eײ = e high x²)

As you can see, these examples allow you to guess the solutions.

Let’s have a control if it matsches

1) left side, y = x²/2 + C, y’ = dy/dx = 2x/2 + 0 = x, so left side = right side = x

2) left side, y = x² + C, y’ = dy/dx = 2x + 0 = 2x, = right side

3) left side, y = x³/3 + C, y’ = dy/dx = 3x²/3 = x², = right side

4) left side, y = Ce×, y’ = dy/dx = Ce×, = right side

5) To derivate Ceײ  you can use the chain rule: external function, can be written directly f(x) =  Ce high u, f'(x) = Ce high u. inner function f(x) = x², f'(x) = 2x. y’ = inner function * external function

= 2x*Ceײ that is the left side and that is identical to the right side 2xy because y = Ceײ.

 

Remarks

In examples 1) -3) of the explicit differential equations, the solution of y or f (x) is obtained by integrating with dx. The same applies to examples 4) and 5),

with Euler’s function here e× comes into play.

The solutions of these differential equations contain a constant C and it is important to know that this C does not say otherwise that the solution
is general in nature. The constant C, however, may also appear as a multiplier, here in particular when e-functions are found, for Ce × ².
This general solution can have an infinite number of solutions. In order to get a special solution, we need to set the initial conditions (Xo, Yo).
You can give any numbers for Xo, and Yo and thus determine f (Xo) = Yo. This results in the special solution.

Bei Beispiel 1) haben wir für die explizite Differentialgleichung, y’ = x folgende allgemeine Lösung gefunden

In example 1) we found the following general solution for the explicit differential equation y’ = x

y = f(x) = x²/2 + C, The given initial condition is Xo = 2 and Yo = 4, which means as follows:

f(Xo) = f(2) = 4/2 = 2, in which Yo = 4, now the following equation is solved for C:

Yo = f(Xo) + C or 4 = 2 + C ==> C = 2

The special solution is thus with the initial conditions: Xo = 2 and Yo = 4

y = x²/2 + 2

For example 4), y’ = y the general solution is

y = f(x) = Ce×, let the initial condition be Xo = 1 and Yo = 2, the following equation is thus, 2 = Ce, and solved for C: C = 2/e

The special solution with given initial condition Xo = 1 und Yo = 2

y = 2/e*e×

It should be noted here that explicit differential equations of higher order (2nd and nth order) have 2 or n integration constants, like C, D etc.

Example: y” = x,  y’ = 1/2x² + C,  y = 1/6x³ + Cx + D

 

Explicit linear differential equations of 1st order

A 1st order linear function looks like this:

f(x) = ax + b

Analogously, a linear differential equation of the first order can be represented as follows:

y’ = ay + b

where a and b are functions of x. e.g. if a = g (x) and b = h (x), the differential equation looks like this:

y’ = g(x)y + h(x)

y is the function of f(x) .

Of the above-mentioned examples 1) – 7), just mentioned again below:

  1. f ‘(x) = -a*f(x), y’ = -ay
  2. f ‘(x) = b*f(x), y’ = by
  3. k ‘(t) = c*k(t)*[M – k(t)], y’ = cy(M – y)
  4. m’ (t) = A(e – m(t))*(d – m(t)), y’ = A(e – y)(d – y)
  5. K’ (t) = D(K – K(t)), y’ = D(K – y)
  6. Mf ”(x) = -K*f(x), My” = -Ky
  7. Mf”(x) = -K*f(x) – R*f'(x), My” = -Ky-Ry’ 

1), 2) and 5) are linear, 3) and 4) are non-linear functions.

Examples 6) and 7) are linear differential equations of the 2nd order.

Furthermore, a linear differential equation is referred to as homogeneous if h (x) = 0, if h (x) ≠ 0 as inhomogeneous.

An important approach will be to first solve the homogeneous equation y ‘= g (x) y. Then find the solution with the so-called “variation of the constants” method.

 

The solution process is thus:

  1. Solve the homogeneous differential equation.
  2. Solution using “variation of the constants”.

1) Homogeneous equation

y’ = g(x)y 

The solution is: (integral with application of the substitution rule)

y = Ke (high) ∫g(x) oder y = Ke (high) G(x)     (K is some constant)

∫g(x) = G(x),

G(x) is the integral of ∫g(x). It is also said, G(x) is some indefinite integral of g(x). Because G'(x) = g(x)

Controle:

y = Ke (hoch) G(x) derived from dx using the chain rule:

Ke (hoch) G(x)*G'(x) = g(x)*Ke (hoch) G(x) = g(x)*y

 

2) “Variation of the constants”

In this 2nd step we use the result of the homogeneous equation, y = Ke (high) G (x), to make the following approach:

We replace K with K (x), a function that is still unknown.

y = K(x)e (high) G(x)

We now derive this equation (use product and chain rule) and get:

y’ = K'(x)e (high) G(x) + K(x)g(x)e (high) G(x)      Attention: G'(x) = g(x)

This obtained expression is now equated with

y’ = g(x)y + h(x)

K'(x)e (high) G(x) + K(x)g(x)e (high) G(x) = g(x)y + h(x)

since y = K(x)e (high) G(x)

the simplified equation is:

K'(x)e (high) G(x) = h(x) and to be solved after K'(x):

K'(x) = h(x)e (high) -G(x) if you integrate K'(x)  the expression on the right looks like

K(x) = ∫h(x)e (high) -G(x)dx + C

We now insert this expression for K(x) into  y = K(x)e hoch G(x) and get:

y = (∫h(x)e (high) -G(x)dx + C)e high G(x)

or simply

y = (K(x) + C)e hoch G(x)

K(x) is the integrated function or the indefinite integral of h(x)e high -G(x)

 

Practical applications of explicit first-order linear differential equations

The derivation just described will now be practiced using practical examples.

1) y’ = y – 2x²

We first determine the homogeneous equation and then the variation of the constant:

Homogeneous equation:

y’ = y  the solution is easy and there you are: y = Ke×

Variation of the constant, K to K(x):

y = K(x)e× can now be derivated (using product rule) and you get:

y’ = K'(x)e× + K(x)e×

The two expressions are now inserted into the inhomogeneous equation y ‘= y – 2x² and the resulting equation is solved for K’ (x):

y’ = y2x² ===>K'(x)e× + K(x)e× = K(x)e× 2x², K(x)e× drops out and it remains:

K'(x)e× = -2x² and thus K'(x) = -2x²/e×, K'(x) is now being integrated:

K(x) = ∫K'(x)dx = -2∫x²/e×dx  2 to integrate two times partially:

K(x) = 2x²/e× + 4x/e× + 4/e× + C and since y = K(x)

y= (2x²/e× + 4x/e× + 4/e× + C)e× = 2x² + 4x+ 4 + 2Ce×

 

Controle

Let’s first derive y

y’ = dy/dx = 4x + 4 +2Ce×

and insert the result of y in y – 2x², y = 2x² + 4x+ 4 + 2Ce×.

2x² + 4x+ 4 + 2Ce× – 2x² = 4x + 4 + 2Ce×

Which was to be proved.

 

2) y’ = x + 2 – y = -y +(x + 2)

Homogeneous equation:

y’ = -y

y = K/e× (or y = Ke high -x)

Variation of the constants:

The approach is

y = K(x)/e× and y’ = K'(x)/ex – K(x)/e× (Product rule)

y’ = –y + x + 2 = –K(x)/e× + x + 2

consequently

K'(x)/ex – K(x)/e× = –K(x)/e× + x + 2  |-K(x)/e× can be put away and it remains:

K'(x)/ex = x + 2 oder K'(x) = e×(x + 2)

K'(x) is now being integrated:

∫K'(x) = K(x) = ∫xe×dx + 2∫e×dx

(∫xe×dx make use of partially integration) K(x)= e×(x – 1) + 2e× + C = e×(x + 1) + C

y = K(x)/e× = [e×(x + 1) + C]/e× = x + 1 + C/e×

Controle

y + x + 2 = (x + 1 + C/e×) + x + 2 = 1 – C/e×

y’ = dy/dx = (x + 1 + C/e×)/dx = 1 – C/e×

Which was to be proved. Derivation C/e× with quotienten rule

 

Example:

y’ = my + n  (m ≠ 0)

Let m and n be real numbers. This is a differential equation with constant coefficients. The general solution of the corresponding homogeneous equation

y’ = my

we know already, as derived above, we can write y = Ce high mx to the power of mx (attention! my is positive!)

Let us assume that the differential equation y ‘= my + n has a place where the slope = 0 or 0 = my + n is solved by y:

==> y = -n/m

-n/m is a special solution to the inhomogeneous equation: Let’s put -n/m in the equation y ‘= my + n. Replace y with -n/m:

-m*n/m +n = 0 und y’ = (-n/m)’ = 0

y = Ce high mx – n/m is therefore the general solution.

Controle:

We now insert the general solution just obtained into the differential equation, y ‘= my + n:

left side: y ‘= C*m*e high m*x (1st derivative of y = C*e high m*x – n/m by dx)

right side: m*(C*e hoch m*x – n/m) + n = C*m*e high m*x -m*n/m +n = C*m*e hoch m*x

Example 5) above can also be calculated in the same way:

K’ (t) = D(K – K(t)), y’ = D(K – y) 

0 = DK – Dy, y = K

Solution: y = C*e hoch -Dx + K 

Please do the math yourself!

3. Another approach: Separation of the variables

Another solution method is presented here: The variables are separated. This method is used whenever the differential equation has the following form:

y’ = k(x)*l(y)

The right side consists of a product of two functions with one variable each of x and y. Before we calculate practical examples in order to arrive at a solution, the following 4 steps are suggested:

  1. The differential equation is transformed somewhat: y’ is replaced by dy/dx.
  2. All expressions with y are moved to the left and all expressions with x are moved to the right.
  3. One must therefore multiply by dx and the above differential equation now has the following form: dy/l(y) = k(x)dx.
  4. The indefinite integral is formed on both sides: ∫dy/l(y) = ∫k(x)dx + C. The two integrals are summarized as follows: L(y) = K(x) + C. L(y) is now an integrated function of 1/l(y) and K(x) one of k(x). One can now denote y “implicitly” as a function of x. That is also the reason why the constant of integration only has to appear on the right side but must not be forgotten! Now you solve for y.

The fifth step is to check whether there are constant solutions. We will come back to this below, where the question sometimes arises whether a differential equation can have several solutions or whether it is unique.

Examples

For the time being, we will deal with a simple example, namely the one that has already been solved above:

y’ = 2xy and proceed according to the scheme above:

  1. Forming: dy/dx = 2xy
  2. Separation: dy/y = 2x
  3. Integrate both sides: ∫1 / y * dy = ∫2xdx. Integral results in: lnIyI = x² + C Attention: Pay attention to absolute lines!
  4. Solution for y: First introduce Euler’s exponential function on both sides so that ln disappears on the left: IyI = e high (x² + C),            e high (x² + C) can also be expressed with e high x²*e high C and replaced with e high C = L, where L is also a constant. The provisional solution now looks like this: IyI = L*e high x². Now the absolute lines are removed: y = ± L * e high x², now we can replace ± L by K: K = ± L and the general solution is: y = Ce ײ. (see above: simple examples, explicit differential equations, example 5: y ‘= 2xy)

K is an arbitrary constant. If K = 0 then y = 0 and we have a constant function. This is included in the solution.

Example 5: Linear differential equation with constant coefficients y’ = D(K – y) This example has already been solved above by varying the constants. 

We can write down the first 3 steps according to the above scheme:

  1. dy/dx = D (K – y)
  2. dy/(K-y) = Ddx
  3. ∫dy/(K – y) = ∫Ddx + C, integral results in: -lnIK – yI = Dx + C and the minus sign shifted to the right lnIK – yI = -Dx – C and we are at step 4
  4. ln is eliminated with Euler’s exponential function: IK – yI = e high (-Dx – C), As in the example above: e high -C = L* and thus           L = ± L = ± e high -C and the general solution y = Le high -Dx + K.

If we set L = 0, we get y = K. This is a constant solution of the differential equation and is included in the general solution:                        y = Le high -Dx + K.

* Instead of L, you can choose C again, as in the same example above.

Another example:

y’ = -2x/y, 1) dy/dx, 2)ydy = -2xdx, 3) ∫ydy = ∫2xdx + C ===> y²/2 = -x² + C and resolved for y²: = -2x² + 2C = 2(C – x²)

Put the square root and get 2 solutions: y1 = √[2(C – x²)] and y2 = -√[2(C – x²)]

Controle: first derivate y1 using chain rule: y1′ = -2x/√[2(C – x²)] and y2′ = 2x/√[2(C – x²)]

Control by inserting in -2x/y1 =-2x/√[2(C – x²)] = y1′ and -2x/y2 = -2x/-√[2(C – x²)] = y2′ after the minus sign has been removed. Please pay attention to the following:

Another example:

y ‘= ax(y – 1)² First 2 steps result in dy/(y – 1) = axdx and step 3 integration on both sides – 1/(y – 1) = ax²/2 + C

Step 4 resolved for y: y = 1 – 2/(ax² + 2C)

Controle: Derivation results in: y ‘= 4ax/(ax² + 2C) ² and the result of y inserted in equation y’ = ax(y – 1)² =  ax*[1 – 2/(ax² + 2C) – 1]² = 4ax/(ax² + 2C)² what had to be proven.

With y = 1 the differential equation has a constant solution, but it is not a special case of the general solution. The solution y = 1 is also called a singular solution because it is not a special case of the general solution.

For ICI = ⇒ ± ∞ of any size, y clings to the constant function y = 1.

Another example

The next example is a differential equation for which there is no explicit form:

y ‘= 2x / (1 – siny)

We go back to the usual solution for the separation:

dy / dx = 2x / (1 – siny), 2) (1 – siny) dy = 2sdx, 3) ∫ (1 – siny) dy = ∫2xdx = y + cosy = x² + C,

The solution only exists in the implicit form.

Another, but somewhat more difficult example:

We treat a first-order nonlinear differential equation: To do this, please briefly repeat the lecture integral calculus, http://www.ibusciencecollege.com/?course=einfuhrung-in-die-integralrechnung and especially the example with partial fraction decomposition. Go to the subchapter “Integration with the help of partial fraction decomposition”

Here is the illustration again:

y’ = b(M – y)(N – y), M ≠ N

From examples 1) to 7) we deal with example 4)

4. m’ (t) = A(e – m(t))*(d – m(t)), y’ = A(e – y)(d – y)

Because only the variable y appears on the right-hand side, the method of separating the variables can also be used here.

1) dy/dx = b(M – y)(N – y), 2) dy/(M – y)(N – y) = bdx, 3)∫dy/(M – y)(N – y) = ∫bdx, the left side is now broken down into partial fractions:

1/(M – y)(N – y) = 1/(N – M)[1/(y – N) – 1/(y – M)] and the integral in 3) is thus:

∫1/(N – M)[1/(y – N) – 1/(y – M)]dy = ∫bdx and after reshaping for simplification:

∫[1/(y – N) – 1/(y – M)]dy = ∫b(N – M)dx the right side can be determined directly: = b(N – M)x + C

and the left side:

lnIy -NI – lnIy – MI or lnI(y – N)I/I(y – M)I 

lnI(y – N)I/I(y – M)I = b(N – M)x + C

We now apply Euler’s rule and eliminate the absolute bars: E.g. e high lna = a

I(y – N)I/I(y – M)I = e hoch [b(N – M)x + C] = e hoch b(N – M)x*e hoch C

(y – N)/(y – M) = ±e hoch b(N – M)x*e hoch C replacing ±e high C by L we can write:

(y – N)/(y – M) = L*e hoch b(N – M)x

To solve this equation for y, we replace the right-hand side with u. u = L*e hoch b(N – M)x

(y – N)/(y – M) = u,

y – N = (y – M)*u = yu – Mu

y(1 – u) = N -Mu

y = (N – Mu)/(1 -u)

Now the right side is expanded and transformed as follows:

(N – Mu)/(1 -u) = [(N – M) + (1 – u)M]/(1 – u)* multiply out the numerator and add up [(N – M) + (1 – u)M]

Now you can also write:

(N – M)/(1 – u) + (1 – u)M/(1 – u) and get y = (M – N)/(1 – u) + M and with u = L*e hoch b(N – M)x

This differential equation has 2 solutions depending on whether L is positive or negative.

y = M + (N – M)/[1 – L*e hoch b(N – M)x] if L is positive  (+L)

If L is negative,= (-L), the solution is   y = M + (N – M)/[1 + L*e high b(N – M)x] 

* when you multiply and add up the numerator [(N – M) + (1 – u)M] you get N – M + M – Mu = N – Mu

Because we have just solved example 4), we can now write down example 3):

3) k ‘(t) = c*k(t)*[M – k(t)], y’ = cy(M – y)

here we treat the example: y’ = by(M – y) and solve it like this:

y’ = b(M – y)(N – y), we set M = 0 and rearrange the equation as follows:

y’ = -b(0 – y)(N – y) because M = 0 we can write down the solution directly:

y = N/[1 + K*e high (-bNx)] c > 0, N > 0 or if y = F(t)

F(t) = N/[ 1 + K*e high (-bNt)] the function is called the logistic function, the graph of which is s-shaped and can reproduce growth processes fairly exactly.


Leave a Reply

Your email address will not be published. Required fields are marked *