Math 104A - Homework 2



Similar documents
CS 261 Fall 2011 Solutions to Assignment #4

5.1 Derivatives and Graphs

Homework # 3 Solutions

Solutions to Homework 10

x a x 2 (1 + x 2 ) n.

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88

The Mean Value Theorem

The Method of Partial Fractions Math 121 Calculus II Spring 2015

Calculus 1: Sample Questions, Final Exam, Solutions

Intermediate Value Theorem, Rolle s Theorem and Mean Value Theorem

correct-choice plot f(x) and draw an approximate tangent line at x = a and use geometry to estimate its slope comment The choices were:

Section 3.7. Rolle s Theorem and the Mean Value Theorem. Difference Equations to Differential Equations

Mark Howell Gonzaga High School, Washington, D.C.

Taylor and Maclaurin Series

MATH 381 HOMEWORK 2 SOLUTIONS

Math Numerical Analysis Homework #2 Solutions

LIMITS AND CONTINUITY

SOLUTIONS. f x = 6x 2 6xy 24x, f y = 3x 2 6y. To find the critical points, we solve

PRACTICE FINAL. Problem 1. Find the dimensions of the isosceles triangle with largest area that can be inscribed in a circle of radius 10cm.

Solutions for Review Problems

Math 241, Exam 1 Information.

The Derivative. Philippe B. Laval Kennesaw State University

y cos 3 x dx y cos 2 x cos x dx y 1 sin 2 x cos x dx y 1 u 2 du u 1 3u 3 C

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

TOPIC 4: DERIVATIVES

Section 4.4. Using the Fundamental Theorem. Difference Equations to Differential Equations

Solutions of Equations in One Variable. Fixed-Point Iteration II

4.3 Lagrange Approximation

G.A. Pavliotis. Department of Mathematics. Imperial College London

Continuity. DEFINITION 1: A function f is continuous at a number a if. lim

1 if 1 x 0 1 if 0 x 1

Lies My Calculator and Computer Told Me

MATH 425, PRACTICE FINAL EXAM SOLUTIONS.

Lectures 5-6: Taylor Series

Section 2.7 One-to-One Functions and Their Inverses

I. Pointwise convergence

Representation of functions as power series

Differentiation of vectors

1. (from Stewart, page 586) Solve the initial value problem.

MATH 132: CALCULUS II SYLLABUS

ALGEBRA 2/TRIGONOMETRY

2.2 Separable Equations

Sequences and Series

APPLIED MATHEMATICS ADVANCED LEVEL

Calculus AB 2014 Scoring Guidelines

Math 265 (Butler) Practice Midterm II B (Solutions)

AP Calculus AB 2011 Scoring Guidelines

CITY UNIVERSITY LONDON. BEng Degree in Computer Systems Engineering Part II BSc Degree in Computer Systems Engineering Part III PART 2 EXAMINATION

LABORATORY 10 TIME AVERAGES, RMS VALUES AND THE BRIDGE RECTIFIER. Bridge Rectifier

The Heat Equation. Lectures INF2320 p. 1/88

Lecture 13 - Basic Number Theory.

1 Error in Euler s Method

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

Calculus with Parametric Curves

1.1 Practice Worksheet

Merton College Maths for Physics Prelims October 10, 2005 MT I. Calculus. { y(x + δx) y(x)

Core Maths C3. Revision Notes

ALGEBRA 2/TRIGONOMETRY

x 2 y 2 +3xy ] = d dx dx [10y] dy dx = 2xy2 +3y

The continuous and discrete Fourier transforms

Notes and questions to aid A-level Mathematics revision

AP Calculus AB 2011 Free-Response Questions

a cos x + b sin x = R cos(x α)

SOLVING TRIGONOMETRIC INEQUALITIES (CONCEPT, METHODS, AND STEPS) By Nghi H. Nguyen

Math Placement Test Practice Problems

Math , Fall 2012: HW 1 Solutions

Series FOURIER SERIES. Graham S McDonald. A self-contained Tutorial Module for learning the technique of Fourier series analysis

Friday, January 29, :15 a.m. to 12:15 p.m., only

Solutions to Homework 5

Rolle s Theorem. q( x) = 1

LIES MY CALCULATOR AND COMPUTER TOLD ME

Practice with Proofs

1 Norms and Vector Spaces

Math 120 Final Exam Practice Problems, Form: A

L 2 : x = s + 1, y = s, z = 4s Suppose that C has coordinates (x, y, z). Then from the vector equality AC = BD, one has

1. Then f has a relative maximum at x = c if f(c) f(x) for all values of x in some

Techniques of Integration

Oscillations. Vern Lindberg. June 10, 2010

4.5 Chebyshev Polynomials

2008 AP Calculus AB Multiple Choice Exam

