Вы находитесь на странице: 1из 25

Calculus Index

Homogeneous Functions

Advanced
Select Language ▼
We may use Cookies
OK

Hide Ads
About Ads

 Home

 Algebra

 Data

 Geometry

 Measure

 Numbers

 Dictionary

 Games

 Puzzles

 Worksheets
Link To UsFacebookTwitterPinterestLinkedIneMail a Friend

Homogeneous Differential
Equations
A Differential Equation is an equation with a function and one or more of
its derivatives :
Example: an equation with the function y and its derivative dydx

Here we look at a special method for solving " Homogeneous Differential


Equations"

Homogeneous Differential Equations


A first order Differential Equation is Homogeneous when it can be in this
form:

dydx = F( yx )

We can solve it using Separation of Variables but first we create a new


variable v = yx

v = yx which is also y = vx
And dydx = d (vx)dx = vdxdx + xdvdx (by the Product Rule)
Which can be simplified to dydx = v + xdvdx

Using y = vx and dydx = v + xdvdx we can solve the Differential Equation.

An example will show how it is all done:

Example: Solve dydx = x2 + y2xy

Can we get it in F( yx ) style?

Start with:x2 + y2xy


Separate terms:x2xy + y2xy
Simplify:xy + yx
Reciprocal of first term:( yx )−1 + yx

Yes, we have a function of (y/x).

So let's go:

Start with:dydx = ( yx )−1 + yx


y = vx and dydx = v + xdvdx:v + xdvdx = v−1 + v
Subtract v from both sides:xdvdx = v−1

Now use Separation of Variables :

Separate the variables:v dv = 1x dx


Put the integral sign in front:∫v dv = ∫1x dx
Integrate:v22 = ln(x) + C
Then we make C = ln(k):v22 = ln(x) + ln(k)
Combine ln:v22 = ln(kx)
Simplify:v = ±√(2 ln(kx))

Now substitute back v = yx

Substitute v = yx:yx = ±√(2 ln(kx))


Simplify:y = ±x √(2 ln(kx))

And we have the solution.

Another example:

Example: Solve dydx = y(x−y)x2

Can we get it in F( yx ) style?

Start with:y(x−y)x2
Separate terms:xyx2 − y2x2
Simplify:yx − ( yx )2

Yes! So let's go:

Start with:dydx = yx − ( yx )2
y = vx and dydx = v + xdvdxv + xdvdx = v − v2
Subtract v from both sides:xdvdx = −v2

Now use Separation of Variables :

Separate the variables:−1v2 dv = 1x dx


Put the integral sign in front:∫−1v2 dv = ∫1x dx
Integrate:1v = ln(x) + C
Then we make C = ln(k):1v = ln(x) + ln(k)
Combine ln:1v = ln(kx)
Simplify:v = 1ln(kx)

Now substitute back v = yx

Substitute v = yx:yx = 1ln(kx)


Simplify:y = xln(kx)

And we have the solution.

And one last example:

Example: Solve dydx = x−yx+y

Can we get it in F( yx ) style?

Start with:x−yx+y
Divide through by x:x/x−y/xx/x+y/x
Simplify:1−y/x1+y/x

Yes! So let's go:

Start with:dydx = 1−y/x1+y/x


y = vx and dydx = v + xdvdxv + xdvdx = 1−v1+v
Subtract v from both sides:xdvdx = 1−v1+v − v
Then:xdvdx = 1−v1+v − v+v21+v
Simplify:xdvdx = 1−2v−v21+v

Now use Separation of Variables :

Separate the variables:1+v1−2v−v2 dv = 1x dx


Put the integral sign in front:∫1+v1−2v−v2 dv = ∫1x dx
Integrate:−12 ln(1−2v−v2) = ln(x) + C
Then we make C = ln(k):−12 ln(1−2v−v2) = ln(x) + ln(k)
Combine ln:(1−2v−v2)−½ = kx
Square and Reciprocal:1−2v−v2 = 1k2x2

Now substitute back v = yx

Substitute v = yx:1−2( yx )−( yx )2 = 1k2x2


Multiply through by x2:x2−2xy−y2 = 1k2
We are nearly there ... it is nice to separate out y though!
We can try to factor x2−2xy−y2 but we must do some rearranging first:

Change signs:y2+2xy−x2 = − 1k2


Replace − 1k2 by c:y2+2xy−x2 = c
Add 2x2 to both sides:y2+2xy+x2 = 2x2+c
Factor:(y+x)2 = 2x2+c
Square root:y+x = ±√(2x2+c)
Subtract x from both sides:y = ±√(2x2+c) − x

