Session 3. Question Answers

Similar documents
Section 1.3 Integration

Particle Motion. Typically, if a particle is moving along the x-axis at any time, t, x()

First Order ODEs (cont). Modeling with First Order ODEs

Math 210 Differential Equations Mock Final Dec *************************************************************** 1. Initial Value Problems

Antiderivatives. Definition A function, F, is said to be an antiderivative of a function, f, on an interval, I, if. F x f x for all x I.

The Effect of Air Resistance Harvey Gould Physics 127 2/06/07

Physics 1A, Summer 2011, Summer Session 1 Quiz 3, Version A 1

Matlab homework assignments for modeling dynamical systems

Math 307 A - Spring 2015 Final Exam June 10, 2015

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

PHY 221 Lab 3 Vectors and Motion in 1 and 2 Dimensions

Physics 101 Lecture 3 Motion in 1D Dr. Ali ÖVGÜN

Gravitational Energy using Gizmos

1) Explain in complete sentences how to solve the following equation using the factoring method. Y=7x

Experiment 2. F r e e F a l l

MA 102 Mathematics II Lecture Feb, 2015

Free Fall. v gt (Eq. 4) Goals and Introduction

2.2 Average vs. Instantaneous Description

Physics Exam 2 October 11, 2007

Newton s Second Law of Motion Force and Acceleration

a. Determine the sprinter's constant acceleration during the first 2 seconds.

α m ! m or v T v T v T α m mass

AP Physics C: Mechanics Practice (Newton s Laws including friction, resistive forces, and centripetal force).

AdvAlg6.4GraphingQuadratics.notebook. March 07, Newton s Formula h(t) = 1 gt 2 + v o t + h o 2. time. initial upward velocity

It is convenient to think that solutions of differential equations consist of a family of functions (just like indefinite integrals ).

ALGEBRA UNIT 11-GRAPHING QUADRATICS THE GRAPH OF A QUADRATIC FUNCTION (DAY 1)

Chapter 8 ~ Quadratic Functions and Equations In this chapter you will study... You can use these skills...

Find the orthogonal trajectories for the family of curves.

Particle Motion. Typically, if a particle is moving along the x-axis at any time, t, x()

March 5, 2009 Name The problems count as marked. The total number of points available is 131. Throughout this test, show your work.

Multiple Choice Solutions 1. E (2003 AB25) () xt t t t 2. A (2008 AB21/BC21) 3. B (2008 AB7) Using Fundamental Theorem of Calculus: 1

MAT135 Review for Test 4 Dugopolski Sections 7.5, 7.6, 8.1, 8.2, 8.3, 8.4

As in the previous problem, the height of a object thrown straight up is given by

Name: Total Points: Physics 201. Midterm 1

Solution. Your sketch should show both x and y axes marked from 5 to 5 and circles of radius 1, 3, and 5 centered at the origin.

Chapter B - Problems

Solutions of the Sample Problems for the First In-Class Exam Math 246, Fall 2017, Professor David Levermore

MATH 18.01, FALL PROBLEM SET #5 SOLUTIONS (PART II)


Worksheet for Exploration 6.1: An Operational Definition of Work

Mathematics - Course 221

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

Particle Motion Notes Position When an object moves, its position is a function of time. For its position function, we will denote the variable s(t).

Math 308 Exam I Practice Problems

Antiderivatives and Indefinite Integrals

Final Exam Sample Problems, Math 246, Spring 2018

Problem Solving 6: Ampere s Law and Faraday s Law. Part One: Ampere s Law

A. VOCABULARY REVIEWS On the line, write the term that correctly completes each statement. Use each term once.

VELOCITY. If you have a graph of position and you take the derivative, what would the derivative represent? Position. Time

During the second part of the trip then we travelled at 50 km/hr for hour so x = v avg t =

AMS 27L LAB #6 Winter 2009

Chapter 2: 1D Kinematics

Student Exploration: Free-Fall Laboratory

Name Class. (a) (b) (c) 4 t4 3 C

y ax bx c OR 0 then either a = 0 OR b = 0 Steps: 1) if already factored, set each factor in ( ) = 0 and solve

Ms. Peralta s IM3 HW 5.4. HW 5.4 Solving Quadratic Equations. Solve the following exercises. Use factoring and/or the quadratic formula.

Massachusetts Institute of Technology Department of Mechanical Engineering

1) Solve the quadratic equation Y=5x*+3 where *=2 A. x = (Y-3) B. x = (3+Y) C. x = (3+Y) 2 D. x = (Y-3) 2

