Skip to main content

Calculus III - 3-Dimensional Space: Equations of Lines

In this section we need to take a look at the equation of a line in  R 3 R 3 . As we saw in the previous section the equation  y = m x + b y = m x + b  does not describe a line in  R 3 R 3 , instead it describes a plane. This doesn’t mean however that we can’t write down an equation for a line in 3-D space. We’re just going to need a new way of writing down the equation of a curve. So, before we get into the equations of lines we first need to briefly look at vector functions. We’re going to take a more in depth look at vector functions later. At this point all that we need to worry about is notational issues and how they can be used to give the equation of a curve. The best way to get an idea of what a vector function is and what its graph looks like is to look at an example. So, consider the following vector function. → r ( t ) = ⟨ t , 1 ⟩ r → ( t ) = ⟨ t , 1 ⟩ A vector function is a function that takes one or more variables, one in this case, and returns a vector. Note as we

Differential Equations - Systems: Modeling


In this section we’re going to go back and revisit the idea of modeling only this time we’re going to look at it in light of the fact that we now know how to solve systems of differential equations.
We’re not actually going to be solving any differential equations in this section. Instead we’ll just be setting up a couple of problems that are extensions of some of the work that we’ve done in earlier modeling sections whether it is the first order modeling or the vibrations work we did in the second order chapter. Almost all of the systems that we’ll be setting up here will be nonhomogeneous systems (which we only briefly looked at), will be nonlinear (which we didn’t look at) and/or will involve systems with more than two differential equations (which we didn’t look at, although most of what we do know will still be true).


Mixing Problems


Let’s start things by looking at a mixing problem. The last time we saw these was back in the first order chapter. In those problems we had a tank of liquid with some type of contaminate dissolved in it. Liquid, possibly with more contaminate dissolved in it, entered the tank and liquid left the tank. In this situation we want to extend things out to the following situation.
We’ll now have two tanks that are interconnected with liquid potentially entering both and with an exit for some of the liquid if we need it (as illustrated by the lower connection). For this situation we’re going to make the following assumptions.
  1. The inflow and outflow from each tank are equal, or in other words the volume in each tank is constant. When we worked with a single tank we didn’t need to worry about this, but here if we don’t well end up with a system with nonconstant coefficients and those can be quite difficult to solve.
  2. The concentration of the contaminate in each tank is the same at each point in the tank. In reality we know that this won’t be true but without this assumption we’d need to deal with partial differential equations.
  3. The concentration of contaminate in the outflow from tank 1 (the lower connection in the figure above) is the same as the concentration in tank 1. Likewise, the concentration of contaminate in the outflow from tank 2 (the upper connection) is the same as the concentration in tank 2.
  4. The outflow from tank 1 is split and only some of the liquid exiting tank 1 actually reaches tank 2. The remainder exits the system completely. Note that if we don’t want any liquid to completely exit the system we can think of the exit as having a value that is turned off. Also note that we could just as easily done the same thing for the outflow from tank 2 if we’d wanted to.
Let’s take a look at a quick example.


Example 1 Two 1000 liter tanks are with salt water. Tank 1 contains 800 liters of water initially containing 20 grams of salt dissolved in it and tank 2 contains 1000 liters of water and initially has 80 grams of salt dissolved in it. Salt water with a concentration of ½ gram/liter of salt enters tank 1 at a rate of 4 liters/hour. Fresh water enters tank 2 at a rate of 7 liters/hour. Through a connecting pipe water flows from tank 2 into tank 1 at a rate of 10 liters/hour. Through a different connecting pipe 14 liters/hour flows out of tank 1 and 11 liters/hour are drained out of the pipe (and hence out of the system completely) and only 3 liters/hour flows back into tank 2. Set up the system that will give the amount of salt in each tank at any given time.

