Ordinary Differential Equations

Size: px
Start display at page:

Download "Ordinary Differential Equations"

Transcription

1 Ordinary Differential Equations MCS 507 Lecture 30 Mathematical, Statistical and Scientific Software Jan Verschelde, 31 October 2011

2 Ordinary Differential Equations 1 2 3

3 a simple pendulum Imagine a sphere attached to a massless rod oscilating back and forth due to gravity: where t is time, starting at 0; θ (t) + α sin(θ(t)) = 0, θ is the angle of deviation the rod makes from its (vertical) position at rest; α = g/l, where g is the gravitational constant and L is the length of the rod. page 3

4 first order equations Introducing an auxiliary variable v(t) = θ (t), we transform θ (t) + α sin(θ(t)) = 0 into a system of first order : θ (t) = v(t) v (t) = α sin(θ(t)) θ with initial conditions: θ(0) = π/6 and v(0) = 0. page 4

5 forward We use the definition θ θ(t + h) θ(t) (t) = lim h 0 h to discretize the time domain with step size t. At t = t k, we approximate θ(t k ) θ k and θ(t k+1 ) θ k+1 for and t k+1 = t k + t. So θ (t) = v(t) is approximated by θ k+1 θ k = v k. t Then we compute θ k+1 = θ k + tv k. Similarly, v (t) = α sin(θ(t)) is approximated by v k+1 = v k α t sin(θ k ). page 5

6 plotting the evolution page 6

7 programming the import scipy as sp import matplotlib.pyplot as plt def pendulum(t,n,theta0,v0,alpha): Return the motion (theta, v, t) of a pendulum, governed by the ODE: theta (t) + alpha*sin(theta(t)) = 0, where the parameters are T : time t ranges from 0 to T, n : the number of time steps, theta0 : angle at t = 0, v0 : velocity at t = 0, alpha : value for the parameter. page 7

8 the code in pendulum dt = T/float(n) t = sp.linspace(0,t,n+1) v = sp.zeros(n+1) theta = sp.zeros(n+1) v[0] = v0 theta[0] = theta0 for k in range(n): theta[k+1] = theta[k] + dt*v[k] v[k+1] = v[k] - alpha*dt*sp.sin(theta[k+1]) return theta, v, t page 8

9 the constants def test_values(): Returns values for the input data: T, n, theta0, v0, and alpha. theta0 = sp.pi/6 n = 1000 T = 10 v0 = 0 alpha = 5 return T, n, theta0, v0, alpha page 9

10 the function main def main(): Defines the test values and computes the trajectory of the pendulum. T,n,p0,v0,a = test_values() theta,v,t = pendulum(t,n,p0,v0,a) f = plt.figure() f.add_subplot(211) plt.plot(t,theta) plt.title( angle as function of time ) f.add_subplot(212) plt.plot(t,v,label= velocity(t) ) plt.title( velocity as function of time ) plt.show() page 10

11 Ordinary Differential Equations 1 2 3

12 calling ODEPACK do from.odepack import odeint then help(odeint) shows odeint(func, y0, t,...) Solve a system of ordinary using lsoda from the FORTRAN library odepack. Solves the initial value problem for stiff or non-stiff systems of first order ode-s:: dy/dt = func(y,t0,...) where y can be a vector. ODEPACK is a FORTRAN77 library which implements Alan Hindmarsh s solvers for ordinary, available at page 12

13 defining the right hand side import scipy as sp import matplotlib.pyplot as plt from.odepack import odeint def f(y,t): Is the right hand side of the ODE dy/dt = f(y,t). r = sp.array([0,0],float) r[0] = y[1] r[1] = -5.0*sp.sin(y[0]) return r page 13

14 the function main def main(): Computes the motion of a pendulum, governed by the ODE: theta (t) + alpha*sin(theta(t)) = 0, T = 10; n = 1000 theta0 = sp.pi/6; v0 = 0 tspan = sp.linspace(0,t,n+1) initc = sp.array([theta0,v0]) y = odeint(f,initc,tspan) theta = y[:,0] v = y[:,1] then plot (tspan,theta) and (tspan,v). page 14

15 Ordinary Differential Equations 1 2 3

16 Consider three bodies with masses m 1, m 2, m 3 with positions (x 1 (t), y 1 (t)), (x 2 (t), y 2 (t)), (x 3 (t), y 3 (t)). For the first body: d 2 x 1 (t) dt 2 d 2 y 1 (t) dt 2 =... m 2 (x 1 (t) x 2 (t)) = ( (x1 (t) x 2 (t)) 2 + (y 1 (t) y 2 (t)) 2) 3/2 m 3 (x 1 (t) x 3 (t)) ( (x1 (t) x 3 (t)) 2 + (y 1 (t) y 3 (t)) 2) 3/2 page 16

17 problem With u 1 (t) and v 1 (t), the velocities of x 1 (t) and y 1 (t): dx 1 (t) dt du 1 (t) dt dy 1 (t) dt dv 1 (t) dt = u 1 (t) =... = v 1 (t) =... Adding the equations for the other two bodies, we get 12 first order. page 17

18 the figure eight page 18

19 Ordinary Differential Equations 1 2 3

20 defining the system import scipy as sp import matplotlib.pyplot as plt from.odepack import odeint def f(z,t): z is a vector with 12 entries ordered in blocks of 4: x[k](t),x [k](t),y[k](t),y [k](t) for k = 1,2,3. L = [0 for k in xrange(12)] r = sp.array(l,float) page 20

