New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Math Modelling

by: Reuben Hudson DDS

Math Modelling MATH 456

Reuben Hudson DDS
GPA 3.55


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Mathematics (M)

This 29 page Class Notes was uploaded by Reuben Hudson DDS on Friday October 30, 2015. The Class Notes belongs to MATH 456 at University of Massachusetts taught by Staff in Fall. Since its upload, it has received 20 views. For similar materials see /class/232228/math-456-university-of-massachusetts in Mathematics (M) at University of Massachusetts.

Similar to MATH 456 at UMass


Reviews for Math Modelling


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/30/15
Math 456 Spring 2006 Dr Alexandros Sopasakis page 52 3121 Multi dimensional Ito formula Similarly the higher dimensional Ito formula is necessary in the case of a multi dimensional Ito process The following process is an example of a multi dimensional Ito process Xm Uldt UlldBl den Undt UmdBl where each of the Bis are one dimensional Brownian motions and the above is essentially an n dimensional Ito process We can write the above in matrix notation as follows dXt adt tdBa Based on this process the multi dimensional Ito formula is Theorem 19 Suppose that at gnaw gpt is twice cantimwus Then the pracess Wt mm is again an to pracess for which the fallawing farmula halds for each campanent k r quot1quot629k ma at tXlttgtgtdt 2 am tXtdXzt 2 8316 t Xandedth i1 where ijdt and Example Brownian motion on the unit sphere Use Ito s formula to write the following stochas tic process Xt cos B t sin B in standard form dXt utdt vtdBt where B t is considered to be 1 dimensional Brownian motion As usual one of our main task will be to de ne the function gt Here gt will in fact be a vector instead of a single function We therefore de ne in vector notation Wt W J 8 cos 3 sin 3 or written out in each component as M gt m case Ygt ggt sina where we choose a B t and B t denotes the usual one dimensional Brownian motion Using the multi dimensional Ito formula from Theorem 19 above we obtain rst for gl 1 le sin BtdBt 5 cos Btdt 339 Math 456 Spring 2006 Dr Alexandros Sopasakis page 53 Similarly for y we have using Ito formula 1 dYg cos BtdBt 5 sin Btdt 340 Using vector notation and the fact that Xt 2 Ya 2 Y1 t Y2t cos Btsin B we could write both of the above formulations 339a 340 as follows 1 dXt KXtdBt Xtdt Where K is the matrix K i 01 Chapter 1 Overview of Matrix Algebra Usually one of the most important tools in understanding whether two objects are close is that of the norm If the said objects are vectors then we use the vector norm to compute their distance Let us de ne this tool De nition 1 A vector norm denoted by H is ufunction which has vectors as input and produces a number as output In other words E R a R The vector norm has the following properties a M 2 0 for all x E R h 0 if and only if x E 0 c for allkER undelR 05 HXYH S lle HYH f0 all X7y E R There are several different kinds of vector norms We most often use the following types of norms in our calculations De nition 2 The Euclidean or l2 norm and the maximum or loO norm HXHoo Egg W or the Z1 norm 7L HXH1 Z W i1 Example Calculate all three the Z1 Euclidean and maximum norm for the vector 90 1 732 Solution The l1 norm is HXH1 l1ll 3ll2l 6 the Euclidean norm is Zxxx xx 1lte3gt222m i1 llxllz while the maximum norm gives Hxlloo max W maxfl cll l czl heal max132 3 1991 Therefore using these norms we can now describe distances between vectors as follows n 2amp0er 0r llxi looirgggllxrvil MK 7 Yllz As a result we are now also in position to understand the concept of convergence for vectors Conver gence is a concept which we will use later in our numerical calculations and will allow us to know how close we are to the solution of a given problem To do this we essentially need to measure usually via some kind of norm the distance from our current approximate solution to the true solution De nition 3 We say that a vector sequence xn io converges to another vector x in R with respect to given norm if given any 6 gt 0 there exist an integer Ne such that Hxn 7 KM g e for all n 2 Ne The following result can now be shown Theorem 4 The sequence of vectors Kn 0 converges to x in R with respect to the H00 norm if and only if lim for alli 12 n ngtoo Similarly we can prove the following ordering between different norms Theorem 5 For x E R we have Hxlloo S Hxllz S x llxlloo There are a couple of well known inequalities which apply to vectors The triangle inequality HX Yll S HXH llYll and the Cauchy Schwarz inequality S llxllzllYllz 11 7 E iyi i1 Example Verify the Cauchy Schwarz inequality for the following vectors x 123 and y 021 Solution According to the Cauchy Schwarz inequality the left hand side of 11 gives7 0 4 3 7 while the right hand side of 117 41 4 940 4 14 70 m 836 Thus the right hand side is bigger as expected We now generalize these results First we de ne the following general p norm7 Hxllp VF l11p 190an Thus the following two inequalities hold7 Holder ineq leyl 1 W HX Yllp llelpllYllq where H cllp Hpr lt l l i q p S Here xT denotes the transpose of vector x Now that we have put together the basic necessary tools regarding vectors we can start discussing how to handle matrices Matrices are just rows of vectors As such we can essentially use the same tools7 from vectors7 apply them to matrices So the matrix norm is de ned via7 De nition 6 Suppose that A and B denote n gtlt n size matrices and k a constant Then the matrix norm is the real valued function has the following properties 61 HAN Z 0 h 0 if and only if A E 0 c for aZZkER J HABH HAM HBH 8 HABH S HAHHBH R Based on the already presented vector norms we can in fact de ne new matrix norms The following result can be shown7 Theorem 7 If is any vector norm then HAM ma HAxH HxHil is the corresponding induced matrix norm Therefore we can now refer to the following types of matrix norms7 llAHz max llAXHz 0r llAlloo max llAXHoo llxllz1 llxlloo1 Note that in fact these norms are not very easy to calculate since you must examine all possible vector of length 1 and nd the maximum possible result We present instead a result which allows us to easily calculate one of these matrix norms7 Theorem 8 Suppose that A is an m gtlt n matrix Then the A oO norm is calculated as m HAHoo gig ao Similarly the AH1 is found from l j m 774 A 1 max 2 ai j i1 Let us look at an example using this norm Example Suppose the following matrix is given7 1 2 A Z l s 4 l Calculate Solution The norm is simply found by simply adding all elements in each row and obtaining the maximum result from there7 1 2 3 3 4 7 Thus A oO max377 77 while check this A 1 6 101 Eigenvalues eigenvectors and condition number As you noticed it was not easy to obtain the matrix norm for some cases such as For this kind of norm we can develop another method which will allow us to obtain the value of the matrix norm in an easy way This method relies on eigenvalues and eigenvectors First some de nitions De nition 9 Suppose that A is an n gtlt n square matrix Then the following polynomial p detA 7 AI is the so called characteristic polynomial Note that p is an nth degree polynomial De nition 10 Suppose that the characteristic polynomialp as de ned above The zeros ofp are called eigenvalues for the matrix A Iffor a given eigenvalue A we have that A 7 Ax 0 with 90 3A 0 then x is called an 393 nv tor co J39 g to the 39g Let us look at a simple example on how to obtain the eigenvalues and eigenvectors for a given matrix A Example Suppose the following matrix is given 1 1 A 7 l 72 4 l Find the eigenvalues and eigenvectors for A Solution To nd the eigenvalues we solve the following characteristic polynomial p based on De nition 9 17x47x20 The polynomial simpli es to A2 7 5A 6 0 and the solutions are A1 2 and A2 3 To nd the corresponding eigenvectors we must solve the following matrix system for each eigenvalue 153 xlliiHSl where here 221212 represented the unknown eigenvector For A1 2 we must solve the following system 71 1 v1 7 0 i2 2 v2 7 0 21122 which gives that Thus an eigenvector for A1 2 is 11 Similarly the eigenvector for A2 3 is 12 De nition 11 The spectral radius pA of a given matrix A is given by MA max m where A corresponds to the eigenvalues ofA Now we are nally in position to provide an alternate method for evaluating the matrix norm HAllg based on the eigenvalues of A Theorem 12 Suppose that A is an n gtlt n matrix Then PM MHz 1 pA g for any matrix norm m HA IHZ for A symmetric 14 Let us see this result in more detail through a numerical example Example Given the following matrix A compute the HAllz norm H21 Solution Let us outline this procedure We rst calculate AtA and then nd its eigenvalues then according to the theorem above the square root of the maximum eigenvalue will be equal to Thus we start by rst calculating7 t 7 0 2 0 1 7 4 2 A A T l 1 1 2 1 T 2 2 The eigenvalues for this matrix are A1 3 x and A2 3 7 Thus Hle V3 x5 Another very important quantity for matrices is the condition number The condition number of a matrix describes how good77 that matrix is For instance matrices that are not invertible have condition number 00 which is considered as bad as possible On the other hand the smaller the condition number the better the matrix behaves in our calculations The condition number is de ned through7 De nition 13 Suppose A E Rn and that A is nonsz39ngulan Then the condition number ofA is given by COMM HAHHA IH Note that if we use the Euclidean norm and further assume that A is symmetric then the condition number is given from the eigenvalues of A as follows7 AtA x condAHAHzHA lllz W max min W min W The above calculation is true but7 at least here7 we do not show the details Can you show why this is true based on what you learned so far Chapter 2 Introduction to ODEs In the following short chapter we will summarize some easy and e icient methods for solving simple rst order Ordinary Di erential Equations ODEs In order to use the appropriate method to obtain the solution of a given ODE we must be able to classify the type of ODE we have at hand 21 Classi cation In general we classify di erential equations as either partial or ordinary For now we examine only ordinary di erential equations In general however most models are usually comprised of several a system partial or ordinary di erential equations Another reason that ordinary di erential equations ODEs are important is that techniques of solution for partial di erential equations PDEs can stem from those in ordinary di erential equations So learning how to solve ODEs will be useful by itself or in conjuction to solving PDEs To choose the appropriate method of solution for a given ODE you must nd out what type of ODE you have ODEs are categorized among other things as linearnon linear ordinarypartial Also we usually refer to the order of the ODE as well as to whether it is homogeneous or not The following examples should be helpful in understanding how this classi cation system works 0 2 73 5 1st order linear non homogeneous ODE 0 3g 9y2 1st order non linear homogeneous ODE o 3 y 0 1st order linear homogeneous ODE o 3327quot 93y 9 2nd order linear non homogeneous ODE o 7 22 4y 0 1st order non linear homogeneous ODE Try to gure out based on the examples above how naming of ODEs works You probably understand from the above how we determine the order of an ODE based on the order of the derivative in the equation How about linearity Do you see it Linearity refers to the power of y For instance anything with y2 and higher is non linear Similarly if a derivative was raised to a power such as 275 then it is also non linear Now determining whether an ODE is homogeneous or not is a di erent story The idea as you may have noticed is to bring all terms which include y7s on one side of the equation If by doing so the other side of the equation is 0 then you have a homogeneous ODE Otherwise you have a non homogeneous ODE Math 456Spring 2006 Dr Alexandros Sopasakis page 9 22 Solving rst order homogeneous ODEs Now that you have learned some of the basics about the names of these equations you will put them to use in order to decide which method to choose in order to obtain their solutions If you correctly identi ed the ODE then you will be able to solve it It is not the point of our class to review all methods of solution for a given ODE Instead we emphasize on the ones we will probably put to use during our study of mathematical models In that respect we start by studying methods of solution for 1st order homogeneous ODEs 221 Nonlinear rst order homogeneous ODEs It may sound surpricing but some of the easiest rst order ODEs to solve are the nonlinear homoge neous ones Let us examine for example the following non linear 1st order homogeneous di erential equation 2 i i 2 ay y or otherw1se also written as a y x with the following initial condition y1 71 We will present the solution of this equation based on the separation of variables method We outline this method of solution for such an ODE below 1 Separate variables dy i da 212 7 2 lntegrate both sides 1 d da i da y 5v which gives 1 if ln C 21 y do not forget the constant of integration 0 To evaluate C we use the initial condition y1 5 If on the other hand no initial condition is provided then C will be part of the nal solution for this equation Note that the initial condition y1 5 implies that for a 1 then y 5 Substituting these values to equation 21 above we obtain 0 7 71111 72 Thus equation 21 becomes 1 if ln 7 2 y That7s it We solved this di erential equation How do we know that we solved it Easy Do you see any derivatives left If not then we are done The equation is solved In this case we can even go further and solve it for y itself something that is not always necessary or sometimes even possible 1 y iln 7 Ok so now we can take care of the non linear homogeneous type rst order ODEs Let7s now see how we can solve the linear ones Math 456Spring 2006 Dr Alexandros Sopasakis page 10 222 Linear rst order ODEs In this case we will in fact see a method which not only solves the linear rst order homogeneous ODEs but the non homogeneous ones also Let7s rst look at a typical example for such an equation 3 7 2y 5 with the following initial condition y0 0 We outline the steps of the solution below 1 Rewrite the equation in a canonical form 1 py Note that luckily enough our equation is already in this form 2 Obtain the integrating factor M which is de ned to be M fpz dz In our case the integrating factor for this ODE is M f72dz 6721 OJ Multiply both sides of the ODE with the integrating factor u m4mmmumm You can then group the left and the right hand sides as follows yuMq In our case we multiply the ODE with u and obtain 1 6 2z7y 7 my 6 2z5 x We then can rewrite the above as 72zy 56721 r e lntegrate both sides This has the e ect that always the left hand side derivative disappears In our example this gives e zzy 5e 2z C or rather 5 72zy 726721 0 As previously we can nd the value 0 by substituting the initial conditions In our example we are given that y 0 when m 0 Thus substituting on the above we obtain 5 0 0 0 if C e 26 which implies that C 52 Therefore our equation becomes 5 5 721 i if 721 7 6 y 26 2 Note that this is really our solution for the ODE We can even solve it for y as follows 5 5 7 72 y722e Math 456Spring 2006 Dr Alexandros Sopasakis page 11 23 Numerical solutions to ODEs In this section we will learn how to solve a number of di erent types of ODEs using a computer and applying some well known and very e ective numerical algorithms We start our exposition with a simple but robust method 231 Euler s method This method is simple to learn and will essentially allow us to solve almost any type of ODE which we will come across Naturally we implement this method in the computer but in fact for simple problems you could possibly obtain the solution with a calculator or even by hand The starting point is to write your ODE in the following form7 y where fz7 y corresponds to any other term in your ODE For instance looking back at the equation zy yz which we solved earlier we would rewrite it as7 12 y In this case therefore fz7y Once this is established the method iterates in the computer with the following formula7 Euler7s method yn yn hfzn7 yn where here h denotes the step size in z The iteration counter 72 starts at 0 and will go on until we produce the solution required by the problem For instance recall that the initial condition for our ODE was provided to be y1 5 In this case for n 0 we have that 0 1 and yo 5 with which to start the iteration of our method The only thing which may be left up to you unless speci cally given by the problem is how big the step size h should be chosen to be Euler7s method is not exact In fact it almost always includes errors and the solution predicted is only an approximation to the true solution The bigger the step size h the bigger the errors to our solution So if you would like to have a very accurate solution then you must take a very small step size h and therefore you must iterate several times Let us assume that you would like to obtain the solution y when z 10 for the following ODE zy 127 with initial condition y1 71 Remember that we rewrite the ODE rst So here fz7y yZz Since the step size h is not speci ed you are free to choose So if you take h 1 then you would have to iterate Euler7s method 9 times since you are starting at z 1 and need to reach z 10 with this h The following table shows the result of the computer output and how each y is produced after each iteration of the method7 Math 4567Spring 2006 Dr Alexandros Sopasakis page 12 So the solution at z 10 is y 72801 using a step size of h 1 ls this correct In fact we can check this since we have found earlier the exact solution to be i 1 y T lnz 1 Let us compare7 side by side7 the approximate solution produced by Euler7s method above with this exact solution in the table below z 1 2 3 4 5 6 7 8 9 10 yam 71 750 741 737 734 732 73104 72983 72884 72801 year 1 759 747 741 738 735 73395 73247 73128 73028 This gives that y 72801 for z 10 while the equivalent exact solution is y 3028 The absolute error between the two being 0227 and the relative error 075 We can not help but wonder how much better we could possibly do if we decrease the step size h 5 In that case of course it would take us 18 iterations starting at z 1 to reach z 10 We display some of these results in the table below This time the absolute error between the exact and approximate solutions for z 10 is 0084 while the relative error is just 000003 Huge improvement for a little bit extra work for the computer 232 RungeKutta Method We now present an even more accurate method which although it is slightly more complicated to program in the computer can also solve an ODE of the type7 y f7 Usually the Runge Kutta method is more accurate than the Euler method for the same value of the step size h The Runge Kutta method goes as follows 1 yn1 yn 6k1 2k2 2k3 k4 Where k1 yn 1 1 k2 han ihvyn ikl 1 1 k3 han hv yn gkz k4 hv yn k3 Just so that we can see the di erences between the Euler and Runge Kutta methods we solve the same exact ODE as before7 zy 127 with initial condition y1 71 Math 456Spring 2006 Dr Alexandros Sopasakis page 13 for a step size of just h 1 The results are shown in the table below Based on these results you can make up your mind about which method is best and compare the di erences for yourself 24 Higher order ODEs In fact the numerical schemes just presented are much more powerful than you might think In this section we will see that we can use these methods not just for rst order ODEs but also for higher order We will learn a method which allows us to reduce any higher order ODE into a system of rst order ODEs The bene t is that once we obtain such a system of rst order ODEs we can use an equivalent version of Euler or Runge Kutta method in order to solve that system 241 Reduction of order Suppose for instance that we wish to solve a third order ODE such as y 33 7 2y 0 22 The method goes as follows We start by de ning 3 as many as the derivatives new variables u1u2 and ug via U1 27 U2 1 us 13 23 Now we take derivatives on both sides of the above and obtain ui yC 12 y 7 13 W Note that in fact we can replace ym above by solving our 3rd order equation 22 for ym 7311 2y Therefore in fact 13 7314211 But based on 23 we can also replace the y7s with the corresponding ul or ug Therefore we can write U3 as 13 7311 2y 73112 2u1 Summarizing this analysis we have ul y uz u2 yH ug u3 y 73112 2u1 We will rewrite the above once more in a nicer format by reordering the us and inserting a zero if no corresponding u exists in that row u OuL 1u2 Oug u OuL Oug 1u3 13 2u1 7 Bug Oug Math 456Spring 2006 Dr Alexandros Sopasakis page 14 In this format it is not that hard to see that we can write this system into a matrix as follows OHO 0 1 U AU where A 0 0 2 3 In this format it is now clear that our original single 3rd order ODE 22 has been transformed to a reduced 1st order system of three ODEs In general this method can take a single nth order ODE and transform it into a system of 72 rst order ODEs Once you have such a system you can apply Euler or Runge Kutta method to solve it The following simple example should be illustrative of this procedure Example Solve the following ODE using Euler7s method Obtain the solution for m 1 y 7 y m with initial conditions y0 0y0 1 24 We start by reducing the 2nd order ODE into a system of 2 rst order ODEs To do this we follow the procedure outlined previously We rst de ne 2 new variables ul and ug as follows U1y 7121 Now we di erentiate both sides 1 1 2 y and eliminate y by solving 24 Thus uz y m y and replace y here with ul Thus u y u2 0u11u2 u y u1 1u10u2 To make the notation clearer we rename ul U and ug V Thus we have the following two equations U Fm U V where Fm U V V V Gm U V where Gm U V x U We are now ready to apply Euler7s method for this system Before we start though we should also translate the initial conditions to correspond to U and V Starting with y0 0 and since y ul U then we have that U0 0 Similarly the other initial condition yO 1 becomes V0 1 since 1 ug V Euler7s method for our system is equivalent to the following Un1 Un hFn U V VH1 Vn hGn U V The following table provides the solution assuming a step size of h 2 TL Math 4567Spring 2006 Dr Alexandros Sopasakis page 15 Thus when z 1 we obtain the approximate solution to be U ul 116 and V ug 182 This solves our problem Well not really Remember that the original question was to solve for y not U7 V7111 or even for ug However we know that y ul Thus y m 116 when z 1 Just to Check our solution if we reduce the step size to h 1 and iterate 10 times we obtain the solution to be y m 124 when z 1 If the step size becomes h 01 and we iterate 100 times we obtain y m 13388 Last if we reduce the step size to h 001 and iterate 1000 times we obtain that y m 13492 In other words we can safely believe that y m 134 Math 4567Spring 2006 Dr Alexandros Sopasakis page 30 37 Heat Equation We will now look at a model for describing the distribution of temperature in a solid material as a function of time and space It is probably easy to see the need for such a description and applications of it to our everyday life are abound As usual there are several simpli cations and assumptions behind such a model Among them is the assumption that the body7 which we wish to measure the temperature of7 is homogeneous ie it is composed of the exact same material and no foreign bodies are in it There do exist more complicated models however which can describe the temperature distribution in non homogeneous bodies Similarly we will assume that our object is perfectly insulated from surrounding sources or sinks of heat and in fact that it can not generate heat of each own To simplify the mathematical modeling aspect further we will rst attempt to solve this problem in just one spatial dimension So we consider 0 a homogeneous material rod of length L o a constant cross section S 0 further assume that the rod is completely insulated everywhere around The well known mathematical model which we will derive below that makes use of these assumptions and describes the temperature distribution in three dimensions is the famous heat or di usion equation7 ut V um uyy um 318 where V is known thermal dz usz m tg and is related to7 as well as calculated from7 properties of the material The heat equation is in fact another realization of the conservation of energy which we saw a version of in the Euler equations We present below the derivation of this model 371 Derivation of the heat equation There are several approaches in order to obtain a mathematical model for temperature through a body Mainly these approaches are characterized into two main categories 0 Relativistic o Newtonian Although much more interesting mathematically the relativistic approach7 which produces the exact same equation 3187 is too complicated to present here in detail This method relies on atomistic properties and generates a system of equations which produce 318 We will instead present the classical Newton approach In this case we represent our variables of interest through classical conservation laws which we know that any model relating them ought to adhere to Thus in a similar fashion as we did for the derivation of our linear advection equation we now consider an in nitesimal element in our rod and write the conservation of energy law for it We rst provide some necessary background from physics It is well known from the Fourier heat conduction law that heat Q is transported in direction opposite to the temperature gradient of u and is proportional to it7 319 mm w an an an E aiy Math 4567Spring 2006 Dr Alexandros Sopasakis page 31 where n is the proportionality constant also known as thermal conductivity It is also known that heat Q is related to mass m and temperature u via the following formula Qmt Amumt 320 where A is the known speci c heat for our material Let us complete this derivation for now in just one dimension m Note however that this result can be very easily generalized to all three dimensions Consider an in nitesimal piece from our rod with length mm Am Then if the rod has cross section S this piece has volume SAm Further assuming that the density of the material for the body under consideration is c then the in nitesimal mass for our in nitesimal volume element is simply given by Am cSAm Therefore based on 320 the equivalent heat for our volume element is described by Q Amu AcSAmu 321 Let us now take into account physical properties In other words that the energy or heat in any piece of the insulated rod ought to be conserved Considering again our in nitesimal volume piece with length m m Am we can state the following rate of change of energy heat rate heat owing in rate heat owing out or mathematically written as 887 QmmtS 7 qutm AmtS 322 Note however that the rate of change of energy heat can be found by di erentiating our equation in 321 u E AcSAmE 323 We substitute this for the left hand side of 322 and obtain AcSAmg71 SQmt 7 Qm Amt Let us rewrite the above by dividing with Am and S man i Qm Amt 7 Qmt at Am Note however that the right hand side of the above is simply the derivative of Q with respect to m aQam if we let Am 7 00 Thus we obtain A Bu 8Q c7 77 at am Finally using the Fourier law of heat conduction 319 in one dimension Q 7ndudm we obtain our heat equation Bu 8211 7 V7 at am2 where V nAc groups all parameters together This derivation can be easily generalized to higher dimensions Math 456Spring 2006 Dr Alexandros Sopasakis page 32 372 Solutions of the Heat equation There are several different methods which allow knowledge of exact or numerical solutions for the heat equation Before however we even start discussing the possible solutions of this equation we should get acquainted with some amazing properties that these solutions tend to have To shed light into this subject we use the well known maximum principle which in fact can be applied to more general problems with similar success We give below a version of the maximum principle as applied to the heat equation Theorem 15 Suppose the heat equation is de ned on the following time space domain 0 lt t lt T and a S a S h Then the temperature u attains both its maximum and minimum values on the boundary of this domain Further that temperature is unique Theoretical solutions separation of variables method Let us examine a concrete example of a rod length L with temperature ut We keep the ends of the rod a 0 and at a L at a constant temperature u 0 while we will set the initial temperature in the rod to be increasing with distance via u0 a In other words we propose the following heat equation model for this example7 37 V for 0ltltL7 tgt0 u0t 0 for t gt 0 uL7t L for t gt 0 u0 a 0 lt a lt L We will apply a very general procedure called separation of variables in order to obtain the solution to this model The idea behind this procedure is general enough that can be successfully applied to several other problems with similar results The separation of variables method assumes that the solution um t which we are looking for can be separated into a product of solutions each of which depends only on one variable In other words we assume ut XTt We then obtain the time and 2nd space derivative of the above7 ut XT t and um XTt Substituting into our heat equation above we obtain the following7 XvTt uX cTt Let us now separate variables by moving all terms with at to the left and all the terms with an a to the right7 Tt 7 XHW We Xa It is important to note here that if we pick a speci c time t t1 then our equation above becomes Ttl 7 COHS an 7 XMltgt VTt1 t t Xa Math 456Spring 2006 Dr Alexandros Sopasakis page 33 for all m Similarly if we pick a speci c space value 1 then it becomes7 Tit Mm t t VTlttgt Xml cons an for all All in all the following information has been revealed7 Tt 7 XHW VTlttgt i constant and Xm constant Note that we have successfully reduced the original PDE problem into two very simple ODE problems We will solve both of the above ODEs and produce the values of Tt and Once this is done then we can reassemble the solution of our original PDE from the fact that ut XTt It is customary to denote the general constant above by 7A and we therefore have the following two ODEs to solve7 H T t 7A and X uTt Xm A which we can rewrite as7 Tt AVTOE 0 XH AX 0 It is easy to obtain the solutions for each of those equations In general any linear second order homogeneous equation such as XH IXm bX 0 is rst transformed to a quadratic formula 102 aw b 0 We solve it using the quadratic formula Depending on the two solutions of this quadratic 101 and LU2 we have the following solutions for the ODE7 General X 01 expw1 02 expw2 if 101 a LU2 and both are real 2nd order X 01 expw1 02 expw2 if 101 LU2 and both are real ODE Solutions X expom01 cos 02 sin if 10 is complex 10 or 15 324 Similarly we obtain the solutions for our rst order ODE Tt AVTOS 0 with one of the methods which we have already learned previously If for instance we use the separation of variables method for this ODE we obtain the solution to be Tt Tt0e t t0gt As a result the total solution to our heat equation model is just the product of both the rst order ODE and the second order ODE together um 75 XTt Math 456Spring 2006 Dr Alexandros Sopasakis page 34 A simple example follows Example Suppose a high frequency transmission line whose length is L 121 meters We wish to discover how exactly is temperature distributed along the wire This is important since if at any point the wire temperature is high then transmission will be slowed Suppose that the initial temperature on the wire is everywhere the same um 0 100 Celcius and that at each end the temperature is kept at zero degrees with some cooling equipment The material used in the construction of the wire has a known thermal conductivity constant which is V 2 Find the temperature of the wire u7 t at any location m in the future Solution This problem can be translated mathematically to a heat equation with Dirichlet type conditions We know that the heat equation is generally considered to be a good model to use if we are to describe the temperature distribution in a rod or a wire The term Dirichlet boundary conditions is customarily used when we are given u on the boundary in contrast we could have Newmamz boundary conditions which implies that the derivatives of u are known on the boundary instead Thus our model has the following form7 3 2aiu 0ltxlt1217tgt0 E at u0t 75gt 0 u1217t 75gt 0 uz0 100 0ltzlt121 We start as usual by assuming the solution to be u7 t XTt We then apply this separation of variables and as seen before we obtain the following two ODEs Tt 2ATt 0 X cAXx 0 with X00 and X1210 How did the boundary conditions come about We simply translated the boundary conditions from the original problem For instance since u07t 0 then it must be true that X0Tt 0 This implies that either X0 0 or that Tt 0 However if we allow Tt 0 then the whole solution must be zero We already know that ut 0 is a possible solution and we are now looking for other Thus we take the other possibility of X0 0 A similar argument will also produce X121 0 Note however that we can not use the non homogeneous condition u0 100 yet This will come in handy in the very end We start by solving the 1st order ODE rst The integrating factor77 is u please review the 77intro to ODEs77 part of our notes from the very beginning of the class if you do not see where this came from As a result the equation becomes efZAdt 2Atlt mew 0 or after integration7 Tt 06 325 We now turn to the second ODE The solution of this ODE should follow one of the cases shown earlier in 324 Which one is appropriate is revealed by solving the equivalent quadratic equation w2Aw0 Math 456Spring 2006 Dr Alexandros Sopasakis page 35 which gives that w i Note that there are three possibilities for A Either A is positive negative or zero We explore all three cases below although as our discussion will show it is only the case of A gt 0 which is physically relevant since in the absence of any external heating temperature tends to decrease Note that for A gt 0 in equation 325 the temperature will decrease in time The case ofA lt 0 Thus if A lt 0 then the roots 101 and wg are both real and non equal Therefore the solution following our chart from the previous page is Xx C1exp7A Cg exp77A 326 We can then obtain the values of the constants C1 and Cg based on the Dirichlet boundary conditions X0 X121 0 which were originally provided for us Note that substituting X0 0 into 326 we immedi ately obtain that 01Cg 0 327 Applying now the second boundary condition X121 0 into 326 gives C1 exp7121A Cg exp77121A 0 328 So we manage to obtain two equations 327 and 328 in two unkowns C1 and Cg Solving these two equations for C1 and Cg will produce the complete solution 326 for However as was pointed out earlier this case of A lt 0 is not physically relevant The case of A 0 If on the other hand A 0 then our original problem X AX 0 is reduced to simply X z 0 This has a very easy solution Xx Ca Cg Applying the initial conditions X0 X121 0 we obtain that X 0 This essentially implies that ut XTt 0 or the so called trivial solution This solution although mathematically possible is also not physical Therefore we will next explore the last case which based on our earler discussion is also making sense based on the physics of the problem The case of A gt 0 We continue here in order to nd other more general solutions Thus we then examine the last and most important case A gt 0 In this case the solution based on 324 has the form X C1 cosrAx Cg sinrA Once again the constants C1 and Cg can be found from the given conditions X0 0 we obtain that C1 0 Thus our solution above reduces to Clearly for X Cg sinA 329 Note that applying the second condition X121 0 and assuming that Cg a 0 we can solve for A In that case we get mr 2 0 sin12lrA which gives that A for n 0 1 2 Math 456Spring 2006 Dr Alexandros Sopasakis page 36 We substitute this value of A into 329 Note that in this case we have a different solution X for each n We can therefore write these solutions7 XnxCnsin for 7201727 Since all of the above are solutions then7 using the principle of superposition we can write all such solutions in a compact form by summing them up7 0 mr X c e gt 2 nsin 121 n0 Let us now put all pieces of our analysis together and write down the coplete solution for our PDE Cl exprA 02 exp7rA 3 2quott if A lt 0 7 2 Solutions um 75 7 220 On sin e ZWt if A gt 0 0 the trivial solution if A 0 It is usually the solution for A gt 0 which is more natural t io mr 729w u x nsin 7x e 121 7 0 121 since heat is expected to decrease as time goes by in the absence of any external device adding heat Still7 note that our solution is not complete since the constants On have not been found yet Notice however that we still have not imposed the initial condition that um 0 100 This condition allows us to completely solve for the constants On This is a very easy task however with the help of Fourier theory Below we present only the part of Fourier theory which will be useful for our course We apply the condition u0 100 Thus we have to solve 00 MT 100 ZCnsin 330 n0 for each On This in fact is a so called Fourier series As a result there exist tools which allow us to calculate the coef cients On This is actually an easy task with the help of Fourier theory Theorem 16 In general for any sine Fourier series of the function f de ned on the interval 0 ltx lt L f Eb sin where the unknown coe icients bn can be found by bn 0Lf sin d Math 456Spring 2006 Dr Alexandros Sopasakis page 37 Based on the results of this theorem the coe icients On of 330 are de ned to be 2 121 1 7 1 i n 7 100m dz 200M m 1f TS Odd 331 121 0 121 mr 0 if n is even This therefore gives the complete solution for our PDE to be7 gt0 7 n 2quot um t 200 1 COW 17Tsinlt2n U72 67279 12132 t 0 2n 17r 121 assuming that A gt 0 Note that we wrote this solution for 272 1 instead of n in order to make sure that only the odd values are used Math 456 Spring 2006 Dr Alexandros Sopasakis page 44 39 Modeling and Finance We now take a quick look into the modeling of finance but also more generally stochastic differential equations In this Chapter we will try to give an overview of some of the basic mathematical methods and models which have been used to predict trends for stock and more generally get an edge and make money over other investors Before we begin we must provide some definitions and basic theorems which will be useful in obtaining the solutions and other results from our financial models There are several books which you can follow if you would like a more in depth view on the subject of nance In our approach we will follow closely the examples in Chapters 4 5 and 12 from Stochastic Differential Equations by Bernt Oksendal 5th edition We encourage the interested student to look into this book well several other references therein for all the details 310 Background and basic de nitions One of the most well known examples of how mathematical models can be successful in predicting the value of a stock is the well known Black and Scholcs formula The Black and Scholes formula is nothing more than a stochastic differential equation Fischer Black and Myron Scholes were the first to successfully come up with such an equation in order to predict how much money an investor should pay for a so called European Stock Option What is a European Stock Option It is the option to buy in the future if you still want to a given stock at a prespecified price First of all you do not have to buy the stock in the future if you do not want to You just pay an agreed upon amount now so that you can have this option later You agree in advance however when you can exercise your option to buy not before or after and how much you must pay for the stock at that time Needless to that if the value of the stock has risen a lot you will be making a ton of money if you have agreed to buy the stock at a smaller value Naturally in the opposite situation you may not want to buy the stock at all and just incur only the loss of the initial amount for buying the option in the first place Options nowadays is a big business Even governments get into the action of dealing in options You can therefore imagine how useful it would be to have a tool which could predict the future value of a given stock In 1973 Black and Scholes produced their successful formula capable of giving such a prediction For their discovery they were awarded the Nobel price in economics in 1997 The mathematics necessary to understand and solve such mathematical models of finance are extremely complicated and require several years of in depth study in measure theory analysis dif ferential equations etc In this Chapter we will only look at a limited few models and methods of solution We hope that this introduction to the mathematical treatment of financial models will interest the reader in a further course in the mathematics of finance Let us start with some basic definitions We define Xt to be the price of stock i at a given time t A market Xt is the collection of all stocks X0 XutX1tgant Usually an investor will try to diversify their overall position by buying a certain amount of a given stock and not placing all herhis holdings into just a single stock We call the overall position or holdings that an investor has placed for different stocks a portfolio We denote by mm the number Math 456 Spring 2006 Dr Alexandros Sopasakis page 45 of units of stock i that the investor holds at time t Therefore the portfolio for that investor in a market of 71 1 stocks is denoted by 9U 9W 91W aw The overall value of partfalia 9t for our investor at any given time is therefore found from Wt 9U XU 90tXut 91tXut 9ntXnt In order to produce the solutions to any of our models in finance we must learn the basics about solutions of stochastic differential equations This is done in the next section 311 Stochastic Differential Equations A stochastic differential equation is nothing more than a deterministic differential equation deriva tives of the function plus noise What is noise Noise incorporates random effects into our deterministic differential equation Since nature is not deterministic is makes sense to want to model natural behavior with models which do include this noise or random effects Let us look at a simple example We revisit our simple population model from Chapter 1 in our book div dt atNt where N t denotes the population size at time t and at is the corresponding rate of growth at that time If at is known completely then the above differential equation is deterministic and to solve with the methods which we have already examined in class If however the rate 1t is not deterministic but instead it also contains random terms 1t Mt noisc then we have a stochastic differential equation d Tu noisc Nt where t is completely known and noise represents the random effects Although the behavior of this noise term is not known we do assume that its probability distribution is known and is in fact the same that of a Gaussian distribution What is a Gaussian distribution A simple example of a Gaussian distribution is that of the probability distribution corresponding to throwing a die A die can take the values from 1 to 6 and has an average of 35 This is a typical example of a Gaussian distribution In other words if you repeated this experiment thousands of times and plotted the histogram you would obtain a bell shaped curve which has its high pick for the value of 35 and is symmetric around that value Let us now look into an outline of how we would solve such a stochastic differential equation Although in general it is not to solve differential equations it is even harder to solve stochastic differential equations The main method of solution behind both stochastic or regular differential equations is actually the same The main difference in the solution is knowing how to take an integral of a stochastic process such N In fact this is the only new item we must learn before we are capable of solving stochastic differential equations This new method of integration of processes which include stochastic terms is called to Calculus Before we present however this new method of integration let us look at a complete example of a solution of a stochastic differential equation SDE Math 456 Spring 2006 Dr Alexandros Sopasakis page 46 311 1 An Example In this subsection we present an example of how we normally solve an SDE Stochastic Differential Equation in hope of motivating at least the outline of the method Although not all steps in the solution will be clear please try to follow it so that you will become familiar with the general procedure The missing steps the Ito formula will be taken care in the next section The best to present the solution of a SDE is to instead produce the solution of a usual differential equation The reason for looking at a differential equation instead is that the solution methods are in fact the same In that respect we will start with a deterministic differential equation which we have seen before the population model mm m aN t where a is a constant no random effects yet Also note that for now at least this is just a simple deterministic ODE The method of solution for such an equation is actually very simple We will just apply the separation of variables method and obtain the solution N We therefore start by simply separating variables dN t NU adt and integrating both sides We will use de nite integrals and assume that at initial time t U the population is known to be We want to find the population at a given final time t 8 Thus integrating the above we have 5 dN t 5 adt 0 1quot t 0 lnNt at Substituting in the values for t and simplifying the algebra we obtain the solution for the population at time t s to be The integrals above are both easy NUEa5 Let us now look at the solution of a very similar population model This time however we will include the random effects in the growth rate a of the population Let us therefore assume that the growth rate depends on both a deterministic rate 7quot which is a known constant and a noisy random term which will be denoted by I39Vt at 7quot IIIKt Thus our differential equation now is a SDE dmn m mem We rewrite the above as Math 456 Spring 2006 Dr Alexandros Sopasakis page 47 Note that now the unknown population N t is what we call a stochastic process and it will in fact be the reason for our troubles when we will try to integrate it later For now we follow the same procedure at solving this SDE regardless Thus we rst separate variables and then integrate both sides dNt 7 rdt W t dt We will go a step further and use the notation dBt I Vtdt where B t is what we call Brownian motion Thus our main SDE can be written us 1N t 7 t B t NU rd d Let us integrate both sides before ST S 0 Na 0 dt0 dBt We start with our right hand side First 5 frdtrt T S 0 dBt Bt R 33 30 33 So far this does not look so difficult after all But now we will attempt to integrate the left hand side and that is where the trouble starts Our usual calculus is in fact wrong when applied to a stochastic process such N We must use stochastic calculus rules for such processes In this class we will in fact learn some of the basics of Ito calculus and how to use it in order to correctly obtain the answers from such integrals In order to integrate the term above we need to make use of something called the Ito formula Although we learn about the Ito formula in the next section let us give the answer here even though it will not make sense where it came from For our integral 5 dNt 0 NU we know that the function which we would normally obtain using usual calculus and replacing N by is in fact Similarly gt ln The Ito formula which you do not know yet for this function gt with N t gives 1 dlnNt NU dt 336 You are not supposed to understand where the above formula came from This you will learn in the next section So for now just accept this and see if you can follow the remaining of this solution Math 456 Spring 2006 Dr Alexandros Sopasakis page 48 Let us now rewrite as 1 t dln 1Vt Edt S S n V 51 H a Na 0 d1 mun0 th 33 The right hand side of the above gives and integrate it lnNt it lnNs lnNUsln is n Thus substituting this into we now have the answer for our previously unknown stochastic integral 5 d v t N 1 Mi 2 I 58 The above obtained making use of the Ito formula and is in fact what we call Ito integration Notice that in fact the Ito integral is similar in some to the usual integral plus a correction term 8 It is possible for some cases that there will be no correction term But in fact we should follow this procedure anyway just to make sure Let us put together the complete solution of this SDE ln is Ts 33 and solving for Ns Ns NoequotsSBltsgt Note that the solutions between the ODE and SDE are similar in form they are both exponentials but slightly different In fact the biggest difference is that the SDE solution contains the Brownian motion term B It is generally believed that the solution of the SDE model can capture more realistic terms than the ODE model solution can Nevertheless if the model is not good to start with it does not matter whether it has random effects incorporated in it or not Thus we should always keep in mind that the underlying model formulation is more important than anything else and it should always be our most important concern Once we are satis ed with the model itself we can start considering whether some parameters in the model would be better to be represented via stochastic terms oing through the solution of the SDE we had to make use of the Ito formula which gave rise to a new type of integral for stochastic processes How did that formula come about We present below a quick overview without proofs of Ito calculus and in particular in integratian


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Anthony Lee UC Santa Barbara

"I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.