### Create a StudySoup account

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

Already have a StudySoup account? Login here

# Topic Web Mashups CS 249

GPA 3.89

### View Full Document

## 47

## 0

## Popular in Course

## Popular in ComputerScienence

This 8 page Class Notes was uploaded by Jordon Hermiston on Thursday October 29, 2015. The Class Notes belongs to CS 249 at Wellesley College taught by Staff in Fall. Since its upload, it has received 47 views. For similar materials see /class/230936/cs-249-wellesley-college in ComputerScienence at Wellesley College.

## Popular in ComputerScienence

## Reviews for Topic Web Mashups

### 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/29/15

Chapter 1 Introduction Extract from Introduction to Scienti c Computing With Differential Equation Models Lennart Edsberg KOD KTH SE100 44 Stockholm There is probably no exaggeration to say that differential equations are the most common and important mathematical model in science and engi neering Whenever we want to model a system where the state variables vary with time andor space differential equations are the natural tool for describing its behaviour The construction of a differential equation model demands a thorough understanding of what takes place in the process we want to describe However setting up a differential equation model is not enough we must also invent a method for its solution The effort of nding the solution of a differential equation is much a symbiosis of modeling mathematics and choosing a method Therefore when you are requested to solve a differential equation problem from some application it is useful to know facts both about its modeling background its mathematical properties and its numerical solution The last part involves choosing appropriate numerical methods adequate software and appealing ways of visualizing the result This interaction between modeling mathematics and numerical methods is nowadays referred to as scienti c computing and its purpose is to perform simulations of processes in science and engineering 11 What is a Differential Equation A differential equation is a relation between a function and its derivatives If the function u depends on only one variable t ie u ut the differential equation is called ordinary If u depends on at least two variables t and x ie u utx the differential equation is called partial 12 Examples of an ordinary and a partial differential equation An example of an elementary ordinary differential equation ODE is du 7 an 11 d where a is a parameter in this case a real constant It is frequently used to model eg the growth of a population a gt 0 or the decay of a radioactive substance a lt 0 The ODE 11 is a special case of differential equations called linear with constant coef cients see chapter 2 The differential equation 11 can be solved analytically ie the solu tion can be written explicitly as an algebraic formula The solution of the differential equation is ut Cc 12 In 12 C is an arbitrary constant hence the solution is not unique The expression 12 is called the general solution If C is known to a certain value however we get a unique solution which when plotted in the tu plane gives a trajectory solution curve This solution is called the particular solution The constant C can be determined eg by settling a point t0u0 in the t u plane through which the solution curve shall go Such a point is called an initial point and the demand that the solution shall go through this point is called the initial condition A differential equation together with an initial condition is called an initial value problem lVP Some solutions of dudt u Solution of dudt u u01 1 1 08 A A06 0 04 391 02 0 05 1 15 2 V0 05 1 15 2 g1a t g1b t Observe that the differential equation alone does not de ne a unique solution we also need an initial condition or other conditions A plot of all trajectories ie all solutions of an ODE in the tu plane will result in a graph that is totally black since there are in nitely many solution curves lling up the whole plane In general it is not possible to nd the analytical solution of a differential equation that easily The simple differential equation du 7 t2 u2 13 d cannot be solved in that way If we want to plot trajectories of this problem we have to use numerical methods An example of an elementary partial differential equation PDE is 7 a7 0 14 where a is a parameter7 in this case a real constant The solution of 14 is a function of two variables u utz This differential equation is called the advection equation Physically it decribes the evolution of a scalar quantity eg temperature utx carried along the a axis by a flow with constant velocity a It is also known as the linear convection equation and is an example of a hyperbolic PDE7 see chapter 5 The general solution of this differential equation is see exercise 4 ut a Fx 7 at 15 where F is an arbitrary differentiable function in one variable This is indeed a large amount of possible solutions The three functions ut a z 7 at ut a 67wiat2 ut a sina 7 at are just three solutions out of the in nitely many solutions of this PDE To obtain a unique solution for t gt 0 we need an initial condition If the differential equation is valid for all x ie 700 lt z lt 00 and utx is known for t 07 ie u0x fa where fx is a given function7 the initial value function7 we get the particular solution ut fz 7 at 16 utx expXatquot2 at t0 and t4 when a 1 Physically 16 corresponds to the propagation of the initial function f along the x axis with velocity lol The propagation is to the right if a gt 0 and to the left ifa lt 0 The graphical representation can alternatively be done in 3D 3Dgraph of utxexpxatquot2 when a1 lilllllllllMlzlyllxolzlgqmm will 0 l i l m Ml ll ll WW ll Wwv W W m l Milli o l W Mil o Ml l till ll m l N l 3t3fl2lltll lll l wollllllllllNWl l t 0 o o 9 O W l lil ml l l l ll mm o Milli W Hit 0 Mtlltltlt lllllllllllll l 23 hams g3 xaxis When a PDE is formulated on a semi in nite or nite n interval7 boundary conditions are needed in addition to initial conditions to obtain a unique solution Most PDEs can only be solved with numerical methods Only for very special classes of PDE problems it is possible to nd an analytic solution7 often in the form of an in nite series Exercises 1 If a is a complex constant a Am What is the real and imaginary part of out 2 If a is a complex constant What conditions are necessary to impose on A and M if out for t gt 0 is to be exponentially decreasing7 b exponentially increasing7 4 c oscillating with constant amplitude d oscillating with increasing amplitude e oscillating with decreasing amplitude 3 If a is a complex constant what condition on A is needed if c is to be bounded for t 2 0 4 Show that the general solution of ut aux 0 is uat Fz 7 at by introducing the transformation zat 77a7at Transform the original problem to a PDE in the variables g and 77 and solve this PDE 5 Show that a solution of 14 starting at t 0 z x0 is constant along the straight line z 7 at 0 This means that the initial value uz00 n is transported unchanged along this line which is called a characteristic of the PDE 13 Numerical analysis a necessity for scienti c computing In scienti c computing the numerical methods used to solve the mathe matical models should be robust ie they should be reliable and give accurate values for a large range of parameter values Sometimes however a method may fail and give unexpected results Then it is important to know how to investigate why a wrong result has occurred and how it can be remedied Two basic concepts in numerical analysis are stability and accuracy When choosing a method for solving a differential equation problem it is necessary to have some knowledge about how to analyse the result of the method with respect to these concepts This necessity has been well expressed by late Prof Germund Dahlquist famous for his fundamental research in the theory of numerical treatment ofdifferential equations There is nothing as practical as a little good theory As an example of unexpected results choose the well known vibration equation occurring in the theory of eg mechanical vibrations electrical vibrations and vibration of sound The form of this equation with initial conditions is dzu du du mg Ca ku ft u0 uo 110 17 In mechanical vibrations in is the mass of the vibrating particle c the dam ping coef cient k the spring constant ft an outer force acting on the particle no the initial position and no the initial velocity of the particle The ve quantities 7710 ku0vo are also referred to as the parameters of the problem Solving 17 numerically for a set of values of the parameters is an ex ample of simulation of a mechanical process and it is necessary to choose a robust method ie a method for which the results are reliable for a large range of values of the parameters The following two examples based on the vibration equation show that unexpected results depending on unstability andor bad accuracy may occur 1 Assume that ft 0 free vibrations and the following values of the parameters in 1 c 04 k 45 no 1 no 0 Without too much knowledge about mechanics we would expect the solution to be oscillatory and damped ie the amplitude is decreasing If we use the simple Euler met hod with constant stepsize see chapter 3 we obtain the following numerical solution visualized together with the exact solution U ml 1994 The graph shows that the numerical solution gives an unstable result with increasing amplitudes why The answer is given in chapter 3 For the mo ment just accept that insight in stability concepts and experience in handling unexpected results are needed for successful simulations 2 When the parameters in equation 17 are changed to m 1 c 10 h 103 uo 0 110 0 and ft 10 4 sin 40t forced vibrations we obtain the following numerical result when using a method from a commercial software product for solving differential equations 1077 Exakt solutlon solld curve and numerical solutlon dotted curve I I I I I I I I 4 7 3 2 l r 0 1 7 I u r1 I 2 3 4 u 5 1 1 5 2 2 5 3 3 5 4 4 5 The graph shows that the numerical result is not correct why The an swer is given in chapter 3 This time we have an accuracy problem The default accuracy value used in the method is not enough the correspondning numerical parameter must be tuned appropriately 14 Outline of the contents of this book After this introductory chapter the text is organized so that ordinary differential equations ODEs are treated rst followed by partial differential equations PDEs The aim of this book is to be an introduction to scienti c computing Therefore not only numerical methods are presented but also 1 how to set up a mathematical model in the form of an ODE or PDE 2 give an outline of the mathematical properties of differential equation problems and explicit analytical solutions when they exist 3 show examples of how results are presented with proper visualization The ODE part starts in chapter 2 presenting mathematical properties of ODEs rst the basic and important problem class of ODE systems being 7 linear with constant coe cients applied to important ODE system models from classical mechanics electrical networks and chemical kinetics This is followed by numerical treatment of ODE problems in general divided into the classical subdivision of initial value problems IVPs in chapter 3 and boundary value problems BVPs in chapter 4 For IVPs the nite difference method FD is described starting with the elementary Euler method Important concepts brought up for ODEs are accuracy and stability which is followed up also for PDEs in later chapters For BVPs both FD and the nite element method FEM are described Important application areas where ODEs are used as mathematical model are presented selected templates are described in the chapters as the main theme and exercises sometimes suitable for computer labs are inserted into the text This organization is continued in the chapters presenting PDEs PDEs are introduced in chapter 5 dealing with mathematical properties of their solutions and also a presentation of several of the important PDEs of science and engineering such as the equations of Navier Stokes Maxwell and Schrodinger In chapter 6 an outline of mathematical modeling is brought up with the intention ofgiving a feeling ofthe principles used when a differential equation ODE or PDE is set up from constitutive and conservative equations The three chapters to follow are devoted to the numerical treatment of PDEs following the classical subdivision into parabolic elliptic and hyperbolic PDEs Concepts from the ODE chapters such as accuracy and stability are treated for timedependent parabolic and hyperbolic PDEs For stationary problems elliptic PDEs sparse linear systems of algebraic equations are essential and hence presented Selected models presented in chapter 5 and 6 are used as illustrations for the different methods introduced The last chapter gives an overview of existing software for scienti c com puting with emphasis on the use of MATLAB for programming and FEMLAB for modeling and parameter studies

### 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

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

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

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION 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 support@studysoup.com

#### STUDYSOUP REFUND POLICY

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: support@studysoup.com

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 support@studysoup.com

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.