Midterm α, Physics 1P21/1P91

Solution. It is evaluating the definite integral r 1 + r 4 dr. where you can replace r by any other variable.

Unit 6: Quadratics. Contents

Question Details Secant Formula 1 [ ]

Section , #5. Let Q be the amount of salt in oz in the tank. The scenario can be modeled by a differential equation.

Introduction to the P5 Computing Laboratory. Eric Peasley Department of Engineering Science

34.3. Resisted Motion. Introduction. Prerequisites. Learning Outcomes

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

1. (a) (4 points) Four students see this function: f(t) = 7 4t. Which student has written the derivative correctly? Circle the student s name.

MA 351 Fall 2007 Exam #1 Review Solutions 1

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

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

Question Details Secant Formula 1 [ ]

The Princeton Review AP Calculus BC Practice Test 2

1. Without the use of your calculator, evaluate each of the following quadratic functions for the specified input values. (c) ( )

Q Scheme Marks AOs. 1a States or uses I = F t M1 1.2 TBC. Notes

3 = arccos. A a and b are parallel, B a and b are perpendicular, C a and b are normalized, or D this is always true.

PHY 221 Lab 2. Acceleration and Uniform Motion

9-4. Quadratics and Projectiles. Vocabulary. Equations for the Paths of Projectiles. Activity. Lesson

Trigonometry I. Pythagorean theorem: WEST VIRGINIA UNIVERSITY Physics

These will be no tutorials for Math on Tuesday April 26.

Laplace Transform Problems

Topics for the test and Sample Problems

Experiment 4 Free Fall

AP Physics C: Work, Energy, and Power Practice

PART A CALCULATOR ACTIVE: Maximum Time: 35 Minutes

Chapter 3 Lecture. Pearson Physics. Acceleration and Accelerated Motion. Prepared by Chris Chiaverina Pearson Education, Inc.

Chapter 2. Motion along a Straight Line

AP Calculus. Particle Motion. Student Handout

Displacement, Velocity, and Acceleration AP style

Projectile motion. Objectives. Assessment. Assessment. Equations. Physics terms 5/20/14. Identify examples of projectile motion.

Hour Exam #2 Math 3 Oct. 31, 2012

To study the motion of an object under the influence

MOTION (Chapter 2) Student Learning Objectives 2/11/2016. Compare and contrast terms used to describe motion Analyze circular and parabolic motion

No calculators, cell phones or any other electronic devices can be used on this exam. Clear your desk of everything excepts pens, pencils and erasers.

NO CREDIT DO NOT USE IT

Chapter 5: Limits and Derivatives

Matlab Sheet 3 - Solution. Plotting in Matlab

Question Details Secant Formula 1 [ ]

Motion along a straight line. Physics 11a. 4 Basic Quantities in Kinematics. Motion

APPLICATIONS OF DIFFERENTIATION

One Dimensional Collisions 1 Fall 2018

Transcription:

Session 3 Question Answers Question 1 Enter the example code and test the program. Try changing the step size 0.01 and see if you get a better results. The code for the example %Using Euler's method to solve y'(t) = f(t,y) y(0) = y0 %1. Initialize the values % 1.1 set the initial value of y. y = 1; % 1.2 set the start and end value of t tstart = 0; tend = 1; % 1.3 set the step size (using dt for delta t) dt = 0.1; % 1.4 Initialise vectors to store the data to plot T = tstart:dt:tend; % Vector of values of t. n = length(t); % Find the total number of point Y = zeros(1,n); % Vector to store the values of y. %2. Repeat for each time step for k = 1:n %3. Store the current values for plotting later Y(k) = y; %4. Evaluate the current value of f(t,y) f = -y; %5. User Euler's formula to evaluate y for the next step y = y + dt*f; end %6. End repeat 1

