Friday, December 3, 2021

Bernoulli Differential Equations

  Let's consider a differential equation in the form y' + p(x)y = q(x)yⁿ where p(x) and q(x) are continuous and n a real number. Such an equation is called Bernoulli equation. If n = 0 or n = 1, the equation becomes easy to solve as an ordinary differential equation.

We are going to use the substitution method to solve this equation. It appears that the term yⁿ is a problem. Let's get rid of it by multiplying both sides by its inverse.

y⁻ⁿy' +y⁻ⁿp(x)y =  q(x)yⁿy⁻ⁿ

y⁻ⁿy' + p(x)y¹⁻ⁿ = q(x)

Now let's do the substitution that will lead us to an equation easier to solve. Let's write v = y¹⁻ⁿ 

Let's differentiate both sides. v is a function of y and y is a function of x. We use the derivative formula of uⁿ = nuⁿ⁻¹u' to find the derivative of  y¹⁻ⁿ 

v' = (1-n) y¹⁻ⁿ⁻¹y'

y' = v'/(1-n) y¹⁻ⁿ⁻¹ = v'/(1-n)y⁻ⁿ

Now if we substitute y' and v in the equation we will have an equation in v easier to solve. Let's do that.

y⁻ⁿv'/(1-n)y⁻ⁿ + p(x)v = q(x)

Let's simplify the first expression by y⁻ⁿ:

v'/(1-n) + p(x)v = q(x)

This is a linear differential equation in v that can be solved by finding v. Once we find v we can substitute it and find y. Let's do a numerical equation.

Example

Let's solve the equation: y' + (4/x)y = x³y² 

Let's multiply both sides by y⁻² to get rid of y² :  y⁻²y' + (4/x)yy⁻² = x³y² y⁻² (1)

y⁻²y' + (4/x)y⁻¹ = x³ (2)

Let's write v = y⁻¹

Let's derive both sides:

v' = (-1)y⁻¹⁻¹y'

v' = -y⁻²y'

Let's find y': 

y' = v'/-y⁻²

y' = - v'y²

Let's substitute v and y' in the equation (2):