Okay, let Q1(t) and Q2(t) be the amount of salt in tank 1 and tank 2 at any time t respectively. Now all we need to do is set up a differential equation for each tank just as we did back when we had a single tank. The only difference is that we now need to deal with the fact that we’ve got a second inflow to each tank and the concentration of the second inflow will be the concentration of the other tank.
Recall that the basic differential equation is the rate of change of salt (Q) equals the rate at which salt enters minus the rate at salt leaves. Each entering/leaving rate is found by multiplying the flow rate times the concentration.
Here is the differential equation for tank 1.
Q1=(4)(12)+(10)(Q21000)(14)(Q1800)Q1(0)=20=2+Q21007Q1400In this differential equation the first pair of numbers is the salt entering from the external inflow. The second set of numbers is the salt that entering into the tank from the water flowing in from tank 2. The third set is the salt leaving tank as water flows out.
Here’s the second differential equation.
Q2=(7)(0)+(3)(Q1800)(10)(Q21000)Q2(0)=80=3Q1800Q2100Note that because the external inflow into tank 2 is fresh water the concentration of salt in this is zero.
In summary here is the system we’d need to solve,
Q1=2+Q21007Q1400Q1(0)=20Q2=3Q1800Q2100Q2(0)=80This is a nonhomogeneous system because of the first term in the first differential equation. If we had fresh water flowing into both of these we would in fact have a homogeneous system.


Population


The next type of problem to look at is the population problem. Back in the first order modeling section we looked at some population problems. In those problems we looked at a single population and often included some form of predation. The problem in that section was we assumed that the amount of predation would be constant. This however clearly won’t be the case in most situations. The amount of predation will depend upon the population of the predators and the population of the predators will depend, as least partially, upon the population of the prey.
So, in order to more accurately (well at least more accurate than what we originally did) we really need to set up a model that will cover both populations, both the predator and the prey. These types of problems are usually called predator-prey problems. Here are the assumptions that we’ll make when we build up this model.
  1. The prey will grow at a rate that is proportional to its current population if there are no predators.
  2. The population of predators will decrease at a rate proportional to its current population if there is no prey.
  3. The number of encounters between predator and prey will be proportional to the product of the populations.
  4. Each encounter between the predator and prey will increase the population of the predator and decrease the population of the prey.
So, given these assumptions let’s write down the system for this case.


Example 2 Write down the system of differential equations for the population of predators and prey using the assumptions above.

We’ll start off by letting x represent the population of the predators and y represent the population of the prey.
Now, the first assumption tells us that, in the absence of predators, the prey will grow at a rate of ay where a>0. Likewise, the second assumption tells us that, in the absence of prey, the predators will decrease at a rate of bx where b>0.
Next, the third and fourth assumptions tell us how the population is affected by encounters between predators and prey. So, with each encounter the population of the predators will increase at a rate of αxy and the population of the prey will decrease at a rate of βxy where α>0 and β>0.
Putting all of this together we arrive at the following system.
x=bx+αxy=x(αyb)y=ayβxy=y(aβx)Note that this is a nonlinear system and we’ve not (nor will we here) discuss how to solve this kind of system. We simply wanted to give a “better” model for some population problems and to point out that not all systems will be nice and simple linear systems.


Mechanical Vibrations


When we first looked at mechanical vibrations we looked at a single mass hanging on a spring with the possibility of both a damper and/or an external force acting on the mass. Here we want to look at the following situation.
In the figure above we are assuming that the system is at rest. In other words, all three springs are currently at their natural lengths and are not exerting any forces on either of the two masses and that there are no currently any external forces acting on either mass.
We will use the following assumptions about this situation once we start the system in motion.
  1. x1 will measure the displacement of mass m1 from its equilibrium (i.e. resting) position and x2 will measure the displacement of mass m2 from its equilibrium position.
  2. As noted in the figure above all displacement will be assumed to be positive if it is to the right of equilibrium position and negative if to the left of the equilibrium position.
  3. All forces acting to the right are positive forces and all forces acting to the left are negative forces.
  4. The spring constants, k1k2, and k3, are all positive and may or may not be the same value.
  5. The surface that the system is sitting on is frictionless and so the mass of each of the objects will not affect the system in any way.