21 relabeling # take three equal masses m = [1, 1, 1] # relabel input vector z x1 = z[0]; u1 = z[1]; y1 = z[2]; v1 = z[3] x2 = z[4]; u2 = z[5]; y2 = z[6]; v2 = z[7] x3 = z[8]; u3 = z[9]; y3 = z[10]; v3 = z[11] # u and v are first derivatives of x and y r[0] = u1; r[2] = v1 r[4] = u2; r[6] = v2 r[8] = u3; r[10] = v3 page 21

22 computing distances # compute squared distances dx12 = x1 - x2; sdx12 = dx12**2 dx13 = x1 - x3; sdx13 = dx13**2 dx23 = x2 - x3; sdx23 = dx23**2 dy12 = y1 - y2; sdy12 = dy12**2 dy13 = y1 - y3; sdy13 = dy13**2 dy23 = y2 - y3; sdy23 = dy23**2 # denominators d12 = (sdx12 + sdy12)**1.5 d13 = (sdx13 + sdy13)**1.5 d23 = (sdx23 + sdy23)**1.5 page 22

23 assigning the result # righthandside for second order r[1] = - m[1]*dx12/d12 - m[2]*dx13/d13; r[3] = - m[1]*dy12/d12 - m[2]*dy13/d13; r[5] = - m[0]*(-dx12)/d12 - m[2]*dx23/d23; r[7] = - m[0]*(-dy12)/d12 - m[2]*dy23/d23; r[9] = - m[0]*(-dx13)/d13 - m[1]*(-dx23)/d23; r[11] = - m[0]*(-dy13)/d13 - m[1]*(-dy23)/d23; return r page 23

24 the function main def main(): Plots the trajectories of 3 equal masses forming a figure 8. # initial positions ip1 = [ , ] ip2 = [-ip1[0], -ip1[1]]; ip3 = [0, 0] # initial velocities iv3 = [ , ] iv2 = [-iv3[0]/2, -iv3[1]/2]; iv1 = iv2 # input for initial righthandside vector initz = [ip1[0], iv1[0], ip1[1], iv1[1], \ ip2[0], iv2[0], ip2[1], iv2[1], \ ip3[0], iv3[0], ip3[1], iv3[1]] page 24

25 solving the problem T = 2*sp.pi/3; n = 1000 tspan = sp.linspace(0,t,n+1) z = odeint(f,initz,tspan) # extracting the trajectories x1 = z[:,0]; y1 = z[:,2] x2 = z[:,4]; y2 = z[:,6] x3 = z[:,8]; y3 = z[:,10]; # plotting the trajectories fig = plt.figure() plt.plot(x1,y1, r,x2,y2, g,x3,y3, b ) plt.show() page 25

26 Ordinary Differential Equations 1 2 3

27 the tractrix problem A tractor is connected to a trailer by a rigid bar of unit length. The tractor moves in a circle. The path of the trailer is the solution of a system of ordinary. Generalization: trailer is predator, tractor is prey. page 27

28 tractor, trailer, and bar page 28

29 the model Given are (x 1 (t), x 2 (t)) defining the path of the tractor and L is the length of the rigid bar. Wanted: (y 1 (t), y 2 (t)), the path of the trailer. The velocity vector of the trailer is parallel to the direction of the bar: ( y 1 y 2 ) ( y1 x = λ 1 y 2 x 2 ), λ > 0. page 29

30 the ODE system The velocity vector of the trailer is the projection of the velocity vector of the tractor onto the direction of the bar: u = (y 1 x 1, y 2 x 2 ) (y 1 x 1, y 2 x 2 ) and v = (x 1, x 2 ), we compute the projection of the velocity vector as (v T u)u. Then the system of first-order equation that defines the path of the trailer is given by ( ) y 1 y 2 = (v T u)u. with u the normalized vector of the direction of the bar and v the velocity vector of the tractor. page 30

31 Ordinary Differential Equations 1 2 3

32 the tractor import scipy as sp import numpy as np import matplotlib.pyplot as plt from.odepack import odeint def tractor(t): Returns the position (x,y) and velocity vector (u,v) for the tractor at time t. x = sp.cos(t); y = sp.sin(t) u = -sp.sin(t); v = sp.cos(t) return x,y,u,v page 32

33 def trailer(y,t): Defines the right hand side of the system for the trailer. r = np.array([0,0],float) x1, x2, x1v, x2v = tractor(t) r[0] = y[0] - x1 r[1] = y[1] - x2 r = r/np.linalg.norm(r) d = x1v*r[0] + x2v*r[1] r = d*r return r the trailer page 33

34 solving the IVP def main(): Defines the setup for the system for the trailer and solves it. T = 20; n = 100 tspan = sp.linspace(0,t,n+1) initc = sp.array([2,0]) path = odeint(trailer,initc,tspan) x = path[:,0]; y = path[:,1] x1, x2, x1v, x2v = tractor(tspan) fig = plt.figure() plt.plot(x1,x2, r,x,y, g ) for i in xrange(0,n,6): plt.plot(sp.array([x1[i],x[i]]), \ sp.array([x2[i],y[i]]), b ) plt.show() page 34