And we have the solution.

Homogeneous FunctionsDifferential EquationCalculus Index


Search ○ Index ○ About ○ Contact ○ Cite This Page ○ Privacy
Copyright © 2017 MathsIsFun.com
Calculus Index

Differential Equations

Advanced
Select Language ▼
We may use Cookies
OK

Hide Ads
About Ads

 Home

 Algebra

 Data

 Geometry

 Measure

 Numbers

 Dictionary

 Games

 Puzzles

 Worksheets
Link To UsFacebookTwitterPinterestLinkedIneMail a Friend

Solution of First Order


Linear Differential
Equations
You might like to read about Differential Equations and Separation of
Variables first!

A Differential Equation is an equation with a function and one or more of


its derivatives :

Example: an equation with the function y and its derivative dydx

Here we will look at solving a special class of Differential Equations called First
Order Linear Differential Equations

First Order
They are "First Order" when there is only dydx , not d2ydx2 or d3ydx3 etc

Linear
A first order differential equation is linear when it can be made to look like
this:

dydx + P(x)y = Q(x)

Where P(x) and Q(x) are functions of x.

To solve it there is a special method:

 We invent two new functions of x, call them u and v, and say that y=uv.
 We then solve to find u, and then find v, and tidy up and we are done!

And we also use the derivative of y=uv (see Derivative Rules (Product Rule) ):

dydx = udvdx + vdudx


Steps
Here is a step-by-step method for solving them:

 1. Substitute y = uv, and

dydx = udvdx + vdudx

into

dydx + P(x)y = Q(x)

 2. Factor the parts involving v


 3. Put the v term equal to zero (this gives a differential equation in u and x which
can be solved in the next step)
 4. Solve using separation of variables to find u
 5. Substitute u back into the equation we got at step 2
 6. Solve that to find v
 7. Finally, substitute u and v into y = uv to get our solution!

Let's try an example to see:

Example: Solve this:

dydx − yx = 1

First, is this linear? Yes, as it is in the form

dydx + P(x)y = Q(x)


where P(x) = −1x and Q(x) = 1

So let's follow the steps:

Step 1: Substitute y = uv, and dydx = u dvdx + v dudx

So this:dydx − yx = 1
Becomes this:udvdx + vdudx − uvx = 1
Step 2: Factor the parts involving v

Factor v:u dvdx + v( dudx − ux ) = 1

Step 3: Put the v term equal to zero

v term equal to zero:dudx − ux = 0


So:dudx = ux

Step 4: Solve using separation of variables to find u

Separate variables:duu = dxx


Put integral sign:∫ duu = ∫ dxx
Integrate:ln(u) = ln(x) + C
Make C = ln(k):ln(u) = ln(x) + ln(k)
And so:u = kx

Step 5: Substitute u back into the equation at Step 2

(Remember v term equals 0 so can be ignored):kx dvdx = 1

Step 6: Solve this to find v

Separate variables:k dv = dxx


Put integral sign:∫ k dv = ∫ dxx
Integrate:kv = ln(x) + C
Make C = ln(c):kv = ln(x) + ln(c)
And so:kv = ln(cx)
And so:v = 1k ln(cx)

Step 7: Substitute into y = uv to find the solution to the original equation.

y = uv:y = kx 1k ln(cx)
Simplify:y = x ln(cx)

And it produces this nice family of curves:

y = x ln(cx) for various values of c

What is the meaning of those curves? They are the solution to the
equation dydx − yx = 1
In other words:

Anywhere on any of those curves


the slope minus yx equals 1

Let's check a few points on the c=0.6 curve:

Estmating off the graph (to 1 decimal place):

Point x y Slope (dydx) dydx − yx

A 0.6 −0.6 0 0 − −0.60.6 = 0 + 1 = 1


B 1.6 0 1 1 − 01.6 = 1 − 0 = 1
C 2.5 1 1.4 1.4 − 12.5 = 1.4 − 0.4 = 1

Why not test a few points yourself? You can plot the curve here .

Perhaps another example to help you? Maybe a little harder?

Example: Solve this:

dydx − 3yx = x

First, is this linear? Yes, as it is in the form

dydx + P(x)y = Q(x)


where P(x) = − 3x and Q(x) = x

So let's follow the steps:

Step 1: Substitute y = uv, and dydx = u dvdx + v dudx

So this:dydx − 3yx = x
Becomes this: u dvdx + v dudx − 3uvx = x

Step 2: Factor the parts involving v

Factor v:u dvdx + v( dudx − 3ux ) = x


Step 3: Put the v term equal to zero