Before writing down the system for this case recall that the force exerted by the spring on each mass is the spring constant times the amount that the spring has been compressed or stretched and we’ll need to be careful with signs to make sure that the force is acting in the correct direction.


Example 3 Write down the system of differential equations for the spring and mass system above.

To help us out let’s first take a quick look at a situation in which both of the masses have been moved. This is shown below.
Before proceeding let’s note that this is only a representation of a typical case, but most definitely not all possible cases.
In this case we’re assuming that both x1 and x2 are positive and that x2x1<0, or in other words, both masses have been moved to the right of their respective equilibrium points and that m1 has been moved farther than m2. So, under these assumptions on x1 and x2 we know that the spring on the left (with spring constant k1) has been stretched past it’s natural length while the middle spring (spring constant k2) and the right spring (spring constant k3) are both under compression.
Also, we’ve shown the external forces, F1(t) and F2(t), as present and acting in the positive direction. They do not, in practice, need to be present in every situation in which case we will assume that F1(t)=0 and/or F2(t)=0. Likewise, if the forces are in fact acting in the negative direction we will then assume that F1(t)<0 and/or F2(t)<0.
Before proceeding we need to talk a little bit about how the middle spring will behave as the masses move. Here are all the possibilities that we can have and the affect each will have on x2x1. Note that in each case the amount of compression/stretch in the spring is given by |x2x1| although we won’t be using the absolute value bars when we set up the differential equations.
  1. If both mass move the same amount in the same direction then the middle spring will not have changed length and we’ll have x2x1=0.
  2. If both masses move in the positive direction then the sign of x2x1 will tell us which has moved more. If m1moves more than m2 then the spring will be in compression and x2x1<0. Likewise, if m2 moves more than m1 then the spring will have been stretched and x2x1>0.
  3. If both masses move in the negative direction we’ll have pretty much the opposite behavior as #2. If m1 moves more than m2 then the spring will have been stretched and x2x1>0. Likewise, if m2 moves more than m1then the spring will be in compression and x2x1<0.
  4. If m1 moves in the positive direction and m2 moves in the negative direction then the spring will be in compression and x2x1<0.
  5. Finally, if m1 moves in the negative direction and m2 moves in the positive direction then the spring will have been stretched and x2x1>0.
Now, we’ll use the figure above to help us develop the differential equations (the figure corresponds to case 2 above…) and then make sure that they will also hold for the other cases as well.
Let’s start off by getting the differential equation for the forces acting on m1. Here is a quick sketch of the forces acting on m1 for the figure above.
In this case x1>0 and so the first spring has been stretched and so will exert a negative (i.e. to the left) force on the mass. The force from the first spring is thenk1x1 and the “-” is needed because the force is negative but both k1 and x1are positive.
Next, because we’re assuming that m1 has moved more than m2 and both have moved in the positive direction we also know that x2x1<0. Because m1 has moved more than m2 we know that the second spring will be under compression and so the force should be acting in the negative direction on m1 and so the force will be k2(x2x1). Note that because k2 is positive and x2x1 is negative this force will have the correct sign (i.e. negative).
The differential equation for m1 is then,
m1x1=k1x1+k2(x2x1)+F1(t)Note that this will also hold for all the other cases. If m1 has been moved in the negative direction the force form the spring on the right that acts on the mass will be positive and k1x1 will be a positive quantity in this case. Next, if the middle mass has been stretched (i.e. x2x1>0) then the force from this spring on m1 will be in the positive direction and k2(x2x1) will be a positive quantity in this case. Therefore, this differential equation holds for all cases not just the one we illustrated at the start of this problem.
Let’s now write down the differential equation for all the forces that are acting on m2. Here is a sketch of the forces acting on this mass for the situation sketched out in the figure above.
In this case x2 is positive and so the spring on the right is under compression and will exert a negative force on m2 and so this force should be k3x2, where the “-” is required because both k3 and x2 are positive. Also, the middle spring is still under compression but the force that it exerts on this mass is now a positive force, unlike in the case of m1, and so is given by k2(x2x1). The “-” on this force is required because x2x1 is negative and the force must be positive.
The differential equation for m2 is then,
m2x2=k3x2k2(x2x1)+F2(t)We’ll leave it to you to verify that this differential equation does in fact hold for all the other cases.
Putting all of this together and doing a little rewriting will then give the following system of differential equations for this situation.
m1x1=(k1+k2)x1+k2x2+F1(t)m2x2=k2x1(k2+k3)x2+F2(t)This is a system to two linear second order differential equations that may or may not be nonhomogeneous depending whether there are any external forces, F1(t) and F2(t), acting on the masses.