(y⁻²)( - v'y²) + (4/x)v = x³

- v' +  (4/x)v = x³

v' -(4/x)v = -x³ (3)

To solve this linear differential equation in v we have to find μ:

μ = e^∫p(x)dx

p(x) is the coefficient of v: p(x) = -4/x

Let's calculate ∫p(x)dx

∫p(x)dx = ∫-4/xdx = -4lnx = lnx⁻⁴

Let's substitute ∫p(x)dx  in the formula of μ:

μ = e^ lnx⁻⁴ = x⁻⁴

Let's multiply both sides of equation (3) by x⁻⁴:

v'x⁻⁴ - x⁻⁴.(4/x)v = (x⁻⁴)( -x³)

v'x⁻⁴ - 4x⁻⁵v = -x⁻¹

The left side is the derivative of (x⁻⁴v):

(x⁻⁴v)' = -x⁻ ¹

Let's use the notation d/dx:

d(x⁻⁴v)/dx = -x⁻¹

d(x⁻⁴v) = -x⁻¹dx

Let's integrate both sides:

∫d(x⁻⁴v) = ∫-x⁻¹dx

x⁻⁴v = -∫1/xdx = -lnx + k

v = (-lnx + k)/x⁻⁴

v = x⁴(-lnx + k)

Let's substitute v in v = y⁻¹:

 x⁴(-lnx + k) = y⁻¹:

y = 1/x⁴(-lnx + k)

This value exists only if x is different of 0.

Interested in reviewing Differential and Integral Calculus visit Center For Integral Development





Friday, November 19, 2021

Resolution of Exact Differential Equations

Let's consider a first order differential equation in the form M(x,y) + N(x,y)dy/dx = 0 or M(x,y)dx + N(x,y)dy = 0. The equation is exact if Mₓ(x,y) = Nᵧ(x,y). For simplification we write Mₓ = Nᵧ. Mₓ is the partial derivative with respect to x. Nᵧ is the partial derivative with respect to y.

In this case there will be a function ψ(x,y) such that ψₓ = M and ψᵧ = N where the equation ψ(x,y) = c will implicitly define a function that will satisfy the original differential equation.

Example: Solve the differential equation 2xy - 9x² + (2y + x² + 1)dy/dx = 0 using the initial condition y(0) = -3

Let's see if the differential equation is exact. 

Let's write M = 2xy - 9x² and N = 2y + x² + 1

Let's take the partial derivatives of these equations:

Mₓ = 2x and Nᵧ = 2x

The differential equation is exact since Mₓ = Nᵧ

There will be a function ψ(x,y) such that ψₓ = M and ψᵧ = N where the equation ψ(x,y) = c will implicitly define a function that will satisfy the original differential equation.

Let's work with ψₓ = M to find ψ (pronounce psi)

Let's substitute M:

 ψₓ = 2xy - 9x²

dψ/dx = 2xy - 9x²

dψ = (2xy - 9x²)dx

∫dψ = ∫(2xy - 9x²)dx

Since we integrate with respect to x, y is constant. That's the reason why we write 2y before the integral sign.

ψ = 2y∫xdx - 9∫x²dx

ψ = (2y)(x²/2) - 9x³/3 + h(y).  Here the constant of integration is a function of y since we integrate with respect to y.

ψ =x²y - 3x³ + h(y)

Let's find h(y) using  ψᵧ = N

Let's find ψᵧ first by differentiating the function ψ with respect to y. Here x² is a constant

ψᵧ = x² + h'(y)

Substitute ψᵧ and N in the expression  ψᵧ = N

x² + h'(y) = 2y + x² + 1

h'(y) = 2y + 1

d[h(y)]/dy = 2y + 1

d[h(y)] = (2y + 1)dy

Let's integrate both sides:

∫ d[h(y)] = ∫ (2y + 1)dy

                   = 2y²/2 + y + k

h(y) =  y² + y + k

Let's substitute h(y) in ψ 

ψ = x²y - 3x³ + y² + y + k

Since ψ = c we have:

c =  x²y - 3x³ + y² + y + k

x²y - 3x³ + y² + y = c-k

Let's just use c and drop k:

x²y - 3x³ + y² + y = c

x²y - 3x³ + y² + y - c = 0

Let's arrange the equation to have a quadratic equation in y:

 y²  +  x²y + y - 3x³ -c = 0

 y²  + ( x² + 1)y - 3x³ - c = 0

Let's find c using the initial condition y(0) = -3

(-3)² + [(0)² + 1](-3) -3[(0)3] - c = 0

Solving this expression we find c = 6

Let's substitute c in the equation:

y²  + ( x² + 1)y - 3x³ - 6 = 0

This equation represents the implicit solution of the differential equation. Let's solve to find the explicit solution

Using the formulas to solve a quadratic equation we have:

y = - (x² + 1)- ⎷ (x² + 1)²-4( - 3x³ - 6 )/2. The whole expresion is under the radical and the expresion - (x² + 1)- ⎷ (x² + 1)²-4( - 3x³ - 6 ) has 2 for denominator. The symbol software I am using doesn't have the horizontal bar for radical and the vertical bar for fraction.

y =  - (x² + 1) + ⎷ (x² + 1)²-4( - 3x³ - 6 )/2

Let's develop the first value of y:

y = - (x² + 1) - ⎷x⁴ + 12x³ + 2x² + 25/2

The second value of y is:

y =  - (x² + 1) + ⎷x⁴ + 12x³ + 2x² + 25/2

Let's see which expression of y satisfies the initial condition:

Substitute y by -3 and x by 0 in the first value of y:

-3 = -[ (0)² + 1] -⎷(0)⁴ + 12(0)³ + 2(0)² + 25/2

-3 = -1 - ⎷25/2 = -1 - 5/2 = -6/2 = -3

The first value of y satisfies the initial condition

Let's see if the second value of y satisfies the initial condition:

Let's substitute x and y in the second value of y:

3 = -[ (0)² + 1] +⎷(0)⁴ + 12(0)³ + 2(0)² + 25/2

-3 = -1 + 5/2 = 4/2 = 2

It doesn't satisfy the initial condition. Therefore only the first value of y is the solution of the differential equation. The explicit solution is : y = - (x² + 1) - ⎷x⁴ + 12x³ + 2x² + 25/2.

The solution exists if x⁴ + 12x³ + 2x² + 25>0. To study the sign of this expression we will have to factorize it or we can graph it using a programmable calculator. The graph will allow to study the sign. Thus the domain of validity of the solution of the differential equation can be set. But here they didn't ask to find the domain of validity.

Practice. Solve the same differential equation without using the initial condition.

If you are interested in learning more about Calculus check Center For Integral Development

 





Saturday, November 6, 2021

Resolution of a differential equation of first order by the method of separable variables using a given condition

 The method is the same as in resolving a differential equation without a given condition. The only difference here is to find the value of k for the given condition.

Example: Solve the following differential equation and determine the interval of validity for the given solution: dy/dx = 6y²x     y(1) = 1/25

Solution

Let's separate the variables by multiplying both sides by 1/y²:

(1/y²) (dy/dx) = (1/y²) (6y²x)

                      =  6x

Multiply both sides by dx:

1/y² dy = 6xdx

Integrate both sides:

∫ 1/y² dy = ∫6xdx

y^-1/-1 = 6x²/2 + K

-1/y = 3x² + K

-1 = y(3x² + K)

y = -1 /3x² + K

Substitute y by 1/25 and x by 1:

1/25 = -1/[3(1) +K]

1/25 = -1/3 + K

3 + K = -25

k = -25-3 k = -28

Substituting k in y we have:

y = -1/3x²-28

y exists if 3x²-28 is different of zero.

Let's study the sign of  3x²-28. In order to do that we need to equal this expression to 0 and solve the equation.

3x²-28 = 0

By solving this equation we find x = -2⎷7/3 and x = 2⎷7/3

x -∞                        -2⎷7/3            2⎷7/3            +∞

y                 +            0         -           0         +


The intervals in which 3x²-28 is different of zero are:

 -∞ < x < -2⎷7/3   -2⎷7/3 < x < 2⎷7/3  and  2⎷7/3  < x < +∞

These determine the intervals of validity of the solution of the differential equation.

Friday, October 15, 2021

Resolution of differential equations of first order by the method of separable variables

 A non-linear first order differential equation is separable if it can be written in this form:

N(y)dy/dx = M(x)

In order for such a differential equation to be separable, all the y's must be in the first side and all the x's must be in the second side. The independent variable can be in the second side and the dependent variable on the first side. As long as the variables are separated. it doesn't matter. The variable y and x should not be together. They should be separated with one variable in one side and the other in the other side.

Let's integrate both sides of the equation:

∫N(y)(dy/dx).dx = ∫M(x)dx

Let's do a change of variable: u = y(x) . Then we have:

du/dx = y'(x)  

          = dy/dx

du = dy/dx.dx

Substituting y and (dy/dx)dx we have:

∫N(u)du = ∫M(x)dx

In order to solve this equation we have to solve the second integral and substitute for u in the first one.

Let's say that instead of the variable u, we have the variable y the above equation can be written as: ∫N(y)dy = ∫M(x)dx

The solution of this equation can lead to the solution of the differential equation. After calculating the two integrals we arrive to an implicit solution that can lead to an explicit one. An implicit solution is a solution where the value of isn't yet found.

Example: Solve the differential equation dy/dx = (x² - 4) (3y+2)

Let's separate the variables by having y and its derivative in the first side and the x in the second side. We divide both sides by 3y + 2 in order to have x in the second side and y in the first side

(dy/dx)(1/3y+2) = x² - 4

Let's multiply  both sides by dx and simplify by dx in the first side

dx(dy/dx) (1/3y+2) = dx(x² - 4)

dy/3y + 2 = dx(x² - 4)

Let's integrate both sides:

∫dy/ (3y+2) = ∫(x² - 4)dx

The derivative of the numerator being near of that of the numerator, we can do a change of variable by writing 3y + 2 = u. By derivating this expression we get:

du/dy = 3  dy = 1/3du

The above equality becomes by substituting dy and du

∫(1/3du)/u  = 1/3x³- 4x + C

∫(1/3du) (1/u) = 1/3x³- 4x + C

1/3∫ du/u =  1/3x³- 4x + C 

1/3lnu + K = 1/3x³- 4x + C  with u>0 because we can't take the log of negative numbers

Let's substitute u and reduce to the same denominator i:

1/3ln(3y + 2) + K = 1/3x³ - 12x/3 + 3C/3

Let's simplify by 3:

ln(3y + 2) + 3k = x³ - 12x + 3C

ln(3y + 2) = x³ - 12x + 3C-3K

We substitute 3C-3K by another variable

ln(3y + 2) = x³ - 12x + K₁

By definition of logarithm, if lnx = y, then logₑx = y. Therefore e^y = x

The above equation becomes e^(x³ - 12x + K₁ ) = 3y + 2

y = 1/3[ e^(x³ - 12x +  K₁) - 2]

Practice

Solve dy/dx = 2xy +3y -4x-6








Saturday, May 23, 2020

Finding the solution of differential equations for a given condition

A differential equation has several solutions. Solving the differential equation for a given condition is equivalent to finding the solution that satisfies the condition. We apply the general process described earlier except that we find the constant c that satisfies the condition.

Example: 

Find the solution to the following differential equation: ty' + 2y = t² - t + 1 for the condition y(1) = 1/2

Solution

The general form of a differential equation of first order is : dy/dt + p(t)y = g(t).

Let's put the given equation in the general form by dividing both sides by t:
t/ty' + 2/ty = t²/t - t/t + 1/t
y' + 2/ty = t -1 + 1/t

Let's find μ(t) by substituting p(t) = 2/t in the formula:




Let's multiply the differential equation in its proper form by mu of t = t²
  (t²)y' +  (t²)2/ty = t³ -t² + t² 1/t
t²y' + 2ty = t³ -t² + t
The left side is the derivative of t²y. We have:
(t²y)' =  t³ -t² + t
Integrate both sides:
∫(t²y)'dt = ∫( t³ -t² + t)dt
t²y = t⁴/4 - t³/3 + t²/2 + c
y =  t⁴/4t² - t³/3t² + t²/2t² + c/t²
y = 1/4t² - 1/3t + 1/2 + c/t²
Let's substitute y by 1/2 and t by 1 in order to find c:
1/2 = 1/4(1) - 1/3(1) + 1/2 + c/1
1/2 = 1/4 - 1/3 + 1/2 + c
By reducing the fractions to the same denominator and simplifying:
6 = 3 -4 + 6 + 12c
0 = -1 + 12c
12c = 1 c = 1/12
Let's subsititute c in the expression of y:
y = 1/4t² - 1/3t + 1/2 + 1/12/t²

Practice

Solve the differential equation dv/dt = 9.8 - 0.196v satisfying the condittion v(0) = 48

Interested in reviewing Differential and Integral Calculus visit Center for Integral Development 







Saturday, April 18, 2020

Resolution of first order linear differential equations

Let's solve the first order linear differential equation dy/dt + p(t)y = g(t). Solving such an equation is to find y. The first thing we have to do is to find a magical function μ(t) called the integrating factor. We multiply both sides of the equation by this function. A subsequent set of steps will hopefully allow to find y. Rather than solving the general form let's solve a numerical example and then we will generalize the process to the solution of any first linear differential equation.

Let's solve the equation dv/dt = 9.8 - 0.196v
Let's put this equation in its general form: dv/dt + 0.19v = 9.8.
Let's find the magical function  μ(t). The solution of the general form of the first linear differential equation above defines this function as:




In the differential equation p(t) = 0.19 therefore




Let's multiply both sides of the equation by the value of μ(t)




The left side of the equation is the derivative of the product



Therefore we have




Let's integrate both sides of the equation we have:

We generalize the procedure used to solve the differential equation above. In order to solve a first linear differential equation having the form dy/dt + p(t)y = g(t) we follow the following steps:
1) We make sure that the differential equation is written in its proper explicit form
2) We find the integrating factor