v term = zero:dudx − 3ux = 0


So:dudx = 3ux

Step 4: Solve using separation of variables to find u

Separate variables:duu = 3 dxx


Put integral sign:∫ duu = 3 ∫ dxx
Integrate:ln(u) = 3 ln(x) + C
Make C = −ln(k):ln(u) + ln(k) = 3ln(x)
Then:uk = x3
And so:u = x3k

Step 5: Substitute u back into the equation at Step 2

(Remember v term equals 0 so can be ignored):( x3k ) dvdx = x

Step 6: Solve this to find v

Separate variables:dv = k x−2 dx


Put integral sign:∫ dv = ∫ k x−2 dx
Integrate:v = −k x−1 + D

Step 7: Substitute into y = uv to find the solution to the original equation.

y = uv:y = x3k ( −k x−1 + D )


Simplify:y = −x2 + Dk x3
Replace D/k with a single constant c:y = c x3 − x2

And it produces this nice family of curves:

y = c x3 − x2 for various values of c

And one more example, this time even harder:

Example: Solve this:

dydx + 2xy= −2x3

First, is this linear? Yes, as it is in the form


dydx + P(x)y = Q(x)
where P(x) = 2x and Q(x) = −2x3

So let's follow the steps:

Step 1: Substitute y = uv, and dydx = u dvdx + v dudx

So this:dydx + 2xy= −2x3


Becomes this: u dvdx + v dudx + 2xuv = −2x3

Step 2: Factor the parts involving v

Factor v:u dvdx + v( dudx + 2xu ) = −2x3

Step 3: Put the v term equal to zero

v term = zero:dudx + 2xu = 0

Step 4: Solve using separation of variables to find u

Separate variables:duu = −2x dx


Put integral sign:∫ duu = −2 ∫ x dx
Integrate:ln(u) = −x2 + C
Make C = −ln(k):ln(u) + ln(k) = −x2
Then:uk = e−x2
And so:u = e−x2k

Step 5: Substitute u back into the equation at Step 2

(Remember v term equals 0 so can be ignored):( e−x2k ) dvdx = −2x3

Step 6: Solve this to find v

Separate variables:dv = −2k x3 ex2 dx


Put integral sign:∫ dv = ∫ −2k x3 ex2 dx
Integrate:v = oh no! this is hard!

Let's see ... we can integrate by parts ... which says:

∫ RS dx = R ∫ S dx − ∫ R' ( ∫ S dx) dx

(Side Note: we use R and S here, using u and v could be confusing as they
already mean something else.)
Choosing R and S is very important, this is the best choice we found:

 R = −x2 and
 S = 2x ex2

So let's go:

First pull out k:v = k ∫ −2x3 ex2 dx


R = −x2 and S = 2x ex2:v = k ∫ (−x2)(2xex2) dx
Now integrate by parts:v = kR ∫ S dx − k ∫ R' ( ∫ S dx) dx
Put in R = −x2 and S = 2x ex2
And also R' = −2x and ∫ S dx = ex2

So it becomes:v = −kx2 ∫ 2x ex2 dx − k ∫ −2x (ex2) dx


Now Integrate:v = −kx2 ex2 + k ex2 + D
Simplify:v = kex2 (1−x2) + D

Step 7: Substitute into y = uv to find the solution to the original equation.

y = uv:y = e−x2k ( kex2 (1−x2) + D )


Simplify:y =1 − x2 + ( Dk)e−x2
Replace D/k with a single constant c:y = 1 − x2 + c e−x2

Done!

Differential EquationsSeparation of VariablesCalculus Index


Search ○ Index ○ About ○ Contact ○ Cite This Page ○ Privacy
Copyright © 2017 MathsIsFun.com
Calculus Index

Differential Equation

Advanced
Select Language ▼
We may use Cookies
OK

Hide Ads
About Ads

 Home

 Algebra

 Data

 Geometry

 Measure

 Numbers

 Dictionary

 Games

 Puzzles

 Worksheets
Link To UsFacebookTwitterPinterestLinkedIneMail a Friend

Separation of Variables
Separation of Variables is a special method to solve some Differential Equations

A Differential Equation is an equation with a function and one or more of


its derivatives :
Example: an equation with the function y and its derivative dydx

When Can I Use it?

Separation of Variables can be used when:


All the y terms (including dy) can be moved to one side of the equation, and
All the x terms (including dx) to the other side.

Method
Three Steps:

 Step 1 Move all the y terms (including dy) to one side of the equation and all the
x terms (including dx) to the other side.
 Step 2 Integrate one side with respect to y and the other side with respect to x.