35 Summary + Exercises SciPy.integrate exports odeint() of odepack. 1 Extend the model for the so it works for any number of bodies. 2 Instead of odeint() for the planar 3-body problem, write code for the forward. For which value(s) of the step size do you get the figure eight? 3 Make an animation of the trajectories of tractor, trailer, and the moving bar. page 35

36 more exercises 4 Solving y = s(t)w where s(t) is the speed and w the normalized direction vector of a predator chasing a prey gives in y the coordinates of the predator. Set up a model for a prey to move in a straight line and let s(t) be a large enough constant so the prey gets caught. Plot the trajectories of prey and predator. 5 Read the documentation about solving ODEs in Sage and use Sage to plot the trajectories either for the figure eight planar 3-body or the tractrix problem. Homework due Friday 18 November at 10AM: Assignments 3, 4, 1, 2, 3, 1, 4, 2, 3, 1 of lectures 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, respectively. page 36

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations 1 An Oscillating Pendulum applying the forward Euler method 2 Celestial Mechanics simulating the n-body problem 3 The Tractrix Problem setting up the differential equations

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations 1 An Oscillating Pendulum applying the forward Euler method 2 Celestial Mechanics simulating the n-body problem 3 The Tractrix Problem setting up the differential equations

More information

The Shooting Method for Boundary Value Problems

The Shooting Method for Boundary Value Problems 1 The Shooting Method for Boundary Value Problems Consider a boundary value problem of the form y = f(x, y, y ), a x b, y(a) = α, y(b) = β. (1.1) One natural way to approach this problem is to study the

More information

Uniform and constant electromagnetic fields

Uniform and constant electromagnetic fields Fundamentals of Plasma Physics, Nuclear Fusion and Lasers Single Particle Motion Uniform and constant electromagnetic fields Nuno R. Pinhão 2015, March In this notebook we analyse the movement of individual

More information

MAS212 Scientific Computing and Simulation

MAS212 Scientific Computing and Simulation MAS212 Scientific Computing and Simulation Dr. Sam Dolan School of Mathematics and Statistics, University of Sheffield Autumn 2017 http://sam-dolan.staff.shef.ac.uk/mas212/ G18 Hicks Building s.dolan@sheffield.ac.uk

More information

The Inverted Pendulum

The Inverted Pendulum Lab 1 The Inverted Pendulum Lab Objective: We will set up the LQR optimal control problem for the inverted pendulum and compute the solution numerically. Think back to your childhood days when, for entertainment

More information

Mathematical Models. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Fall Department of Mathematics

Mathematical Models. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Fall Department of Mathematics Mathematical Models MATH 365 Ordinary Differential Equations J. Robert Buchanan Department of Mathematics Fall 2018 Ordinary Differential Equations The topic of ordinary differential equations (ODEs) is

More information

1 The pendulum equation

1 The pendulum equation Math 270 Honors ODE I Fall, 2008 Class notes # 5 A longer than usual homework assignment is at the end. The pendulum equation We now come to a particularly important example, the equation for an oscillating

More information

Mathematical Models. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Spring Department of Mathematics

Mathematical Models. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Spring Department of Mathematics Mathematical Models MATH 365 Ordinary Differential Equations J. Robert Buchanan Department of Mathematics Spring 2018 Ordinary Differential Equations The topic of ordinary differential equations (ODEs)

More information

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations

Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations Research Computing with Python, Lecture 7, Numerical Integration and Solving Ordinary Differential Equations Ramses van Zon SciNet HPC Consortium November 25, 2014 Ramses van Zon (SciNet HPC Consortium)Research

More information

Lecture 1. Scott Pauls 1 3/28/07. Dartmouth College. Math 23, Spring Scott Pauls. Administrivia. Today s material.

Lecture 1. Scott Pauls 1 3/28/07. Dartmouth College. Math 23, Spring Scott Pauls. Administrivia. Today s material. Lecture 1 1 1 Department of Mathematics Dartmouth College 3/28/07 Outline Course Overview http://www.math.dartmouth.edu/~m23s07 Matlab Ordinary differential equations Definition An ordinary differential

More information

Modeling with First-Order Equations

Modeling with First-Order Equations Modeling with First-Order Equations MATH 365 Ordinary Differential Equations J. Robert Buchanan Department of Mathematics Spring 2018 Radioactive Decay Radioactive decay takes place continuously. The number

More information

The Pendulum. The purpose of this tab is to predict the motion of various pendulums and compare these predictions with experimental observations.

The Pendulum. The purpose of this tab is to predict the motion of various pendulums and compare these predictions with experimental observations. The Pendulum Introduction: The purpose of this tab is to predict the motion of various pendulums and compare these predictions with experimental observations. Equipment: Simple pendulum made from string

More information

3 Space curvilinear motion, motion in non-inertial frames

3 Space curvilinear motion, motion in non-inertial frames 3 Space curvilinear motion, motion in non-inertial frames 3.1 In-class problem A rocket of initial mass m i is fired vertically up from earth and accelerates until its fuel is exhausted. The residual mass

More information

Math 104: l Hospital s rule, Differential Equations and Integration

Math 104: l Hospital s rule, Differential Equations and Integration Math 104: l Hospital s rule, and Integration Ryan Blair University of Pennsylvania Tuesday January 22, 2013 Math 104:l Hospital s rule, andtuesday Integration January 22, 2013 1 / 8 Outline 1 l Hospital