%7. Plot the date plot(t,y,'r') xlabel('t') ylabel('y') grid %Plot the actual result as a comparison Y2 = exp(-t); hold on plot(t,y2,'b'); legend({'euler's Method','Actual value'}) dt = 0.1 dt = 0.01 2

Question 2 (a) Write a program that solves. dy dt = f (t, y) = cos(t) y (0)= y 0 =0 For 0 t 2π with a step size δ t = 0.01 (b) Compare the solution above with the analytic solution. y (t)=sin(t) Hint : To start, copy the previous program. Answer %Using Euler's method to solve y'(t) = f(t,y) y(0) = y0 %1. Initialize the values % 1.1 set the initial value of y. y = 0; % 1.2 set the start and end value of t tstart = 0; tend = 2*pi; % 1.3 set the step size (using dt for delta t) dt = 0.01; % 1.4 Initialise vectors to store the data to plot T = tstart:dt:tend; % Vector of values of t. n = length(t); % Find the total number of point Y = zeros(1,n); % Vector to store the values of y. %2. Repeat for each time step for k = 1:n %3. Store the current values for plotting later Y(k) = y; %4. Evaluate the current value of f(t,y) f = cos(t(k)); %5. User Euler's formula to evaluate y for the next step y = y + dt*f; end %6. End repeat 3

%7. Plot the date plot(t,y,'r') xlabel('t') ylabel('y') grid %Plot the actual result as a comparison Y2 = sin(t); hold on plot(t,y2,'b'); legend({'eulers Method','Actual value'}) 4

Question 3 (a) The velocity of the object dropped from hight is defined by the differential equation dv dt = g c m v2 v(0)=0 Where The acceleration due to gravity g = 9.81 m/s 2 The drag constant c = 0.3 Ns 2 /m 2 The mass m = 80 kg Write a program that uses Euler's method to calculate the velocity of the object. For 0 t 25 with a step size δ t = 0.01 Answer %Using Euler's method to solve V'(t) = g c/m v^2 v(0) = 0 % Model Parameters c = 0.3; % The drag coefficient Nm ^2s^-2 g = 9.81; % Acceleration due to gravity m/s^2 m = 80; % The mass of the object in kg %1. Initialize the values % 1.1 set the initial value of v. v = 0; % 1.2 set the start and end value of t tstart = 0; tend = 25; % 1.3 set the step size (using dt for delta t) dt = 0.01; % 1.4 Initialise vectors to store the data to plot T = tstart:dt:tend; % Vector of values of t. n = length(t); % Find the total number of point V = zeros(1,n); % Vector to store the values of v. 5

%2. Repeat for each time step for k = 1:n %3. Store the current values for plotting later V(k) = v; %4. Evaluate the current value of f(t,v) f = g - c * v.^2 /m; %5. User Euler's formula to evaluate v for the next step v = v + dt*f; end %6. End repeat %7. Plot the date plot(t,v,'r') title('velocity of a dropped object') xlabel('t') ylabel('v') grid 6

(b) Use the data cursor to measure the velocity after 25 seconds. The velocity should approach, but not be greater than the terminal velocity. dv is zero at when v = terminal velocity. dt Calculate the terminal velocity and compare it with v(25). dv dt = g c m v2 = 0 v 2 = m g c v = m g c v = 80 9.81 0.3 = 51.1468 m/s Where v is the terminal velocity. The acceleration due to gravity g = 9.81 m/s 2 The drag constant c = 0.3 Ns 2 /m 2 The mass m = 80 kg On the graph, the data cursor, shows that v(25) = 51.14 m/s 7

Question 4 Use the above top down design to write a program to plot the velocity and hight of the ball. The acceleration is a constant a = -9.81 m/s 2. The initial value of v = 25 m/s. The initial value of y = 0. Plot both v and y in separate graphs on the same figure. Each graph should be labelled. The height should be an inverted parabola. The ball should hit the ground before 6 seconds. Answer %Using Euler,s Method to Plot a Ball Thrown Upwards. %1. Initialize the values % Model Parameters a = -9.81; % Acceleration m/s^2 % 1.1 set the initial value of v and y. v = 25; % The initial velocity m/s y = 0; % The initial height meters % 1.2 set the start and end value of t tstart = 0; tend = 6; % 1.3 set the step size (using dt for delta t) dt = 0.01; % 1.4 Initialise vectors to store the data to plot T = tstart:dt:tend; % Vector of values of t. n = length(t); % Find the total number of point V = zeros(1,n); % Vector to store the values of v. Y = zeros(1,n); % Vector to store the values of y. 8

%2. Repeat for each time step for k = 1:n %3. Store the current values of both y and v for plotting later V(k) = v; Y(k) = y; %4. Use Euler's method to find the position at the next step y = y + dt * v; %5. Use Euler's method to find the velocity at the next step v = v + dt * a; end %6. End of repeat %7. Plot the date % height Graph subplot(2,1,1) plot(t,y,'b') title ('Height') xlabel('t') ylabel('y') grid % Velocity Graph subplot(2,1,2) plot(t,v,'r') title ('Velocity') xlabel('t') ylabel('v') grid %Top Graph % Bottom Graph 9

10