Don't forget "+ C" (the constant of integration).
 Step 3 Simplify
Example: Solve this (k is a constant):

dydx = ky

Step 1 Separate the variables by moving all the y terms to one side of the
equation and all the x terms to the other side:

Multiply both sides by dx: dy = ky dx


Divide both sides by y:dyy = k dx

Step 2 Integrate both sides of the equation separately:

Put the integral sign in front:∫ dyy = ∫ k dx


Integrate left side: ln(y) + C = ∫ k dx
Integrate right side: ln(y) + C = kx + D

C is the constant of integration. And we use D for the other, as it is a different


constant.

Step 3 Simplify:

We can roll the two constants into one (a=D−C): ln(y) = kx + a


e(ln(y)) = y , so let's take exponents on both sides:y = ekx + a
And ekx + a = ekx ea so we get:y = ekx ea
ea is just a constant so we replace it with c:y = cekx

We have solved it:

y = cekx

This is a general type of first order differential equation which turns up in all
sorts of unexpected places in real world examples.

We used y and x, but the same method works for other variable names, like
this:

Example: Rabbits!

The more rabbits you have the more baby rabbits you will get. Then those
rabbits grow up and have babies too! The population will grow faster and faster.

The important parts of this are:

 the population N at any time t


 the growth rate r
 the population's rate of change dNdt
The rate of change at any time equals the growth rate times the population:

dN dt = rN

But hey! This is the same as the equation we just solved! It just has different
letters:

 N instead of y
 t instead of x
 r instead of k

So we can jump to a solution:

N = cert

And here is an example, the graph of N = 0.3e2t:

Exponential Growth

There are other equations that follow this pattern such as continuous
compound interest .

More Examples
OK, on to some different examples of separating the variables:
Example: Solve this:

dydx = 1y

Step 1 Separate the variables by moving all the y terms to one side of the
equation and all the x terms to the other side:

Multiply both sides by dx:dy = (1/y) dx


Multiply both sides by y:y dy = dx

Step 2 Integrate both sides of the equation separately:

Put the integral sign in front:∫ y dy = ∫ dx


Integrate each side: (y2)/2 = x + C

We integrated both sides in the one line.

We also used a shortcut of just one constant of integration C. This is perfectly


OK as we could have +D on one, +E on the other and just say that C = E−D.

Step 3 Simplify:

Multiply both sides by 2:y2 = 2(x + C)


Square root of both sides:y = ±√(2(x + C))

Note: This is not the same as y = √(2x) + C, because the C was


added before we took the square root. This happens a lot with differential
equations. We cannot just add the C at the end of the process. It is added when
doing the integration.

We have solved it:

y = ±√(2(x + C))

A harder example:

Example: Solve this:

dydx = 2xy1+x2
Step 1 Separate the variables:

Multiply both sides by dx, divide both sides by y:

1y dy = 2x1+x2dx

Step 2 Integrate both sides of the equation separately:

∫1y dy = ∫2x1+x2dx

The left side is a simple logarithm, the right side can be integrated using
substitution:

Let u = 1 + x2, so du = 2x dx:∫1y dy = ∫1udu


Integrate:ln(y) = ln(u) + C
Then we make C = ln(k):ln(y) = ln(u) + ln(k)
So we can get this:y = uk
Now put u = 1 + x2 back again:y = k(1 + x2)

Step 3 Simplify:

It is already as simple as can be. We have solved it:

y = k(1 + x2)

An even harder example: the famous Verhulst Equation

Example: Rabbits Again!

Remember our growth Differential Equation:

dNdt = rN
Well, that growth can't go on forever as they will soon run out of available food.

A guy called Verhulst included k (the maximum population the food can
support) to get:

dNdt = rN(1−N/k)

The Verhulst Equation

Can this be solved?

Yes, with the help of one trick ...

Step 1 Separate the variables:

Multiply both sides by dt: dN = rN(1−N/k) dt


Divide both sides by N(1-N/k):1N(1−N/k)dN = r dt

Step 2 Integrate:

∫1N(1−N/k)dN = ∫ r dt

Hmmm... the left side looks hard to integrate. In fact it can be done with a little
trick from Partial Fractions ... we rearrange it like this:

We start with this:1N(1−N/k)


Multiply top and bottom by k:kN(k−N)
Now here is the trick, add N and −N to the top:N+k−NN(k−N)
and split it into two fractions:NN(k−N) + k−NN(k−N)
Simplify each fraction:1k−N + 1N

Now it is a lot easier to solve. We can integrate each term separately, like this:

Our full equation is now:∫1k−NdN + ∫1NdN = ∫ r dt


Integrate:−ln(k−N) + ln(N) = rt + C

(Why did that become minus ln(k−N)? Because we are integrating with respect
to N.)
Step 3 Simplify:

Negative of all terms:ln(k−N) − ln(N) = −rt − C


Combine ln():ln((k−N)/N) = −rt − C
Now take exponents on both sides:(k−N)/N = e−rt−C
Separate the powers of e:(k−N)/N = e−rt e−C
e−C is a constant, we can replace it with A:(k−N)/N = Ae−rt

We are getting close! Just a little more algebra to get N on its own:

Separate the fraction terms:(k/N)−1 = Ae−rt


Add 1 to both sides:k/N = 1 + Ae−rt
Divide both by k:1/N = (1 + Ae−rt)/k
Reciprocal of both sides:N = k/(1 + Ae−rt)

And we have our solution:

N = k1 + Ae−rt

Here is an example, the graph of 401 + 5e−2t

It starts rising exponentially,


then flattens out as it reaches k=40

Differential EquationCalculus Index


Search ○ Index ○ About ○ Contact ○ Cite This Page ○ Privacy
Copyright © 2017 MathsIsFun.com

Calculus Index

Advanced
Select Language ▼
We may use Cookies
OK
Hide Ads
About Ads

 Home

 Algebra

 Data

 Geometry

 Measure

 Numbers

 Dictionary

 Games

 Puzzles

 Worksheets
Link To UsFacebookTwitterPinterestLinkedIneMail a Friend

Homogeneous Functions

Homogeneous
To be Homogeneous a function must pass this test:
f(zx,zy) = znf(x,y)

In other words

Homogeneous is when we can take a function:f(x,y)


multiply each variable by z:f(zx,zy)
and then can rearrange it to get this:znf(x,y)

An example will help:

Example: x + 3y
Start with:f(x,y) = x + 3y
Multiply each variable by z:f(zx,zy) = zx + 3zy
Let's rearrange it by factoring out z:f(zx,zy) = z(x + 3y)
And x + 3y is f(x,y):f(zx,zy) = zf(x,y)
Which is what we wanted, with n=1:f(zx,zy) = z1f(x,y)

Yes it is homogeneous!

The value of n is called the degree. So in that example the degree is 1.

Example: 4x2 + y2
Start with:f(x,y) = 4x2 + y2
Multiply each variable by z:f(zx,zy) = 4(zx)2 + (zy)2
Which is:f(zx,zy) = 4z2x2 + z2y2
Factoring out z2:f(zx,zy) = z2(4x2 + y2)
And 4x2 + y2 is f(x,y):f(zx,zy) = z2f(x,y)

Yes 4x2 + y2 is homogeneous.

And its degree is 2.

How about this one:

Example: x3 + y2
Start with:f(x,y) = x3 + y2
Multiply each variable by z:f(zx,zy) = (zx)3 + (zy)2
Which is:f(zx,zy) = z3x3 + z2y2
Factoring out z2:f(zx,zy) = z2(zx3 + y2)
But zx3 + y2 is NOT f(x,y)!
So x3 + y2 is NOT homogeneous.

And notice that x and y have different powers: x3 but y2 which, for polynomial
functions, is often a good test.

But not all functions are polynomials. How about this one:

Example: the function x cos(y/x)


Start with:f(x,y) = x cos(y/x)
Multiply each variable by z:f(zx,zy) = zx cos(zy/zx)
Which is:f(zx,zy) = zx cos(y/x)
Factoring out z:f(zx,zy) = z(x cos(y/x))
And x cos(y/x) is f(x,y):f(zx,zy) = z1f(x,y)

So x cos(y/x) is homogeneous, with degree of 1.

Notice that (y/x) is "safe" because (zy/zx) cancels back to (y/x)

Homogeneous, in English, means "of the same kind"


For example "Homogenized Milk" has the fatty parts spread evenly through the
milk (rather than having milk with a fatty layer on top.)

Homogeneous applies to functions like f(x), f(x,y,z) etc, it is a


general idea.

Homogeneous Differential Equations


A first order Differential Equation is homogeneous when it can be in this
form:

In other words, when it can be like this:

M(x,y) dx + N(x,y) dy = 0

And both M(x,y) and N(x,y) are homogeneous functions of the same degree.
Find out more on Solving Homogeneous Differential Equations .

Calculus Index
Search ○ Index ○ About ○ Contact ○ Cite This Page ○ Privacy
Copyright © 2017 MathsIsFun.com

Вам также может понравиться