More information

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS LECTURE 10 APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS Ordinary Differential Equations Initial Value Problems For Initial Value problems (IVP s), conditions are specified

More information

Math 3B: Lecture 11. Noah White. October 25, 2017

Math 3B: Lecture 11. Noah White. October 25, 2017 Math 3B: Lecture 11 Noah White October 25, 2017 Introduction Midterm 1 Introduction Midterm 1 Average is 73%. This is higher than I expected which is good. Introduction Midterm 1 Average is 73%. This is

More information

Modeling with First-Order Equations

Modeling with First-Order Equations Modeling with First-Order Equations MATH 365 Ordinary Differential Equations J. Robert Buchanan Department of Mathematics Fall 2018 Radioactive Decay Radioactive decay takes place continuously. The number

More information

Ordinary Differential Equations (ODE)

Ordinary Differential Equations (ODE) Ordinary Differential Equations (ODE) Why study Differential Equations? Many physical phenomena are best formulated mathematically in terms of their rate of change. Motion of a swinging pendulum Bungee-jumper

More information

Lecture 19: Calculus of Variations II - Lagrangian

Lecture 19: Calculus of Variations II - Lagrangian Lecture 19: Calculus of Variations II - Lagrangian 1. Key points Lagrangian Euler-Lagrange equation Canonical momentum Variable transformation Maple VariationalCalculus package EulerLagrange 2. Newton's

More information

On Schemes for Exponential Decay

On Schemes for Exponential Decay On Schemes for Exponential Decay Hans Petter Langtangen 1,2 Center for Biomedical Computing, Simula Research Laboratory 1 Department of Informatics, University of Oslo 2 Sep 24, 2015 1.0 0.8 numerical

More information

Driven, damped, pendulum

Driven, damped, pendulum Driven, damped, pendulum Note: The notation and graphs in this notebook parallel those in Chaotic Dynamics by Baker and Gollub. (There's a copy in the department office.) For the driven, damped, pendulum,

More information

Practice Final Solutions

Practice Final Solutions Practice Final Solutions Math 1, Fall 17 Problem 1. Find a parameterization for the given curve, including bounds on the parameter t. Part a) The ellipse in R whose major axis has endpoints, ) and 6, )

More information

Matlab homework assignments for modeling dynamical systems

Matlab homework assignments for modeling dynamical systems Physics 311 Analytical Mechanics - Matlab Exercises C1.1 Matlab homework assignments for modeling dynamical systems Physics 311 - Analytical Mechanics Professor Bruce Thompson Department of Physics Ithaca

More information

Chapter 6 Nonlinear Systems and Phenomena. Friday, November 2, 12

Chapter 6 Nonlinear Systems and Phenomena. Friday, November 2, 12 Chapter 6 Nonlinear Systems and Phenomena 6.1 Stability and the Phase Plane We now move to nonlinear systems Begin with the first-order system for x(t) d dt x = f(x,t), x(0) = x 0 In particular, consider

More information

Math 266: Ordinary Differential Equations

Math 266: Ordinary Differential Equations Math 266: Ordinary Differential Equations Long Jin Purdue University, Spring 2018 Basic information Lectures: MWF 8:30-9:20(111)/9:30-10:20(121), UNIV 103 Instructor: Long Jin (long249@purdue.edu) Office

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Swaroop Nandan Bora swaroop@iitg.ernet.in Department of Mathematics Indian Institute of Technology Guwahati Guwahati-781039 Modelling a situation We study a model, a sort

More information

Ordinary Differential Equations. Monday, October 10, 11

Ordinary Differential Equations. Monday, October 10, 11 Ordinary Differential Equations Monday, October 10, 11 Problems involving ODEs can always be reduced to a set of first order differential equations. For example, By introducing a new variable z, this can

More information

strings, dictionaries, and files

strings, dictionaries, and files strings, dictionaries, and 1 2 MCS 507 Lecture 18 Mathematical, Statistical and Scientific Software Jan Verschelde, 3 October 2011 strings, dictionaries, and 1 2 data structures Python glues with strings,,

More information

Phys 7221 Homework # 8

Phys 7221 Homework # 8 Phys 71 Homework # 8 Gabriela González November 15, 6 Derivation 5-6: Torque free symmetric top In a torque free, symmetric top, with I x = I y = I, the angular velocity vector ω in body coordinates with

More information

Lecture 6, September 1, 2017

Lecture 6, September 1, 2017 Engineering Mathematics Fall 07 Lecture 6, September, 07 Escape Velocity Suppose we have a planet (or any large near to spherical heavenly body) of radius R and acceleration of gravity at the surface of

More information

Practice Final Exam Solutions

Practice Final Exam Solutions Important Notice: To prepare for the final exam, study past exams and practice exams, and homeworks, quizzes, and worksheets, not just this practice final. A topic not being on the practice final does

More information

Sheet 5 solutions. August 15, 2017

Sheet 5 solutions. August 15, 2017 Sheet 5 solutions August 15, 2017 Exercise 1: Sampling Implement three functions in Python which generate samples of a normal distribution N (µ, σ 2 ). The input parameters of these functions should be

More information

Lecture 20/Lab 21: Systems of Nonlinear ODEs