We have not talked about how to solve systems of second order differential equations. However, it can be converted to a system of first order differential equations as the next example shows and in many cases we could solve that.



Example 4 Convert the system from the previous example to a system of 1st order differential equations.

This isn’t too hard to do. Recall that we did this for single higher order differential equations earlier in the chapter when we first started to look at systems. To convert this to a system of first order differential equations we can make the following definitions.
u1=x1u2=x1u3=x2u4=x2We can then convert each of the differential equations as we did earlier in the chapter.
u1=x1=u2u2=x1=1m1((k1+k2)x1+k2x2+F1(t))=1m1((k1+k2)u1+k2u3+F1(t))u3=x2=u4u4=x2=1m2(k2x1(k2+k3)x2+F2(t))=1m2(k2u1(k2+k3)u3+F2(t))Eliminating the “middle” step we get the following system of first order differential equations.
u1=u2u2=1m1((k1+k2)u1+k2u3+F1(t))u3=u4u4=1m2(k2u1(k2+k3)u3+F2(t))The matrix form of this system would be,
u=[0100(k1+k2)m10k2m100001k2m20(k2+k3)m20]u+(0F1(t)m10F2(t)m2)where, u=(u1u2u3u4)While we never discussed how to solve systems of more than two linear first order differential equations we know most of what we need to solve this.
In an earlier section we discussed briefly solving nonhomogeneous systems and all of that information is still valid here.
For the homogenous system, that we’d still need to solve for the general solution to the nonhomogeneous system, we know most of what we need to know in order to solve this. The only issues that we haven’t dealt with are what to do with repeated complex eigenvalues (which are now a possibility) and what to do with eigenvalues of multiplicity greater than 2 (which are again now a possibility). Both of these topics will be briefly discussed in a later section.

Comments

Popular posts from this blog

Digital Signal Processing - Basic Continuous Time Signals

To test a system, generally, standard or basic signals are used. These signals are the basic building blocks for many complex signals. Hence, they play a very important role in the study of signals and systems. Unit Impulse or Delta Function A signal, which satisfies the condition,   δ ( t ) = lim ϵ → ∞ x ( t ) δ ( t ) = lim ϵ → ∞ x ( t )   is known as unit impulse signal. This signal tends to infinity when t = 0 and tends to zero when t ≠ 0 such that the area under its curve is always equals to one. The delta function has zero amplitude everywhere except at t = 0. Properties of Unit Impulse Signal δ(t) is an even signal. δ(t) is an example of neither energy nor power (NENP) signal. Area of unit impulse signal can be written as; A = ∫ ∞ − ∞ δ ( t ) d t = ∫ ∞ − ∞ lim ϵ → 0 x ( t ) d t = lim ϵ → 0 ∫ ∞ − ∞ [ x ( t ) d t ] = 1 Weight or strength of the signal can be written as; y ( t ) = A δ ( t ) y ( t ) = A δ ( t ) Area of the weighted impulse signal can

Differential Equations - First Order: Bernoulli