FIRST YEAR CALCULUS. Chapter 7 CONTINUITY. It is a parabola, and we can draw this parabola without lifting our pencil from the paper.

Core Maths C2. Revision Notes

v v ax v a x a v a v = = = Since F = ma, it follows that a = F/m. The mass of the arrow is unchanged, and ( )

Fundamental Theorems of Vector Calculus

y cos 3 x dx y cos 2 x cos x dx y 1 sin 2 x cos x dx

Example of the Glicko-2 system

Mark Howell Gonzaga High School, Washington, D.C.

Version hij. General Certificate of Education. Mathematics MPC1 Pure Core 1. Mark Scheme examination - January series

WORKBOOK. MATH 30. PRE-CALCULUS MATHEMATICS.

Math 115 Spring 2011 Written Homework 5 Solutions

Chapter 11. Techniques of Integration

Homework #1 Solutions

The Steepest Descent Algorithm for Unconstrained Optimization and a Bisection Line-search Method

Solutions to Exercises, Section 5.1

ALGEBRA 2/TRIGONOMETRY

An important theme in this book is to give constructive definitions of mathematical objects. Thus, for instance, if you needed to evaluate.

6 Further differentiation and integration techniques

Electrical Resonance

t := maxγ ν subject to ν {0,1,2,...} and f(x c +γ ν d) f(x c )+cγ ν f (x c ;d).

Transcription:

Math 04A - Homework Due 6/0 Section. -, 7a, 7d, Section. - 6, 8, 0 Section. - 5, 8, 4 Section. - 5,..a Use three-digit chopping arithmetic to compute the sum 0 i= first by i + + +, and then by + + +. Which method is more 4 00 00 8 accurate, and why? Using three-digit chopping arithmetic, + 4 + 9 + + 00 while 00 + 8 + 64 + + = ( ((.00 + 0.50) + 0.) + ) + 0.000) =.5, = ( ((0.000+0.0)+0.056)+ )+.00) =.54. The actual value is.5498. The first sum is less accurate because the smaller numbers are added last, resulting in significant round-off error...b Write an algorithm (pseudocode) to sum the finite series N i= x i in reverse order. (Here, the input is N, x,..., x N, and the output is the sum). INPUT: N, x,..., x N OUTPUT: N i= x i Step : Set i = N, s = 0. Step : While i > 0 do Steps -4 Step : Set s = s + /i. Step 4: Set i = i. Step 5: OUTPUT s...7a Find the rate of convergence of lim h 0 sin h h = (Hint: use Taylor series). sin(h) h = h h 6 cos(ξ) h = h 6 sin(ξ) = O(h )...7b Find the rate of convergence of lim h 0 e h h =. e h h + = h h eξ h + = h eξ = O(h).

.. Construct an algorithm (pseudocode) that has as input an integer n, numbers x 0, x,..., x n, and a number x that produces as output the product (x x 0 )(x x ) (x x n ). INPUT: n, x 0,..., x n, x. OUTPUT: n i=0 (x x i). Step : Set i = 0, p =. Step : While i n do Steps -4 Step : Set p = p (x x i ). Step 4: Set i = i +. Step 5: OUTPUT p...6 Use the Bisection method to find solutions accurate to within 0 5 for the following problems: a x e x = 0, x [, ]. >> bisection_method( *x-exp(x),,,000,0^-5).58666999 b x + cos x e x = 0, x [0, ]. >> bisection_method( x+*cos(x)-exp(x),0,,000,0^-5) 0.976768496544 c x 4x + 4 ln x = 0, x [, ] and x [, 4]. >> bisection_method( x^-4*x+4-log(x),,,000,0^-5).4966597656 >> bisection_method( x^-4*x+4-log(x),,4,000,0^-5).0570608066406 d x + sin(πx) = 0, x [0, 0.5] and x [0.5, ]. >> bisection_method( x+-*sin(pi*x),0,0.5,000,0^-5) 0.0607996406 >> bisection_method( x+-*sin(pi*x),0.5,,000,0^-5) 0.68968688964844

..8a Sketch the graphs of y = x and y = tan x. 0 8 6 4 0 x tan(x) 0 4 6 8 0..8b Use the bisection method to find an approximation to within 0 5 to the first positive value of x with x = tan x. From the sketch, we see that the first positive fixed-point occurs somewhere between 4 and 5. >> bisection_method( x-tan(x),4,5,000,0^-5) 4.49458595..0 A particle starts at rest on a smooth inclined plane whose angle θ is changing at a constant rate dθ = ω < 0. At the of t seconds, the position of the dt object is given by x(t) = g ( ) e ωt e ωt sin(ωt). ω Suppose the particle has moved.7 ft in s. Find, to within 0 5, the rate ω at which θ changes. Assume that g =.7 ft/s. Substituting the appropriate values, we find ω by finding the root of f(x) =.7 ( ) e x e x sin(x).7. x >> bisection_method( -.7/(*x^)*((exp(x)-exp(-x))/... -sin(x))-.7,-,-0.,000,0^-5) -0.70555474609