Lecture 20/Lab 21: Systems of Nonlinear ODEs Lecture 20/Lab 21: Systems of Nonlinear ODEs MAR514 Geoffrey Cowles Department of Fisheries Oceanography School for Marine Science and Technology University of Massachusetts-Dartmouth Coupled ODEs: Species

More information

Lecture 2. Introduction to Differential Equations. Roman Kitsela. October 1, Roman Kitsela Lecture 2 October 1, / 25

Lecture 2. Introduction to Differential Equations. Roman Kitsela. October 1, Roman Kitsela Lecture 2 October 1, / 25 Lecture 2 Introduction to Differential Equations Roman Kitsela October 1, 2018 Roman Kitsela Lecture 2 October 1, 2018 1 / 25 Quick announcements URL for the class website: http://www.math.ucsd.edu/~rkitsela/20d/

More information

STABILITY. Phase portraits and local stability

STABILITY. Phase portraits and local stability MAS271 Methods for differential equations Dr. R. Jain STABILITY Phase portraits and local stability We are interested in system of ordinary differential equations of the form ẋ = f(x, y), ẏ = g(x, y),

More information

Math 308, Sections 301, 302, Summer 2008 Review before Test I 06/09/2008

Math 308, Sections 301, 302, Summer 2008 Review before Test I 06/09/2008 Math 308, Sections 301, 302, Summer 2008 Review before Test I 06/09/2008 Chapter 1. Introduction Section 1.1 Background Definition Equation that contains some derivatives of an unknown function is called

More information

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers Chapter 9b: Numerical Methods for Calculus and Differential Equations Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers Acceleration Initial-Value Problems Consider a skydiver

More information

Chapter 14 Periodic Motion

Chapter 14 Periodic Motion Chapter 14 Periodic Motion 1 Describing Oscillation First, we want to describe the kinematical and dynamical quantities associated with Simple Harmonic Motion (SHM), for example, x, v x, a x, and F x.

More information

Lecture XXVI. Morris Swartz Dept. of Physics and Astronomy Johns Hopkins University November 5, 2003

Lecture XXVI. Morris Swartz Dept. of Physics and Astronomy Johns Hopkins University November 5, 2003 Lecture XXVI Morris Swartz Dept. of Physics and Astronomy Johns Hopins University morris@jhu.edu November 5, 2003 Lecture XXVI: Oscillations Oscillations are periodic motions. There are many examples of

More information

Homework 2 Computational Chemistry (CBE 60553)

Homework 2 Computational Chemistry (CBE 60553) Homework 2 Computational Chemistry (CBE 60553) Prof. William F. Schneider Due: 1 Lectures 1-2: Review of quantum mechanics An electron is trapped in a one-dimensional box described by

More information

Weight Change and Predator-Prey Models

Weight Change and Predator-Prey Models Lab 2 Weight Change and Predator-Prey Models Lab Objective: We use IVP methods to study two dynamical systems. The first system is a weight change model based on thermodynamics and kinematics. The second

More information

Lecture I Introduction, concept of solutions, application

Lecture I Introduction, concept of solutions, application S. Ghorai Lecture I Introduction, concept of solutions, application Definition. A differential equation (DE) is a relation that contains a finite set of functions and their derivatives with respect to

More information

Problem Set 1 solutions

