Thursday, July 6, 2017
Unizor - Partial Differential Equations - Heat Solution
Notes to a video lecture on http://www.unizor.com
Partial Differential Equations
Solution to Heat Equation
Our purpose is to solve the heat equation that describes the dynamics of temperature distribution within a thin rod and looks like this:
∂T(t,x)/∂t = a²·∂²T(t,x)/∂x²
where
t - time,
x - distance of a point on a thin rod from its edge,
T(t,x) - temperature at time t of a point on a rod at distance x from its edge,
a - constant that depends on physical characteristics of a rod.
This is a partial differential equation for function T(t,x) describing the distribution of temperature T within a thin rod at time t at location with X-coordinate x, assuming it's positioned along the X-axis with the left edge at x=0.
First of all, let's state that this distribution of temperature depends not only on the equation itself, which reflects dynamics of heat movement within a rod, but also depends on the initial conditions - what was the temperature at different locations of a rod at time t=0, described by function T(x,0).
Another type of condition that might be necessary to take into account is so-called boundary condition. It plays an important role in cases when edges of a rod are maintained at certain (not necessarily fixed) temperature all the time, which can be described by functions T(0,t) and T(L,t) (here L is the length of a rod).
Now we are ready to solve the equation.
Let's find a solution to our partial differential equation in a form
T(t,x) = f(t)·g(x)
We don't know if we will succeed on this way, but it's worth to try, since this relatively simple approach might bring us to solution. If it does, great. If it does not, at least, we tried.
Then
∂T(t,x)/∂t = f'(t)·g(x)
∂²T(t,x)/∂x² = f(t)·g''(x)
Now our heat equation looks like
f'(t)·g(x) = a²·f(t)·g''(x)
or
f'(t)/f(t) = a²·g''(x)/g(x)
Now we have a peculiar situation, when a function of t is equal to a function of x. The only possibility of this might be if both functions are constants that are equal to each other.
Therefore,
f'(t)/f(t) = A and
a²·g''(x)/g(x) = A
where A - some unknown constant that might be determined using initial conditions.
These are two ordinary differential equations, both types were addressed in the previous lectures. Let's get to their solutions.
The equation for f(t) is solved as follows:
df/f = A·dt
Integrating both sides results in
ln|f| = A·t + C
(where C - any constant)
|f(t)| = eA·t+C
or, considering C is any constant,
f(t) = C·eA·t
It's easy to check that this is a solution since
f'(t) = C·A·eA·t and
f'(t)/f(t) = A
The equation for g(x) is a linear equation of the second order, considered in a prior lecture about oscillation of a spring.
We can represent it as
g''(x) − (A/a²)·g(x) = 0
We will look for its solution in a form
g(x) = eλ·x
where λ - any complex number.
Since
g''(x) = λ²·eλ·x
we come to a simple quadratic equation for λ:
λ² − A/a² = 0
with solutions
λ = ±(1/a)·√A
This results in solutions for g(x):
g(x) = C1·e(1/a)·√A·x + C2·e−(1/a)·√A·x
General solution to a heat equation can now be represented as
T(t,x) = f(t)·g(x) =
= C·eA·t·(C1·e(1/a)·√A·x + C2·e−(1/a)·√A·x)
where C, C1 and C2 are unknown constants, that can be defined only if additional conditions (initial conditions or boundary conditions) are given.
What remains is analysis of our solution for a purpose to get only real component of it, ignoring imaginary part, and apply initial condition on distribution of temperatures at time t=0, like T(0,x)=u(x), and boundary conditions (if applicable) T(t,0)=T0 and T(t,L)=TL in order to determine unknown constants. These are purely technical issues and lie outside the scope of this course.
Thursday, June 29, 2017
Unizor - Partial Differential Equations - Heat Equation
Notes to a video lecture on http://www.unizor.com
Partial Differential Equations
Overview - Heat Equation
Since we talked about ordinary differential equations, where a function of one argument together with its derivatives participates in the equation, we might as well touch on differential equations, where function of two (or more) arguments together with its partial derivatives participates in the equation. These equations are called partial differential equations.
In order to present this material in a more practical light and to emphasize the importance of differential equations (particularly, partial) in practical applications, let's discuss one particular physical process that naturally leads to partial differential equations.
Let's imagine an insulated thin metal rod heated on one end and examine how its temperature T at different distance from the edge changes with time.
We assume that the rod is stretched along the X-axis with its heated end at origin. The distance from this end to any point on a rod is X-coordinate of this point. Time t will be measured from the moment the heat is applied to the edge at x=0.
Considering our rod is insulated and thin, we can safely assume that the heat dissipates only along its length from point x=0 towards the other edge, and the rod's temperature is a function of two arguments:
distance x from the edge
and time t:
T = T(t,x)
The illustration below will be handy in our analysis.
Before embarking on calculations let us remind a few physical properties that affect the process of heat dissipation.
1. Heat Q - a form of energy manifested in vibration of molecules of an object.
It is measured in the same units as energy.
2. Temperature T - a measure of intensity of the molecular vibration.
It is measured in degrees of different scales.
3. Specific heat capacity C - an amount of energy (heat) needed to increase temperature of a unit of mass by a unit of temperature.
It is assumed to be a constant for any specific material within reasonable range of temperatures and precision.
If an object of mass m increased in temperature by ΔT, it consumed ΔQ=C·m·ΔT units of heat (energy).
4. Thermal conductivity k - a measure of how fast molecular vibration is transferred within an object.
It was experimentally established that the amount of heat transferred from one zone of an object to another per unit of time through a unit of area on the boundary between these zones is proportional to a rate of change of temperature at this boundary and depends on the qualities of the material. For every material it is a constant within a reasonable range of temperatures.
In one-dimensional case on an above picture of a thin rod that has area S of crosscut, when the heat is transformed through a point x and the rate of change of temperature at that point and at that time is ∂T(t,x)/∂x, the amount of heat that goes through during time Δt can be calculated as
ΔQ = −k·S·Δt·∂T(t,x)/∂x
Minus in this equality reflects that heat is transferred from hot to cold area and, therefore, the partial derivative of temperature T by x is negative, while energy must be positive.
Now we are ready to connect all the parameters mentioned above into one heat equation.
Consider a part of a thin rod from point x to point x+Δx.
As the heat dissipates from left to right, during the time Δt certain amount of heat enters this area through crossing at point x and certain amount of heat exits this area through crossing at point x+Δx.
The heat entering through crossing at point x measures
ΔQin = −k·S·Δt·∂T(t,x)/∂x
The heat exiting through crossing at point x+Δx measures
ΔQout = −k·S·Δt·∂T(t,x+Δx)/∂x
The difference between them is an amount of heat that contributed to a rise in temperature of the part of a rod from x to x+Δx. This difference equals to
(A) ΔQ+ = k·S·Δt·[∂T(t,x+Δx)/∂x − ∂T(t,x)/∂x]
On the other hand, the heat ΔQ+, consumed by a part of a rod of length Δx, area of crosscut S and specific heat capacity C should increase the temperature by ΔT related to this heat as
ΔQ+ = C·m·ΔT
where m is a mass of this part of a rod, that can be calculated as
m = ρ·S·Δx
where ρ is a mass of a unit of volume of the material this rod is made of.
Therefore,
(B) ΔQ+ = C·ρ·S·Δx·ΔT
From equations (A) and (B) we derive the following equality:
C·ρ·S·Δx·ΔT = k·S·Δt·[∂T(t,x+Δx)/∂x − ∂T(t,x)/∂x]
This can be transformed into
ΔT/Δt = [k/(C·ρ)]·[∂T(t,x+Δx)/∂x−∂T(t,x)/∂x]/Δx
When Δt→0 and Δx→0 our equation can be represented as
∂T(t,x)/∂t = [k/(C·ρ)]·∂²T(t,x)/∂x²
Traditionally, this heat equation is written as
∂T(t,x)/∂t = a²·∂²T(t,x)/∂x²
where a² = k/(C·ρ)
Tuesday, June 27, 2017
Unizor - Ordinary Differential Equations - Hooke's Law
Notes to a video lecture on http://www.unizor.com
Higher Order Ordinary
Differential Equations -
Hooke'sLaw
Our next subject is Hooke's Law.
This law describes the force of a stretched or compressed spring.
Let's assume that we have a weightless spring horizontally lying on the frictionless table along an imaginary X-axis and fixed at the left end. Its free right end is at coordinate x=0 and there is a point mass m attached to this free end of a spring.
Then we stretch this spring by pulling the right end from a neutral position by certain length x.
Obviously, the spring exerts a force to compress back to a neutral position. The Hooke's Law states that within certain reasonable boundaries (no over-stretching) this force is proportional to a difference in length between a stretched string and a string in a neutral position.
This is expressed by the formula
F = −k·x
where F is the force exerted by a spring, x is a displacement of the free end of a spring from a neutral position, k is a positive constant that characterizes a spring (called a spring constant) and the minus sign signifies that the direction of force is opposite to the direction of displacement because, if displacement is positive (stretching), the force is directed towards negative direction of the X-axis and, if displacement is negative (compression), the force is directed towards positive direction of the X-axis.
Now recall Newton's Second Law that related the force and acceleration
F = m·a
where F is the force, m is the mass of an object and a is its acceleration.
From these two laws we conclude that
m·a = −k·x
Since x is a distance along the X-axis and a is an acceleration along this axis, that is a second derivative from a distance by time, we came up with the following differential equation
m·x''(t) = −k·x or
m·x''(t) + k·x(t) = 0 or
x''(t) + (k/m)·x(t) = 0
This is a second order ordinary differential equation. It is a little more complex than we considered in a lecture about acceleration and Newton's Second Law.
Let's try to solve it.
First of all, let us mention that even a simple guessing in this and many other cases is a good choice. Recall that first derivative of sin() is cos() and the first derivative of cos(), that is the same as the second derivative of sin(), is −sin(). So, the equation x''(t)+x(t)=0 has a solution x=sin(t). This is very close to what we have. Adding a factor α to an argument might help to satisfy multipliers in our equation:
if x(t)=sin(α·t) then
x'(t)=α·cos(α·t) and
x''(t) = −α²·sin(α·t)
and, therefore,
x''(t)+α²·x(t) = 0
Now we can choose α to satisfy α²=k/m, and the solution to our equation is found.
Guessing is good, when we can guess (as in this case), but guessing might not be successful and, even if you managed to guess one solution, it's not a guarantee that all solutions are found. By the way, if we start with cos(), we will also find a solution.
So, let's have some theory.
Our differential equation belongs to a class of linear ordinary differential equations of second order with constant coefficients and can be generalized as
x''(t) + p·x'(t) + q·x(t) = 0
As we saw above, functions sin() and cos() might be involved in a solution. Analogous quality of derivative being similar to a function itself is possessed by exponential functions. Recall also that exponential functions with complex exponent is related to trigonometric function through famous Euler's formula
eit = cos(t) + i·sin(t)
So, exponential functions, in some way, are more general than trigonometric, they encompass them.
Therefore, it's only natural to look for a solution in terms of exponential functions.
Let's try.
Assume, we are looking for a solution to our equation in the form x(t)=eλ·t, where λ might be any (including complex to accommodate trigonometric functions) number.
Then derivatives of this function are:
x'(t) = λ·eλ·t
x''(t) = λ²·eλ·t
Putting this into our equations, we get
λ²·eλ·t + λ·p·eλ·t + q·eλ·t = 0
Canceling eλ·t, we get a simple quadratic equation for λ called a characteristic polynomial of a given differential equation:
λ² + p·λ + q = 0
Since this equation always has two solutions λ1 and λ2 among complex numbers, we will have two particular solutions to our differential equation:
eλ1·t and eλ2·t
Finally, any linear combination of these two particular solutions will also be a solution (since our differential equation is linear and a derivative of linear combination of functions is a linear combination of derivatives).
Therefore, we can state the general solution to our differential equation:
x(t) = C1·eλ1·t+C2·eλ2·t
which depends on two unknown complex constants C1and C2, their values can be defined only if some initial conditions of the movement are given.
Let's get back to a movement of a spring.
Our initial equation
x''(t) + (k/m)·x(t) = 0
has a characteristic polynomial
λ² + k/m = 0
(where both k and m are positive) with two solutions:
λ1 = √(k/m)·i and
λ2 = −√(k/m)·i
where i²=−1 is an imaginary unit in the field of complex numbers.
Let ω = √(k/m).
Now we can represent the general solution to a movement of a spring based on the Hooke's Law as follows:
x(t) = C1·eiωt + C2·e−iωt
This expression can be easily transformed using Euler's formula into
x(t) = C1·cos(ωt)+i·C1·sin(ωt)+
+C2·cos(−ωt)+i·C2·sin(−ωt)
Since C1 can be represented as A1+i·B1 and C2 can be represented as A2+i·B2, where A1, B1, A2 and B2 are undefined unknown real numbers, the whole expression can be represented as
D1·cos(ωt) + D2·sin(ωt) + i·Z
where coefficients D1 and D2are any real numbers and i·Z represents purely imaginary part.
Since we deal with physics, we should exclude all imaginary solutions and leave only those, where D1 and D2 are real numbers.
So, the general physical solution looks like
x(t) = D1·cos(ωt) + D2·sin(ωt)
where D1 and D2 are undefined unknown real numbers.
In our experiment we have stretched a string by some known distance from a neutral position and let it spring back. That means, we know the initial position x(0)=d and initial speed x'(0)=0.
These initial conditions are sufficient to determine two unknown constants in our equation of a motion:
x(0)=d ⇒
⇒ D1cos(0)+D2sin(0)=d
⇒ D1 = d
x'(0)=0 ⇒
⇒ −ω·D1sin(0)+ω·D2cos(0)=0
⇒ D2 = 0
The final form of an equation of motion is
x(t) = d·cos(ωt)
where ω = √(k/m), k is a spring constant, m is a point mass at its free end and d is the initial distance we have stretched a spring from its neutral position.
As seen from this equation of motion, a free end of a spring with a mass attached to it will indefinitely oscillate around the neutral point.
The end.
Friday, June 23, 2017
Unizor - Ordinary Differential Equations - Acceleration
Notes to a video lecture on http://www.unizor.com
Higher Order Ordinary
Differential Equations -
Acceleration
Differential equations can include derivatives of higher order - second derivative, third, etc.
Probably, most common equations of this type are those with the second order derivative.
These equations are very often occur in science, especially in Physics. Let's address these equations and approaches to solve them.
Our first subject is a concept of acceleration and Newton's Second Law.
Recall that speed measures how fast a distance from some starting point changes, that is, if this distance is represented as a function x(t) of time t, speedv(t) at any moment t is the first derivative of distance by time:
v(t) = x'(t) = dx/dt
But speed does not have to be constant, we can move faster, increasing our speed (accelerating), or slower, decreasing it (decelerating).
To measure how fast our speed changes with time, as usually, when we want to measure how fast anything changes with time, we use a derivative.
Differentiating speed (a function of time) by time we obtain this measure of change of speed at any moment. This derivative of speed by time is called acceleration a(t):
a(t) = v'(t) = dv/dt =
= x''(t) = d²x/dx²
That is, acceleration is the second derivative of distance by time.
Newton's Second Law states that the force F applied to an object and the acceleration a this object obtains as a result of this application of force are related as follows:
F = m·a
where m is the object's mass (presumed constant).
Assuming that our motion occurs along a straight line with coordinates and, therefore, the position of an object is defined by its X-coordinate x(t), Newton's Second Law is an ordinary differential equation of second order because acceleration is the second derivative of the X-coordinate of an object:
F(t) = m·x''(t)
Usually our task is to find where exactly our object is located (that is, its X-coordinate), if the force, as a function of time, is given.
Consider a case when there is no force applied to an object, that is F(t)=0.
Then, according to the Newton's Second Law,
0 = m·a(t)
from which we derive a(t)=0
Since a(t)=v'(t), we can find the speed:
v'(t)=0
⇒ v(t) = C
(where C is an unknown constant)
⇒ x'(t) = C
⇒ x(t) = C·t + D
(where D is another unknown constant)
That concludes the solution of our differential equation of the second order, and the solution includes two unknown constants that cannot be determined from the equation alone. It's understandable since we don't know initial position of an object on the coordinate axis x(0) and the initial speed it moved v(0). These two additional pieces of information (initial conditions) are needed to determine unknown constants participating in the solution.
If x(0)=x0 and v(0)=v0, we can easily determine
x0 = D and
v0 = C
which results in the final equation of motion of an object, to which no forces are applied (or, more generally, all forces applied to it are balancing each other).
x(t) = x0 + v0·t
By solving the above differential equation of the second order, we have mathematically derived the Newton's First Law as a consequence of the Second Law.
Newton's First Law (law of inertia) states that if the sum of all forces applied to an object is zero, then the object at rest will continue to stay at rest (its speed is and will be 0) and objects moving at some speed will continue to move with the same speed and direction (its speed is constant).
Now consider a case when the force applied to an object is not zero, but constant, that is
F(t)=P=m·a(t)=m·v'(t)
where P is a known constant.
This implies that acceleration a(t) must be a known constant and equals to P/m. Let's use symbol a instead of a(t) to signify this.
Since a=v'(t), we derive
v(t) = a·t + C
where C is an unknown constant.
Then
x'(t) = a·t + C
⇒ x(t) = a·t²/2 + C·t + D
where D is another unknown constant.
To determine two unknown constants we need additional information - initial conditions.
Assume that the original position of an object is x(0)=x0. This allows to determine D=x0.
If initial speed v(0)=v0 is known, we can determine C=v0.
So, the final equation of the motion, when a constant force is applied is
x(t) = a·t²/2 + v0·t + x0
In general, if the force is variable and/or the mass is variable, from Newton's Second Law we can construct a differential equation of the second order, where the second derivative is explicitly represented by a known function:
F(t) = m(t)·x''(t)
⇒ x''(t) = F(t)/m(t)
⇒ d/dt[x'(t)] = F(t)/m(t)
⇒ x'(t) = ∫[F(t)/m(t)]dt
⇒ x(t) = ∫{∫[F(t)/m(t)]dt}dt
As we see, Newton's Second Law presents the simplest kind of ordinary differential equation of the second order. It can be solved by double integration.
It should not be forgotten that in the process of each integration there will appear an unknown constant, to get its value an initial condition should be known and applied.
Thursday, June 22, 2017
Unizor - Ordinary Differential Equations - Linear Equations
Notes to a video lecture on http://www.unizor.com
Linear Ordinary Differential Equations
Standard form of linear ordinary differential equations is
f(x)·y' + g(x)·y + h(x) = 0
As the first step, we can divide all members of this equation by f(x) (assuming it's not identically equal to 0), getting a simpler equation
y'+u(x)·y+v(x) = 0
The suggested solution lies in the substitution y(x)=p(x)·q(x), where p(x) and q(x) are unknown (for now) functions.
Express y'(x) in terms of p(x) and q(x):
y' = p·q'+q·p'
Substitute this into our equation:
p·q'+q·p'+u·p·q+v = 0
Let's simplify this
p(q'+u·q)+q·p'+v = 0
If there are such functions p(x) and q(x) that satisfy conditions
(1) q'+u·q = 0 and
(2) q·p'+v = 0
our job would be finished.
Let's try to find such functions.
From the equation (1) in our pair of equations we derive
q'/q = −u,
which can be converted into
dq(x)/q(x) = −u(x)·dx
that can be solved by integrating:
ln(q(x)) = −∫u(x)·dx
q(x) = e−∫u(x)·dx
Once q(x) is found, we solve the equation (2) for p(x):
p'(x) = −v(x)/q(x),
which can be integrated to find
p(x) = −∫v(x)/q(x) dx
and, consequently, y(x)=p(x)·q(x) can be fully determined.
Let's consider a few examples.
Example 1
Solve the following linear differential equation
y' + y + x = 0
Let's look for a solution in a form
y(x)=p(x)·q(x)
Then
y'(x) = p'(x)·q(x)+p(x)·q'(x)
Our equation looks like this now
p'·q+p·q' + p·q + x = 0
Factor out p, getting
p·(q'+q) + (p'·q+x) = 0
We will try to find p(x) and q(x) to separately bring to zero q'+q and p'·q+x.
Let's look for a function q(x) that brings expression q'+q to zero:
q'+q = 0
dq/q = −dx
∫dq/q = −∫dx
ln(q) = −x + A
(where A is any constant)
q(x) = B·e−x
(where B=eA, so it represents any positive number)
Next, let's find a solution to
p'·q+x = 0
p'·B·e−x+x = 0
p(x) = −(1/B)·∫x·exdx
This integral can be found using the "by parts" technique:
p(x) = −(1/B)·(x·ex−∫exdx) =
= −(1/B)·(x·ex−ex−C) =
= −(1/B)·(x−1)·ex+C/B
(where B is any positive constant and C is any constants)
Now let's find y(x)=p(x)·q(x):
y(x) = [−(1/B)·(x−1)·ex+C/B]·[B·e−x] =
= 1−x+C·e-x
Checking:
y'(x) = −1 − C·e-x
y'+y+x = −1 − C·e-x+1−x+C·e-x+x = 0
Solution was correct.
Example 2
Solve the following linear differential equation
y'·cos(x) + y·sin(x) − 1 = 0
First of all, let's normalize it by dividing by cos(x), noticing that sin(x)/cos(x)=tan(x) and 1/cos(x)=sec(x):
y' + y·tan(x) − sec(x) = 0
Let's look for a solution to this equation in a form
y(x)=p(x)·q(x)
Then
y'(x) = p'(x)·q(x)+p(x)·q'(x)
Our equation looks like this now:
p'·q+p·q'+p·q·tan(x)−sec(x) = 0
Factor out p, getting
p·(q'+q·tan(x))+p'·q−sec(x) = 0
First, let's find function q(x) such that
q' + q·tan(x) = 0
It can be solved using the technique of separation:
dq/q = −tan(x)dx
Since [ln(x)]' = 1/x and [cos(x)]' = −sin(x), the last equation can be transformed into
d(ln(q)) = d(cos(x))/cos(x)
d(ln(q)) = d(ln(cos(x)))
Now it's easy to integrate, the result is
ln(q) = ln(cos(x))+C
where C - any real number, from which, raising number e to both left and right sides, follows that
q = D·cos(x)
(new constant D=eC represents any positive number)
Now let's find function p(x) such that
p'·q − sec(x) = 0
Substitute already found q(x) getting
p'·D·cos(x) − sec(x) = 0
p'(x) = (1/D)·(1/cos²(x))
p(x) = (1/D)·∫dx/cos²(x) =
= (1/D)·[tan(x) + E]
where D and E are constants (D - any positive, E - any real)
Let's determine y=p·q now.
y(x) = p(x)·q(x) =
= (1/D)·[tan(x) + E]·D·cos(x) =
= sin(x) + E·cos(x)
Let's check this result.
y'(x) = cos(x)−E·sin(x)
y'·cos(x) + y·sin(x) − 1 =
= cos²(x)−E·sin(x)·cos(x) + sin²(x)+E·cos(x)·sin(x)−1 =
= sin²(x) + cos²(x) −1 = 0
which proves the correctness of our answer.
Example 3
Solve the following differential equation
ln(x·y'+y) = ln(2x)+x²
It's not linear, but can be made linear if we raise e to a power defined by its left and right sides, getting
x·y'+y = 2x·ex²
Let's normalize it by dividing by x:
y' + y/x = 2ex²
Now it's a linear equation that we know how to solve.
Let's look for a solution in a form
y(x)=p(x)·q(x)
Then
y'(x) = p'(x)·q(x)+p(x)·q'(x)
Our equation looks like this now
p'·q+p·q' + p·q/x = 2ex²
Factor out p, getting
p·(q'+q/x) + p'·q = 2ex²
We will try to find p(x) and q(x) to separately
(a) bring to zero q'+q/x and
(b) equalize p'·q with 2ex².
Let's solve equation (a) and look for a function q(x) that brings expression q'+q/x to zero:
q'+q/x = 0
dq/q = −dx/x
∫dq/q = −∫dx/x
ln(|q|) = −ln(|x|) + A
where A - any constant.
Raising e to both sides of this equation, we get
|q| = B/|x|
where B=eA - any positive number.
Let's get rid of absolute values in the above equation by allowing B to be any non-zero real number, so
q = B/x
Substitute it to equation (b):
p'·B/x = 2ex²
p(x) = (1/B)∫2x·ex²·dx
Since derivative of x² is 2x,
p(x) = (1/B)∫ex²·d(x²)
Now we can integrate directly:
p(x) = (1/B)ex² + C
where C is any real number.
This allows to express the solution to our differential equation in the form
y(x) = p(x)·q(x)
where
p(x) = (1/B)ex² + C and
q(x) = B/x
That produces
y = ex²/x + C/x = (ex²+C)/x
where C - any real number.
Checking:
y' = −(ex²+C)/x² + ex²·2x/x =
= ex²·(2−1/x²) −C/x²
y/x = ex²/x² + C/x²
y' + y/x = 2ex²,
which corresponds to the original equation after multiplying both sides by x and taking logarithm.
The end.
Monday, June 19, 2017
Unizor - Ordinary Differential Equations - Homogeneous Equations
Notes to a video lecture on http://www.unizor.com
Homogeneous Ordinary Differential Equations
We have defined homogeneous ordinary differential equations of the first order as an equation
F(x, y, y')=0
which does not change if we replace x with λ·x and y with λ·y, where λ - any real number not equal to zero.
In other words,
F(x, y, y') = F(λ·x, λ·y, y')
Examples:
F(x, y, y') = y'+y/x
F(x, y, y') = 3y'+x·y/(x²+y²)
etc.
The recommended technique to solve these equations is to substitute function y(x) with x·z(x) and solve the equation for z(x), after which determine y(x)=x·z(x).
Let's solve a few equations of this kind.
Example 1
Check for homogeneousness and solve the following equation:
x·y' = x·sin(y/x) + y
Checking for homogeneousness.
Substitute x with λ·x and y with λ·y:
λ·x·y' = λ·x·sin(λ·y/(λ·x)) + λ·y
Obviously, λ cancels out completely, which proves homogeneous character of the equation.
Now let's solve this equation using the substitution z(x)=y(x)/x, which results in y(x)=z(x)·x, and express the initial equation in terms of x, z and z'.
x·(z'·x + z) = x·sin(z) + z·x
Simplifying:
z'·x + z = sin(z) + z
z'·x = sin(z)
dz/sin(z) = dx/x
∫dz/sin(z) = ∫dx/x
The right side is easy, the integral equals to ln(|x|)+C.
The left side is more involved.
∫dz/sin(z) =
= ∫dz/(2sin(z/2)·cos(z/2)) =
= ∫d(z/2)/(sin(z/2)·cos(z/2))
Substitute u=z/2, getting
∫du/(sin(u)·cos(u)) =
= ∫cos(u)d(u)/(sin(u)·cos²(u)) =
= ∫d(sin(u))/(sin(u)·cos²(u))
Substitute t=sin(u), getting
∫dt/[t·(1−t²)]
The polynomial in the denominator is
t·(1−t²) = t·(1−t)·(1+t)
Its inverse can be represented as
1/t − 1/[2(1+t)] + 1/[2(1−t)]
which makes our integral equal to
∫{[2/t−1/(1+t)+1/(1−t)]/2}dt
The last expression can be represented as a sum of three integrals, the result of integration is:
ln(|t|) − ln(|1+t|)/2 − ln(|1−t|)/2
where t=sin(z/2)
This leads us to a final solution of our differential equation.
ln(|sin(z/2)|) − ln(1+sin(z/2))/2 − ln(1−sin(z/2))/2 = ln(|x|)+C
and then we should substitute z=y/x to get the final expression
ln(|sin(y/2x)|) − ln(1+sin(y/2x))/2 − ln(1−sin(y/2x))/2 = ln(|x|)+C
Using this as an exponent, we come up with an expression without logarithms
|sin(y/2x)| /[(1+sin(y/2x))·(1−sin(y/2x))] = C·|x|
A simplification in the denominator results in
|sin(y/2x)| / cos²(y/2x) = C·|x|
We leave it "as is" without resolving for y(x).
Example 2
Check for homogeneousness and solve the following equation:
[(y − x·y')/x]x = ey
Checking for homogeneousness.
Substitute x with λ·x and y with λ·y:
[(λy − λx·y')/λx]λx = eλy
Cancel λ in the ratio, getting:
[(y − x·y')/x]λx = eλy
This can be written as
{[(y − x·y')/x]x}λ = [ey]λ
Raising both sides to power 1/λ (or, which is the same, extracting a root of power λ) we come to the original equation, which proves homogeneous character of the equation.
Now we will solve it using the recommended technique.
Substitute z(x)=y(x)/x, which results in y(x)=z(x)·x and express the initial equation in terms of x, z and z'.
The expression for a derivative y' is:
y' = (z·x)' = z'·x+z
New equation is, therefore,
[(z·x − x·(z'·x+z))/x]x = ez·x
Simplifying it by raising to power 1/x both sides (or, equivalently, extracting a root of power x):
[(z·x − x·(z'·x+z))/x] = ez
Cancel x:
z − (z'·x+z) = ez
Cancel z:
−z'·x = ez
This equation is separable, let's separate x from x, getting
−e−z·dz = dx/x
Ready to integrate:
∫−e−z·dz = ∫dx/x
e-z = ln(x)+C
(assuming for simplicity positive only sign for x, so integral on the right is ln(x) instead of ln(|x|))
From the last equation we derive:
−z = ln(ln(x)) + C
z = −ln(ln(x)) + C
Now we can use it to find an expression for y:
y = −x·ln(ln(x)) + C
Solution must be checked.
It's easier, instead of checking the original equation
[(y − x·y')/x]x = ey
to check the equality of logarithms from both sides:
x·ln[(y − x·y')/x] = y
or, simpler,
ln(y/x − y') = y/x
where we should substitute
y = −x·ln(ln(x)) + C
and
y' = −ln(ln(x))−x·(1/ln(x))·(1/x)
or, simpler,
y' = −ln(ln(x)) − 1/ln(x)
Let's disregard constant C in this checking to make manipulations simpler.
Then, since
y/x = −ln(ln(x))
we will have to check that ln(−ln(ln(x)) + ln(ln(x)) + 1/ln(x)) = −ln(ln(x))
Canceling opposite positive and negative members under logarithm on the left, we come to an obvious equality
ln(1/ln(x)) = −ln(ln(x))
which proves the correctness of our solution.
Example 3
Check for homogeneousness and solve the following equation:
x·y·y' = (x+y)²
Checking for homogeneousness.
Substitute x with λ·x and y with λ·y:
λx·λy·y' = (λx+λy)²
λ²x·y·y' = λ²(x+y)²
Obviously, λ cancels out, and we get the same original equation.
Now let's solve it by substituting z(x)=y(x)/x, which results in y(x)=z(x)·x and express the initial equation in terms of x, z and z'.
The expression for a derivative y' is:
y' = (z·x)' = z'·x+z
So, our equation looks like
x·(z·x)·(z'·x+z) = (x+z·x)²
Simplifying by opening all parenthesis, we get
x²·(x·z·z'+z²) = x²·(1+z)²
x·z·z'+z² = (1+z)²
x·z·z' = 1+2z
This equation can be solved using the method of separation.
z·dz/(1+2z) = dx/x
Integrating the left side of this equation:
∫z·dz/(1+2z) =
= (1/2)∫(1+2z−1)·dz/(1+2z) =
= (1/2)[∫dz − ∫dz/(1+2z)] =
= (1/2)[z−(1/2)ln(1+2z)] + C
Integrating the right side of the equation:
∫dx/x = ln(x) + C
Since integral of both sides are equal,
(1/2)[z−(1/2)ln(1+2z)] =
= ln(x)+ C
which can be simplified
2z − ln(1+2z) = 4ln(x) + C
Though this equation for z(x) cannot be easily solve for z, it allows to replace the original differential equation for y with purely algebraic one, replacing z with y/x:
(A) 2y/x − ln(1+2y/x) =
= 4ln(x) + C
This is the final algebraic answer to our differential equation. Though it's not resolved for y(x), it's still the best solution we can come up with.
Solution must be checked.
If this equality that includes function y(x) is correct, derivatives of both parts are also equal. Let's differentiate them both.
−2y/x² + 2y'/x − (1/(1+2y/x))·(−2y/x²+2y'/x) = 4/x
Simplifying by multiplying by x²:
−2y + 2xy' − x·(−2y+2xy')/(x+2y) = 4x
Multiplying by x+2y:
−2xy−4y²+2x²y'+4xyy'+2xy−2x²y' = 4x²+8xy
After cancellation of mutually opposing by sign members and dividing by 4 we get:
−y²+xyy' = x²+2xy
which easily transforms into
xyy' = (x+y)²
that corresponds to original differential equation.
This proves the correctness of the answer (A) as an equation that includes x and y(x) without derivatives that we obtained above.
Friday, June 16, 2017
Unizor - Ordinary Differential Equations - Separable Equations
Notes to a video lecture on http://www.unizor.com
Separable Ordinary Differential Equations
The process of "separation" as a method of solving differential equation of the first order
f(y)·dy = g(x)·dx
which allows for separate integration of left and right sides.
This can be assured if our initial equation
Indeed, from the last equation follows
dy/dx = P(x)·Q(x)
and
dy/Q(y) = P(x)·dx
which can be integrated separately, left side - by y and right side - by x.
Examples below use exactly this approach.
Example 1
y' + x·y + y − x = 1
Perform the transformation:
y' = −x·y − y + x + 1
y' = −y·(x+1) + (x + 1)
y' = (1−y)·(x+1)
dy/(1−y) = (x+1)dx
∫dy/(1−y) = ∫(x+1)dx
Both integrals are trivial.
−∫d(y−1)/(y−1)=∫(x+1)d(x+1)
−ln(y−1) = (x+1)²/2 + C
y = 1 + C·e−(x+1)²/2
Example 2
y' − (x+1)·e(x+y) = 0
Perform the transformation:
y' = (x+1)·ex·ey
y'·e−y = (x+1)·ex
e−y·dy = (x+1)·ex·dx
∫e−y·dy = ∫(x+1)·ex·dx
Integral on the left is straight forward.
Integral on the right can be calculated using the integration "by-part":
−e−y = (x+1)·ex −∫ex·d(x+1)
−e−y = (x+1)·ex − ex + C
−e−y = x·ex + C
e−y = C−x·ex
y = −ln(C−x·ex)
Example 3
ln(y') = x + y
Perform the transformation:
y' = ex · ey
e−y·dy = ex·dx
∫e−y·dy = ∫ex·dx
−e−y = ex+C
e−y = −ex−C
y = −ln(C−ex)
Example 4
sin(y)·y' = sin(x+y) + sin(x−y)
First of all, recall the trigonometric identities
sin(x+y) =
= sin(x)·cos(y)+cos(x)·sin(y)
sin(x−y) =
= sin(x)·cos(y)−cos(x)·sin(y)
from which follows
sin(x+y)+sin(x−y) =
= 2·sin(x)·cos(y)
Perform the transformation of our equation using the last expression:
sin(y)·y' = 2·sin(x)·cos(y)
Now we can separate:
sin(y)·dy/cos(y) = 2·sin(x)·dx
Continue transformation:
−dcos(y)/cos(y) = −2·dcos(x)
Easy to integrate now:
ln(|cos(y)|) = 2·cos(x) + C
Ignoring difficulties with absolute value and periodicity to shorten the presentation of an idea, it can be solved for y
|cos(y)| = e2·cos(x)+C
y = arccos(e2·cos(x)+C)
Subscribe to:
Posts (Atom)