..5 Use a fixed-point iteration method to determine a solution accurate to within 0 for x 4 x = 0 on [, ]. Use p 0 =. After first rearranging the equation to get (x + ) /4 = x, we use attached code (fixed_point_method.m) to get >> fixed_point_method( (*x^+)^(/4),,000,0^-) Took 6 iterations..94699898677..8 Use theorem. to show that g(x) = x has a unique fixed point on [, ]. Use fixed-point iteration to find an approximation to the fixed point accurate to within 0 4. Use corollary.4 to estimate the number of iterations required to achieve 0 4 accuracy, and compare this theoretical estimate to the number actually needed. Since g is decreasing, we know that max g(x) = g( ) 0.7970056 <, min g(x) = g() = 0.5 >, and so g(x) [, ]. Since g (x) = x ln() is negative and increasing, we know that g (x) g ( ) 0.55058 = k <. Then g satisfies the conditions of theorem., and so g has a unique fixed point on the interval [, ]. Using the attached code (fixed_point_method.m), we get >> p = 0.6485744504985984; >> abs(p-fixed_point_method( ^(-x),/,7)).95777565947e-04 >> abs(p-fixed_point_method( ^(-x),/,8)) 8.67877988e-05 so 8 iterations are necessary to be within 0 4 of the true fixed point p = 0.6485744504986. By corollary.4, p n p kn, and so k n 0 4 ln(k n ) ln( 0 4 ) n ln( 0 4 ) ln(k).5747058. 4

..4 Use a fixed-point iteration method to determine a solution accurate to within 0 4 for x = tan x, for x [4, 5]. + x and using the at- Rearranging the equation so that g(x) = tan(x) x tached code (fixed_point_method.m), we get >> fixed_point_method( /tan(x)-/x+x,4.5,000,0^-4) Took iterations. 4.49409457997..5 Use Newton s method to find solutions accurate to within 0 4 for the following problems: a x x 5 = 0, x [, 4]. Using the attached code (newtons_method.m), we get >> newtons_method( x^-*x^-5, *x^-4*x,.5,000,0^-4) Took 4 iterations.6906474480865 b x + x = 0, x [, ]. Using the attached code (newtons_method.m), we get >> newtons_method( x^+*x^-, *x^+6*x,-.5,000,0^-4) Took 5 iterations -.879854578 c x cos x = 0, x [0, π/]. Using the attached code (newtons_method.m), we get >> newtons_method( x-cos(x), +sin(x),pi/4,000,0^-4) Took iterations 0.7908556 d x 0.8 0. sin x = 0, x [0, π/]. Using the attached code (newtons_method.m), we get >> newtons_method( x-0.8-0.*sin(x), -0.*cos(x),pi/4,000,0^-4) Took iterations 0.9648876957 5

.. Player A will shut out (win by a score of -0) player B in a game of raquetball with probability P = + p ( p ), p + p where p is the probability that A will win any specific rally (indepent of the server). Determine, to within 0, the minimal value of p that will ensure that A will shut out B in at least half the matches they play. From a sketch of the graph, we see that p is close to 0.8, so we use the bisection method (bisection_method.m) with an initial interval [0.7, 0.9] ( ) with function f(x) = +x x x+x 0.5: >> bisection_method( (+x)/*(x/(-x+x^))^-0.5,... 0.7,0.9,000,0^-4) 0.84968750000000 6

Code %%% bisection_method.m %%% function p = bisection_method(fstring,a,b,n,tol) i=; f = inline(fstring); FA = f(a); while ( i <= N ) p = (a+b)/; FP = f(p); if( FP == 0 (b-a)/ < TOL ) return; if( FA*FP > 0 ) a = p; FA = FP; else b = p; i = i+; %%% of bisection_method.m %%% %%% fixed_point_method.m %%% function p = fixed_point_method(fstring,p0,n,tol) i = ; f = inline(fstring); while i < N p = f(p0); if( nargin == 4 && abs(p-p0) < TOL ) 7

fprintf( Took %i iterations.,i); return; p0 = p; i = i+; %%% of fixed_point_method.m %%% %%% newtons_method.m %%% function p = newtons_method(fstring,fpstring,p0,n,tol) i = ; f = inline(fstring); fp = inline(fpstring); while( i <= N ) p = p0-f(p0)/fp(p0); if( abs(p-p0) < TOL ) fprintf( Took %i iterations,i); return; i = i+; p0=p; %%% newtons_method.m %%% 8