In this section we are going to take a look at differential equations in the form, y ′ + p ( x ) y = q ( x ) y n y ′ + p ( x ) y = q ( x ) y n where  p ( x ) p ( x )  and  q ( x ) q ( x )  are continuous functions on the interval we’re working on and  n n  is a real number. Differential equations in this form are called  Bernoulli Equations . First notice that if  n = 0 n = 0  or  n = 1 n = 1  then the equation is linear and we already know how to solve it in these cases. Therefore, in this section we’re going to be looking at solutions for values of  n n  other than these two. In order to solve these we’ll first divide the differential equation by  y n y n  to get, y − n y ′ + p ( x ) y 1 − n = q ( x ) y − n y ′ + p ( x ) y 1 − n = q ( x ) We are now going to use the substitution  v = y 1 − n v = y 1 − n  to convert this into a differential equation in terms of  v v . As we’ll see this will lead to a differential equation that we can solve. We are going to have to be c

Differential Equations - Systems: Solutions

Now that we’ve got some of the basics out of the way for systems of differential equations it’s time to start thinking about how to solve a system of differential equations. We will start with the homogeneous system written in matrix form, → x ′ = A → x (1) (1) x → ′ = A x → where,  A A  is an  n × n n × n  matrix and  → x x →  is a vector whose components are the unknown functions in the system. Now, if we start with  n = 1 n = 1 then the system reduces to a fairly simple linear (or separable) first order differential equation. x ′ = a x x ′ = a x and this has the following solution, x ( t ) = c e a t x ( t ) = c e a t So, let’s use this as a guide and for a general  n n  let’s see if → x ( t ) = → η e r t (2) (2) x → ( t ) = η → e r t will be a solution. Note that the only real difference here is that we let the constant in front of the exponential be a vector. All we need to do then is plug this into the differential equation and see what we get. First notice that

Digital Signal Processing - Miscellaneous Signals

There are other signals, which are a result of operation performed on them. Some common type of signals are discussed below. Conjugate Signals Signals, which satisfies the condition  x ( t ) = x ∗ ( − t ) are called conjugate signals. Let  x ( t ) = a ( t ) + j b ( t ) So,  x ( − t ) = a ( − t ) + j b ( − t ) And  x ∗ ( − t ) = a ( − t ) − j b ( − t ) By Condition,  x ( t ) = x ∗ ( − t ) If we compare both the derived equations 1 and 2, we can see that the real part is even, whereas the imaginary part is odd. This is the condition for a signal to be a conjugate type. Conjugate Anti-Symmetric Signals Signals, which satisfy the condition  x ( t ) = − x ∗ ( − t ) are called conjugate anti-symmetric signal Let  x ( t ) = a ( t ) + j b ( t ) So  x ( − t ) = a ( − t ) + j b ( − t ) And  x ∗ ( − t ) = a ( − t ) − j b ( − t ) − x ∗ ( − t ) = − a ( − t ) + j b ( − t ) By Condition  x ( t ) = − x ∗ ( − t ) Now, again compare, both the equations just as w

Calculus III - 3-Dimensional Space: Equations of Lines

In this section we need to take a look at the equation of a line in  R 3 R 3 . As we saw in the previous section the equation  y = m x + b y = m x + b  does not describe a line in  R 3 R 3 , instead it describes a plane. This doesn’t mean however that we can’t write down an equation for a line in 3-D space. We’re just going to need a new way of writing down the equation of a curve. So, before we get into the equations of lines we first need to briefly look at vector functions. We’re going to take a more in depth look at vector functions later. At this point all that we need to worry about is notational issues and how they can be used to give the equation of a curve. The best way to get an idea of what a vector function is and what its graph looks like is to look at an example. So, consider the following vector function. → r ( t ) = ⟨ t , 1 ⟩ r → ( t ) = ⟨ t , 1 ⟩ A vector function is a function that takes one or more variables, one in this case, and returns a vector. Note as we