Problem Set 1 solutions University of Alabama Department of Physics and Astronomy PH 301 / LeClair Fall 2018 Problem Set 1 solutions 1. If a(t), b(t), and c(t) are functions of t, verify the following results: ( d [a (b c)] =

More information

Algorithms for Uncertainty Quantification

Algorithms for Uncertainty Quantification Technische Universität München SS 2017 Lehrstuhl für Informatik V Dr. Tobias Neckel M. Sc. Ionuț Farcaș April 26, 2017 Algorithms for Uncertainty Quantification Tutorial 1: Python overview In this worksheet,

More information

Tutorial-1, MA 108 (Linear Algebra)

Tutorial-1, MA 108 (Linear Algebra) Tutorial-1, MA 108 (Linear Algebra) 1. Verify that the function is a solution of the differential equation on some interval, for any choice of the arbitrary constants appearing in the function. (a) y =

More information

Pursuit Curves. Molly Severdia May 16, 2008

Pursuit Curves. Molly Severdia May 16, 2008 Pursuit Curves Molly Severdia May 16, 2008 Abstract This paper will discuss the differential equations which describe curves of pure pursuit, in which the pursuer s velocity vector is always pointing directly

More information

Lecture Notes for PHY 405 Classical Mechanics

Lecture Notes for PHY 405 Classical Mechanics Lecture Notes for PHY 45 Classical Mechanics From Thorton & Marion s Classical Mechanics Prepared by Dr. Joseph M. Hahn Saint Mary s University Department of Astronomy & Physics October 11, 25 Chapter

More information

{ } is an asymptotic sequence.

{ } is an asymptotic sequence. AMS B Perturbation Methods Lecture 3 Copyright by Hongyun Wang, UCSC Recap Iterative method for finding asymptotic series requirement on the iteration formula to make it work Singular perturbation use

More information

Here we consider soliton solutions of the Korteweg-de Vries (KdV) equation. This equation is given by u t + u u x + 3 u

Here we consider soliton solutions of the Korteweg-de Vries (KdV) equation. This equation is given by u t + u u x + 3 u Lab 3 Solitons Lab Objective: We study traveling wave solutions of the Korteweg-de Vries (KdV) equation, using a pseudospectral discretization in space and a Runge-Kutta integration scheme in time. Here

More information

MA 102 Mathematics II Lecture Feb, 2015

MA 102 Mathematics II Lecture Feb, 2015 MA 102 Mathematics II Lecture 1 20 Feb, 2015 Differential Equations An equation containing derivatives is called a differential equation. The origin of differential equations Many of the laws of nature

More information

Lecture for Week 6 (Secs ) Derivative Miscellany I

Lecture for Week 6 (Secs ) Derivative Miscellany I Lecture for Week 6 (Secs. 3.6 9) Derivative Miscellany I 1 Implicit differentiation We want to answer questions like this: 1. What is the derivative of tan 1 x? 2. What is dy dx if x 3 + y 3 + xy 2 + x

More information

Do not turn over until you are told to do so by the Invigilator.

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 2012 2013 MECHANICS AND MODELLING MTH-1C32 Time allowed: 2 Hours Attempt QUESTIONS 1 AND 2 and THREE other questions. Notes are

More information

Physics 351, Spring 2017, Homework #2. Due at start of class, Friday, January 27, 2017

Physics 351, Spring 2017, Homework #2. Due at start of class, Friday, January 27, 2017 Physics 351, Spring 2017, Homework #2. Due at start of class, Friday, January 27, 2017 Course info is at positron.hep.upenn.edu/p351 When you finish this homework, remember to visit the feedback page at

More information

Applications of Integration to Physics and Engineering

Applications of Integration to Physics and Engineering Applications of Integration to Physics and Engineering MATH 211, Calculus II J Robert Buchanan Department of Mathematics Spring 2018 Mass and Weight mass: quantity of matter (units: kg or g (metric) or

More information

Systems of Ordinary Differential Equations

Systems of Ordinary Differential Equations Systems of Ordinary Differential Equations MATH 365 Ordinary Differential Equations J Robert Buchanan Department of Mathematics Fall 2018 Objectives Many physical problems involve a number of separate

More information

strings, dictionaries, and files

strings, dictionaries, and files strings, dictionaries, and files 1 Polynomials in Several Variables representing and storing polynomials polynomials in dictionaries and in files 2 Two Modules in Python the module randpoly the module

More information

CS 237 Fall 2018, Homework 07 Solution

CS 237 Fall 2018, Homework 07 Solution CS 237 Fall 2018, Homework 07 Solution Due date: Thursday November 1st at 11:59 pm (10% off if up to 24 hours late) via Gradescope General Instructions Please complete this notebook by filling in solutions

More information

Least squares and Eigenvalues

Least squares and Eigenvalues Lab 1 Least squares and Eigenvalues Lab Objective: Use least squares to fit curves to data and use QR decomposition to find eigenvalues. Least Squares A linear system Ax = b is overdetermined if it has

More information

Experiment 9: Compound Pendulum

Experiment 9: Compound Pendulum COMSATS nstitute of nformation Technology, slamabad Campus PHYS - 108 Experiment 9: Compound Pendulum A compound pendulum (also known as a physical pendulum) consists of a rigid body oscillating about

More information

MA 137 Calculus 1 with Life Science Applications The Chain Rule and Higher Derivatives (Section 4.4)

MA 137 Calculus 1 with Life Science Applications The Chain Rule and Higher Derivatives (Section 4.4) MA 137 Calculus 1 with Life Science Applications and (Section 4.4) Alberto Corso alberto.corso@uky.edu Department of Mathematics University of Kentucky March 2, 2016 1/15 Theorem Rules of Differentiation

More information

Particles and Cylindrical Polar Coordinates

Particles and Cylindrical Polar Coordinates Chapter 2 Particles and Cylindrical Polar Coordinates TOPICS Here, we discuss the cylindrical polar coordinate system and how it is used in particle mechanics. This coordinate system and its associated

More information

Math 116 Practice for Exam 2

Math 116 Practice for Exam 2 Math 116 Practice for Exam 2 Generated October 27, 2015 Name: SOLUTIONS Instructor: Section Number: 1. This exam has 6 questions. Note that the problems are not of equal difficulty, so you may want to

More information

Old Math 330 Exams. David M. McClendon. Department of Mathematics Ferris State University

Old Math 330 Exams. David M. McClendon. Department of Mathematics Ferris State University Old Math 330 Exams David M. McClendon Department of Mathematics Ferris State University Last updated to include exams from Fall 07 Contents Contents General information about these exams 3 Exams from Fall

More information

UNIVERSITETET I OSLO

UNIVERSITETET I OSLO (Continued on page 2.) UNIVERSITETET I OSLO Det matematisk-naturvitenskapelige fakultet Examination in: INF1100 Introduction to programming with scientific applications Day of examination: Tuesday, December

More information

Ordinary Differential Equations (ODEs) Background. Video 17

Ordinary Differential Equations (ODEs) Background. Video 17 Ordinary Differential Equations (ODEs) Background Video 17 Daniel J. Bodony Department of Aerospace Engineering University of Illinois at Urbana-Champaign In this video you will learn... 1 What ODEs are

More information

HOMEWORK 3 MA1132: ADVANCED CALCULUS, HILARY 2017

HOMEWORK 3 MA1132: ADVANCED CALCULUS, HILARY 2017 HOMEWORK MA112: ADVANCED CALCULUS, HILARY 2017 (1) A particle moves along a curve in R with position function given by r(t) = (e t, t 2 + 1, t). Find the velocity v(t), the acceleration a(t), the speed

More information

Introduction to Differential Equations

Introduction to Differential Equations Chapter 1 Introduction to Differential Equations 1.1 Basic Terminology Most of the phenomena studied in the sciences and engineering involve processes that change with time. For example, it is well known

More information

Volumes of Solids of Revolution Lecture #6 a

Volumes of Solids of Revolution Lecture #6 a Volumes of Solids of Revolution Lecture #6 a Sphereoid Parabaloid Hyperboloid Whateveroid Volumes Calculating 3-D Space an Object Occupies Take a cross-sectional slice. Compute the area of the slice. Multiply

More information

Oscillations. Phys101 Lectures 28, 29. Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum

Oscillations. Phys101 Lectures 28, 29. Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum Phys101 Lectures 8, 9 Oscillations Key points: Simple Harmonic Motion (SHM) SHM Related to Uniform Circular Motion The Simple Pendulum Ref: 11-1,,3,4. Page 1 Oscillations of a Spring If an object oscillates

More information

Numerical Methods for the Solution of Differential Equations

Numerical Methods for the Solution of Differential Equations Numerical Methods for the Solution of Differential Equations Markus Grasmair Vienna, winter term 2011 2012 Analytical Solutions of Ordinary Differential Equations 1. Find the general solution of the differential

More information

Differential Equations (Math 217) Practice Midterm 1

Differential Equations (Math 217) Practice Midterm 1 Differential Equations (Math 217) Practice Midterm 1 September 20, 2016 No calculators, notes, or other resources are allowed. There are 14 multiple-choice questions, worth 5 points each, and two hand-graded

More information

Assignments VIII and IX, PHYS 301 (Classical Mechanics) Spring 2014 Due 3/21/14 at start of class

Assignments VIII and IX, PHYS 301 (Classical Mechanics) Spring 2014 Due 3/21/14 at start of class Assignments VIII and IX, PHYS 301 (Classical Mechanics) Spring 2014 Due 3/21/14 at start of class Homeworks VIII and IX both center on Lagrangian mechanics and involve many of the same skills. Therefore,

More information

Chaotic Motion of the Double Pendulum

Chaotic Motion of the Double Pendulum MEGL 2016 - Mathematical Art and 3D Printing George Mason University: College of Science December 16, 2016 Table of Contents 1 The Mathematics 2 Inspiration for the Model Planning the Construction of the

More information

Lorenz Equations. Lab 1. The Lorenz System

Lorenz Equations. Lab 1. The Lorenz System Lab 1 Lorenz Equations Chaos: When the present determines the future, but the approximate present does not approximately determine the future. Edward Lorenz Lab Objective: Investigate the behavior of a

More information

Chapter 14. Oscillations. Oscillations Introductory Terminology Simple Harmonic Motion:

Chapter 14. Oscillations. Oscillations Introductory Terminology Simple Harmonic Motion: Chapter 14 Oscillations Oscillations Introductory Terminology Simple Harmonic Motion: Kinematics Energy Examples of Simple Harmonic Oscillators Damped and Forced Oscillations. Resonance. Periodic Motion

More information

Welcome back to Physics 215. Review gravity Oscillations Simple harmonic motion

Welcome back to Physics 215. Review gravity Oscillations Simple harmonic motion Welcome back to Physics 215 Review gravity Oscillations Simple harmonic motion Physics 215 Spring 2018 Lecture 14-1 1 Final Exam: Friday May 4 th 5:15-7:15pm Exam will be 2 hours long Have an exam buddy

More information

An Introduction to Bessel Functions

An Introduction to Bessel Functions An Introduction to R. C. Trinity University Partial Differential Equations Lecture 17 Bessel s equation Given p 0, the ordinary differential equation x 2 y + xy + (x 2 p 2 )y = 0, x > 0 is known as Bessel

More information

Practice Final Exam Solutions

Practice Final Exam Solutions Important Notice: To prepare for the final exam, one should study the past exams and practice midterms (and homeworks, quizzes, and worksheets), not just this practice final. A topic not being on the practice

More information

Solving systems of first order equations with ode Systems of first order differential equations.

Solving systems of first order equations with ode Systems of first order differential equations. A M S 20 MA TLA B NO T E S U C S C Solving systems of first order equations with ode45 c 2015, Yonatan Katznelson The M A T L A B numerical solver, ode45 is designed to work with first order differential

More information

Math 461 Homework 8. Paul Hacking. November 27, 2018

Math 461 Homework 8. Paul Hacking. November 27, 2018 Math 461 Homework 8 Paul Hacking November 27, 2018 (1) Let S 2 = {(x, y, z) x 2 + y 2 + z 2 = 1} R 3 be the sphere with center the origin and radius 1. Let N = (0, 0, 1) S 2 be the north pole. Let F :

More information

Differential Equations: Homework 2

Differential Equations: Homework 2 Differential Equations: Homework Alvin Lin January 08 - May 08 Section.3 Exercise The direction field for provided x 0. dx = 4x y is shown. Verify that the straight lines y = ±x are solution curves, y

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Swaroop Nandan Bora swaroop@iitg.ernet.in Department of Mathematics Indian Institute of Technology Guwahati Guwahati-781039 A first-order differential equation is an equation

More information

Name: SOLUTIONS Date: 11/9/2017. M20550 Calculus III Tutorial Worksheet 8

Name: SOLUTIONS Date: 11/9/2017. M20550 Calculus III Tutorial Worksheet 8 Name: SOLUTIONS Date: /9/7 M55 alculus III Tutorial Worksheet 8. ompute R da where R is the region bounded by x + xy + y 8 using the change of variables given by x u + v and y v. Solution: We know R is

More information

Problem 1. Mathematics of rotations

Problem 1. Mathematics of rotations Problem 1. Mathematics of rotations (a) Show by algebraic means (i.e. no pictures) that the relationship between ω and is: φ, ψ, θ Feel free to use computer algebra. ω X = φ sin θ sin ψ + θ cos ψ (1) ω

More information

Math 461 Homework 8 Paul Hacking November 27, 2018

Math 461 Homework 8 Paul Hacking November 27, 2018 (1) Let Math 461 Homework 8 Paul Hacking November 27, 2018 S 2 = {(x, y, z) x 2 +y 2 +z 2 = 1} R 3 be the sphere with center the origin and radius 1. Let N = (0, 0, 1) S 2 be the north pole. Let F : S

More information

SMA 208: Ordinary differential equations I

SMA 208: Ordinary differential equations I SMA 208: Ordinary differential equations I First Order differential equations Lecturer: Dr. Philip Ngare (Contacts: pngare@uonbi.ac.ke, Tue 12-2 PM) School of Mathematics, University of Nairobi Feb 26,

More information

Computers, Lies and the Fishing Season

Computers, Lies and the Fishing Season 1/47 Computers, Lies and the Fishing Season Liz Arnold May 21, 23 Introduction Computers, lies and the fishing season takes a look at computer software programs. As mathematicians, we depend on computers

More information

Solving Systems of ODEs in Python: From scalar to TOV. MP 10/2011

Solving Systems of ODEs in Python: From scalar to TOV. MP 10/2011 Solving Systems of ODEs in Python: From scalar to TOV. MP 10/2011 Homework: Integrate a scalar ODE in python y (t) =f(t, y) = 5ty 2 +5/t 1/t 2 y(1) = 1 Integrate the ODE using using the explicit Euler

More information

Motion in Two or Three Dimensions

Motion in Two or Three Dimensions Chapter 3 Motion in Two or Three Dimensions PowerPoint Lectures for University Physics, Thirteenth Edition Hugh D. Young and Roger A. Freedman Lectures by Wayne Anderson Goals for Chapter 3 To use vectors

More information

The Principle of Least Action

The Principle of Least Action The Principle of Least Action In their never-ending search for general principles, from which various laws of Physics could be derived, physicists, and most notably theoretical physicists, have often made

More information

0.1 Diffeomorphisms. 0.2 The differential

0.1 Diffeomorphisms. 0.2 The differential Lectures 6 and 7, October 10 and 12 Easy fact: An open subset of a differentiable manifold is a differentiable manifold of the same dimension the ambient space differentiable structure induces a differentiable

More information

Practice Midterm 1 Solutions Written by Victoria Kala July 10, 2017

Practice Midterm 1 Solutions Written by Victoria Kala July 10, 2017 Practice Midterm 1 Solutions Written by Victoria Kala July 10, 2017 1. Use the slope field plotter link in Gauchospace to check your solution. 2. (a) Not linear because of the y 2 sin x term (b) Not linear

More information

n-dimensional LCE code

n-dimensional LCE code n-dimensional LCE code Dale L Peterson Department of Mechanical and Aeronautical Engineering University of California, Davis dlpeterson@ucdavisedu June 10, 2007 Abstract The Lyapunov characteristic exponents

More information

Department of Aerospace Engineering AE602 Mathematics for Aerospace Engineers Assignment No. 6

Department of Aerospace Engineering AE602 Mathematics for Aerospace Engineers Assignment No. 6 Department of Aerospace Engineering AE Mathematics for Aerospace Engineers Assignment No.. Find the best least squares solution x to x, x 5. What error E is minimized? heck that the error vector ( x, 5

More information

Separable Differential Equations

Separable Differential Equations Separable Differential Equations MATH 6 Calculus I J. Robert Buchanan Department of Mathematics Fall 207 Background We have previously solved differential equations of the forms: y (t) = k y(t) (exponential

More information

Chapter 11 Vibrations and Waves

Chapter 11 Vibrations and Waves Chapter 11 Vibrations and Waves If an object vibrates or oscillates back and forth over the same path, each cycle taking the same amount of time, the motion is called periodic. The mass and spring system

More information

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod) 28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod) θ + ω 2 sin θ = 0. Indicate the stable equilibrium points as well as the unstable equilibrium points.

More information

First Order Systems of Linear Equations. or ODEs of Arbitrary Order

First Order Systems of Linear Equations. or ODEs of Arbitrary Order First Order Systems of Linear Equations or ODEs of Arbitrary Order Systems of Equations Relate Quantities Examples Predator-Prey Relationships r 0 = r (100 f) f 0 = f (r 50) (Lokta-Volterra Model) Systems

More information

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C. Lecture 9 Approximations of Laplace s Equation, Finite Element Method Mathématiques appliquées (MATH54-1) B. Dewals, C. Geuzaine V1.2 23/11/218 1 Learning objectives of this lecture Apply the finite difference

More information