3) We multiply both sides of the equation by μ(t)
4) We substitute the left side of the equation by the derivative of a product
5) We integrate both sides of the equation in order to find the unknown

Practice. Solve the following differential equation dy/dx = 3 + 2.5y

Interested in learning about limits, continuity, derivative, integral visit Center for Integral Development













Friday, March 6, 2020

Introduction to Differential Equations


In this post I am going to write about the fundamentals of Differential equations. But before we go any further let's remind the definition of equation.
An equation is a mathematical statement that two things are equal.
Ex: 15 = 9 + 6
Both sides of the sign equal have the same value.
An equation can also involve an unknown quantity
Ex: x + 5 = 9
Solving an equation is to find the value of the unknown. This unknown can have one or more values. It can also have an infinity of values.

Differential equation. Definition

A differential equation is an equation that is differential. Differential is an adjective that derives from the word "derivative". A differential equation is an equation that involves a function and its derivative. Solving a differential equation is to find the value of the unknown of this equation. The unknown is a function. Finding the solution of a differential equation is finding the value of the unknown function.

The solution of a differential equation can be one function, a set of functions or a class of functions.
Example: y + dy/dx = 7
y is the unknown function to find. dy/dx is its derivative.
 This equation can also be written as y + y' = 7 or f(x) + f'(x) = 7.

Ordinary differential equation

An ordinary differential equation is an equation where the unknown function has one independent variable.

Examples:











Partial differential equation

A partial differential equation is an equation where the unknown function has more than one independent variable.

Examples:










-
Order

The order of a differential equation is the highest derivative.

Examples:

dy/dx + y = 2x + 1 is a first order differential equation

dy/dx + d²y/dx² is a second order differential equation.

Linear differential equations

An ordinary differential equation has the form:


In a linear differential equation, there are no products of the function and its derivatives. The function and its derivatives have only the power of 1.

Examples:





2 y''' + 5y'' + 3y' + 6y = sint

cosydy/dx = y²dy/dx + y³ is non linear. The function has the power 2.

Interested in reviewing in a simple manner the notions of limit, continuity, derivatives and integral visit
Center for Integral Development