Differential Equations - First Order: Modeling - i

We now move into one of the main applications of differential equations both in this class and in general. Modeling is the process of writing a differential equation to describe a physical situation. Almost all of the differential equations that you will use in your job (for the engineers out there in the audience) are there because somebody, at some time, modeled a situation to come up with the differential equation that you are using. This section is not intended to completely teach you how to go about modeling all physical situations. A whole course could be devoted to the subject of modeling and still not cover everything! This section is designed to introduce you to the process of modeling and show you what is involved in modeling. We will look at three different situations in this section : Mixing Problems, Population Problems, and Falling Objects. In all of these situations we will be forced to make assumptions that do not accurately depict reality in most cases, but wi

Differential Equations - Basic Concepts: Definitions

Differential Equation The first definition that we should cover should be that of  differential equation . A differential equation is any equation which contains derivatives, either ordinary derivatives or partial derivatives. There is one differential equation that everybody probably knows, that is Newton’s Second Law of Motion. If an object of mass  m m  is moving with acceleration  a a  and being acted on with force  F F  then Newton’s Second Law tells us. F = m a (1) (1) F = m a To see that this is in fact a differential equation we need to rewrite it a little. First, remember that we can rewrite the acceleration,  a a , in one of two ways. a = d v d t OR a = d 2 u d t 2 (2) (2) a = d v d t OR a = d 2 u d t 2 Where  v v  is the velocity of the object and  u u  is the position function of the object at any time  t t . We should also remember at this point that the force,  F F  may also be a function of time, velocity, and/or position. So, with all these things in

Differential Equations - Partial: Summary of Separation of Variables

Throughout this chapter we’ve been talking about and solving partial differential equations using the method of separation of variables. However, the one thing that we’ve not really done is completely work an example from start to finish showing each and every step. Each partial differential equation that we solved made use somewhere of the fact that we’d done at least part of the problem in another section and so it makes some sense to have a quick summary of the method here. Also note that each of the partial differential equations only involved two variables. The method can often be extended out to more than two variables, but the work in those problems can be quite involved and so we didn’t cover any of that here. So with all of that out of the way here is a quick summary of the method of separation of variables for partial differential equations in two variables. Verify that the partial differential equation is linear and homogeneous. Verify that the boundary condi

Differential Equations - Systems: Repeated Eigenvalues - i

This is the final case that we need to take a look at. In this section we are going to look at solutions to the system, → x ′ = A → x x → ′ = A x → where the eigenvalues are repeated eigenvalues. Since we are going to be working with systems in which  A A  is a  2 × 2 2 × 2  matrix we will make that assumption from the start. So, the system will have a double eigenvalue,  λ λ . This presents us with a problem. We want two linearly independent solutions so that we can form a general solution. However, with a double eigenvalue we will have only one, → x 1 = → η e λ t x → 1 = η → e λ t So, we need to come up with a second solution. Recall that when we looked at the double root case with the second order differential equations we ran into a similar problem. In that section we simply added a  t t  to the solution and were able to get a second solution. Let’s see if the same thing will work in this case as well. We’ll see if → x = t e λ t → η x → = t e λ t η → will also be a

Differential Equations - First Order: Modeling - ii

Example 4  A 50 kg object is shot from a cannon straight up with an initial velocity of 10m/s off a bridge that is 100 meters above the ground. If air resistance is given by 5 v v  determine the velocity of the mass when it hits the ground. First, notice that when we say straight up, we really mean straight up, but in such a way that it will miss the bridge on the way back down. Here is a sketch of the situation. Notice the conventions that we set up for this problem. Since the vast majority of the motion will be in the downward direction we decided to assume that everything acting in the downward direction should be positive. Note that we also defined the “zero position” as the bridge, which makes the ground have a “position” of 100. Okay, if you think about it we actually have two situations here. The initial phase in which the mass is rising in the air and the second phase when the mass is on its way down. We will need to examine both situations and set up an IVP for