Showing posts with label equations. Show all posts
Showing posts with label equations. Show all posts

Thursday, April 28, 2011

Solving Non-Homogeneous Systems with Undetermined Coefficients

This works basically the same way as using the method for non-system differential equations.  You just assume the form of the solution and solve for the constants.  The difference this time however, is that the constants are vectors.

For this first example, since the function being added is a constant, we will assume the solution is a constant.  Don't forget to find the homogeneous solution first!
Thats all the time I have for this post. :p

Homogeneous Linear System with Constant Coefficients

So in this post I am going to talk about solving homogeneous linear systems with constant coefficients.  It will be assumed that anyone reading this knows basic vector and matrix operations.  We are going to solve..
As with normal, non system differential equations, the guess for the solution will be an exponential function.
Notice that we need to multiply the exponential by the vector u.  The lambda in the exponential is our old friend the eigenvalue, and the corresponding vector is called the eigenvector.  We MUST multiply the exponential by the eigenvector, otherwise it wouldn't make sense to have a scalar solution to a vector problem.  All we need to do now is plug this into the system.
It is tempting to try and divide by the vector "u" but this CANNOT be done! Division doesn't exist in vectors, it isn't defined!  Notice that we have multiplied the eigenvalue by the identity matrix, this is analogous to multiplying by 1 so we aren't changing anything.  The only reason for doing this was to be able to combine the matrix A with the eigenvalues.  In order to solve this system we first realize that the vector x is not equal to the zero vector, yet the product of x and A-lambda I is equal to zero.  This implies that the matrix A-lambda I is singular which means its determinant is equal to zero.  Therefore the problem is now..
The resulting polynomial is termed the characteristic equation of the matrix.

Solve: (I am just going to show the math with little explanation, as I use this blog as a study tool.)

So what happens if the eigenvalues are complex?  Our old friend Euler's Formula comes into play, just as it did in normal differential equations.  (By normal, I mean non-system.)


So in this next derivation, we will assume the eigenvalues to our system are complex.  Complex numbers always come in pairs remember!  The beauty of this is, when you go to find the eigenvectors, you only need to use one of the complex eigenvalues, the other eigenvector you will get using the other one will just be the conjugate of the first eigenvector.
It can be shown that taking the real part of the imaginary part of this expression (in other words, using the second half without the "i") will also be a solution.  We only used one eigenvector but we would have the same results if we used the other one.  Therefore the two solutions are..

Solve:

Solve:

Notice that we wrote the answer as one matrix called the fundamental matrix.


Tuesday, April 26, 2011

Nice Properties of Sturm-Liouville Equations

So in my previous post I brought up Sturm-Liouville Equations and mentioned they had nice properties to them.  Also recall that I said you can define the differential operator L[y] anyway you like to.  In this post L[y]=(py')'+qy'.  Which is the Sturm-Liouville definition.

The first important thing to talk about is Lagrange's Identity. This theorem states..

Let u and v be functions having continuous second derivatives on the interval [a,b]. Then,
Where W[u,v] is the Wronskian of the functions u and v.


The value of p in this theorem is always constant.  This can be proved by using Abels Identity on the right hand side of the equation.
To prove this we will  basically use the definition of L[y], the product rule and add and subtract pu'v' simultaneously.

If we integrate both sides we obtain what is known as Green's Formula. 
It can be shown (try it!)  that if the functions u and v satisfy the boundary conditions to the Sturm-Liouville equation, the right hand side is equal to zero.  If we define an inner product as..
Then Greens formula (When it equals zero!) takes the form..
Any operator that satisfies this expression is called a selfadjoint operator.

Okay now on to our next important property of Sturm-Liouville Equations. 
 The Eigenvalues and Eigenfunctions that arise will always be real. 
To prove this we will start out with the Sturm Liouville Equation and take the complex conjugate of both sides. (r(x) is defined to always be real.)
It can be shown that the complex eigenfunction also satisfies the boundary conditions, therefore the complex value of lambda is also an eigenvalue to the problem.  If we take the equation (Before we took the complex conjugate of both sides) and multiplied both sides by the complex eigenfunction and then integrate...
Because both real and complex values of lambda are eigenvalues that give rise to eigenfunctions that satisfy the initial conditions, we can use Greens Formula to obtain..
Therefore we can equate the two expressions and divide out the integral...
Therefore, the only way this can be true is if lambda is real.

If all the eigenvalues are just scalar multiples of one another, then the values are said to be simple.  This leads us to our third important fact.
All eigen values of the regular Sturm-Liouville Eigenvalue problem are simple.
This one isn't that bad to prove.  All you have to do is assume that you have two eigenfunctions corresponding to the same eigenvalue that satisfy the initial conditions.  (The two functions will be Psi and Phi.)
Notice that we solved for the derivatives.  Recall that if the Wronskian is equal to zero, then the two functions are linearly dependent.  This is what we get.
Therefore, the two functions are just scalar multiples of one another.  This means that we essentially only get one eigenfunction for each eigenvalue.

On to the last nice property of Sturm-Liouville Equations!  
All eigenfunctions of these equations will be orthogonal on the interval [a.b].
To prove this, we again assume we have two eigenfunctions except these functions correspond to different  values of lambda.  All we do here is use Greens Formula. (Mu corresponds to another eigenvalue.)
Since lambda does not equal Mu ever, we can conclude that the integral must equal Mu.  Since the integral is the definition of orthogonality, the two eigenfunctions with respect to the weight function r(x), must be orthogonal.





Sturm-Liouville Boundary Value Problem

So this seems like a good time to bring up Sturm Liouville Boundary Value Problems.  In my previous post I derived the heat equation and specifically said that we will treat all the physical parameters such as thermal conductivity as uniform throughout the wire as a simplifying assumption.  But what if we choose not to do this?  Well then, picking up the equation from my previous post, we will have..
The last two terms on the right hand side combined are G(x,t) from the previous post.  The logic behind these terms is that the heat generated inside the wire is proportional to the temperature itself with a proportionality constant q(x), and all other types of heat sources are given by h(x,t).

Now in the previous post, we said that the boundary conditions at the ends of the wire could either be kept at zero temperature or insulated and kept at a constant temperature.  What can also happen is the wire could be partially insulated, we would therefore need to combine the two boundary value problems as a generalization.
These conditions are called separated boundary conditions since one set of boundary conditions does not relate in any way to the other.  We still need an initial heat distribution of u(x,0)=f(x).

We will now use the method of separation of variables to separate the equation in terms of t and x.  We need to assume that the solution is of the form u(x,t)=X(x)T(t).  I always thought the word "assume" was kind of misleading when learning things like this.  I always thought, "Why would you assume that?"  Instead of thinking of it as an assumption, think of it as an educated guess that we are rolling with until we get nonsense, at that point that will tell us our guess is wrong.  So, plugging this in and separating the variables we get..

We need to make a logical leap.  What exactly are we saying here?  We are saying that two functions of two different variables are equal to each other at every point of x and t imaginable.  The only way this could happen is if they are both equal to a constant value.  We will denote this value with the Greek letter lambda.  Setting each side equal to lambda, we obtain.. (We will only focus on the function of x as this is the most important.)

This equation and the boundary conditions is what is known as a Sturm Liouville boundary value problem.  Notice we did a little change of notation and called the function y instead of X.  The partial derivatives also changed into normal derivatives because the function is only of one variable.  These types of functions are very important in solving the heat equation and any other type of partial differential equation where they show up.  If one does a little expanding, you can see that the Sturm-Liouville problem is actually a normal second order differential equation.
So the obvious question comes to mind, does this mean that all second order homogeneous differential equations can be put into Sturm Liouville form?  The answer to that is yes!  In much the same way you use an integrating factor to solve first order differential equations, you use an integrating factor to combine the first two terms of the differential equation.

The Sturm Liouville problem  is what is known as an eigenvalue problem.  An eigenvalue problem says that if I define an operator L[y], what values of lambda does L[y]=λy.  The operator L is called a differential operator and can be defined any way you like.  In the case of the Sturm Liouville problem L is defined as..
The r(x) in the problem is a weight function and sometimes may also be thrown in.  The function r(x) in our case will be 1.  So we can write the Sturm Loiuville problem as L[y]=λy.  To those of you who have had linear algebra, eigenvalue problems come up as Ax=λx.  Where A is the operator in this case.  

It is important to note that you must have boundary values or some sort of initial condition to be able to find the eigenvalues.

At this point, I could delve into an entire discussion on corresponding eigenfunctions and ultimately the solution to the eigenvalue problem, and I will probably do this in the future, but at the moment I just don't have the time.

One thing I want to mention before I sign off, the Sturm Liouville eigenvalue problem shown has a lot of very special properties that make it nice to deal with.  I will again go into the details in another post. Until then, see yah!






Monday, April 25, 2011

Heat Conduction!

So the point of this post is to develop a mathematical model for the conduction of heat through a wire.  This post will be deriving "The Heat Equation" in the one dimensional sense.

Imagine you have a wire.  If you can, imagine a small volume of the wire between two cross sections.  Here is what I mean..
Now we are going to make a simplifying assumption and assume that the temperature in the wire is uniform with respect to the cross section.  In other words, the cross sectional area A or B has the same temperature throughout its area.  The temperature of the wire will be denoted u(x,t).  Notice that we are constructing a model with an expression of two variables.  The temperature depends on both WHERE it is in the wire (in the x axis only, remember our simplifying assumption!) and WHEN you are looking at is.  In these types of models, when looking for a solution, you often want to look for one that has what is known as a "steady state." Meaning, as time approaches infinity, the temperature function would not depend on time anymore, but only on x.  I might do an example of this in the future.

So using our function notation, the temperature in the cross section A will be u(x,t) and the temperature in B will be u(x+Δx,t).  (The distance between B and A is Δx).  Let's get a few physics principles out of the way to help us in the derivation.


1.  Heat Conduction: The rate of heat flow, is proportional to the partial derivative of the temperature function with respect to x.  This is essentially saying that the rate of heat flow is proportional to the temperature gradient.  If you think about it, it makes sense.  If one side of the wire is extremely hot and the other is ice cold, the rate of heat flow will be larger than if both sides were hot but at different temperatures.  Since this relationship is directly proportional, we must use a proportionality constant k to equate them.  This is called the thermal conductivity of the material and can actually vary from point to point.  Therefore k=k(x).


2.  Direction of Flow:  The flow of heat is always from higher temperature to lower.  Again this makes sense conceptually.  You will never be able to witness a cup of hot coffee get hotter while it sits on the table! (I can get into a WHOLE thing dealing with thermodynamics, and I intend to eventually!.... But at another time..)


3.  Specific Heat Capacity:  Specific heat capacity (The name is most definitely a misnomer as it does not make sense to the physical definition of heat! You physicists know what I am talking about! Again, I will rant about that later on another post.) is defined as the amount of heat necessary to raise the temperature of an object of mass m by an amount Δu (remember u is temperature) is equal to cmΔu.  The variable c is yet another proportionality constant and is the specific heat capacity of the substance.  This value can also vary from point to point, therefore c=c(x).


Now we introduce the variable Q to denote the amount of heat transferring through the surface A in a time Δt.
So what does this mess mean?  Well take a look, we combined a lot of what we just said above!  Remember what we just said, that the amount of heat passed through a cross section A in a time Δt proportional to the the temperature gradient (which is the partial derivative expression), and in order to equate them, you need a proportionality constant k(x).  This value is them multiplied over the area of A and a time Δt.  The negative sign is used to indicate direction.  If the temperature gradient is positive from left to right, then it flows the opposite direction.

So now we can apply this formula for the heat flowing through the cross section B!
Often in physics, we need to apply some sort of conservation law.  Conservation laws in mathematics are extremely powerful in developing models and figuring out problems.  In this case we will be saying that the amount of heat entering the volume V (The volume between cross section A and B) equals the amount of heat exiting.  Now, in reality this is not always true, therefore we need to account for that.  What could happen is, heat could be generated inside the wire, therefore adding more heat coming out of cross section B.  We model that term in much the same way as we have modeled the previous heat flow terms.
So using this idea of a conservation law, we obtain.. (E represents the amount of energy)



Now notice that we have equated A and B.  We can do this because they are indeed the same area. Now the change in heat (or energy) is also equal to the change in heat capacity of the substance.  So..
Where Δu is the change in temperature, m is the mass of the wire element, and c is the specific heat capacity.  We can use the definition of density to change the mass term.  Plugging things in we obtain..

Notice that the density and specific heat capacity can change from point to point.  We are allowed to use the expression for Δu there because we are assuming the change in temperature of the volume is the change in temperature of x.  Strictly in one dimension.  Equating the two expressions for ΔE...
We will now divide both sides by AΔxΔt, then take the limit as Δx and Δt approach zero.
We will now let all the physical parameters be constant throughout the wire.  This is usually a good approximation.
And that is the heat equation! Notice that we have defined beta as k/cp.  This is called the diffusivity of the material.  We have also simplified things a bit by defining P(x,t) as (1/cp)G(x,t).

At this point, we need to be able to impose boundary conditions on the equation.  What is often done is to either say that each end of the wire is at zero degrees, or that each end of the wire is kept at a constant temperature.  In other words..
(Why does the second one represent constant temperature at each end of the wire? Think about it!)  We will also need an initial distribution of heat at t=0.  In other words..
So summing everything up, the heat equation with boundary conditions are..
So what if we want two or three dimensions? The heat equation would then become..
So basically we have used the Laplacian operator to make the problem into three dimensions!

And THAT my friends, is the heat equation.  In order so solve this equation you need to use the method of separation of variables and solve the various eigenvalue problems that arise. (Depending on the dimension you choose.)  After that you will need to compute the Fourier series of the initial heat distribution.  I think I will do a post on this later on.  

Hope all you math nerds enjoyed!  If you see anything wrong or have questions, please comment!