03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CONTENTS<br />

v<br />

8 Integrals and Quadrature 95<br />

8.1 The Definite Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

8.1.1 Upper and Lower Sums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

8.1.2 Approximating the Integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

8.1.3 Simple and Composite Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

8.2 Trapezoidal Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

8.2.1 How Good is the Composite Trapezoidal Rule? . . . . . . . . . . . . . . . . . 99<br />

8.2.2 Using the Error Bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101<br />

8.3 Romberg Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102<br />

8.3.1 Recursive Trapezoidal Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104<br />

8.4 Gaussian Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

8.4.1 Determining Weights (Lagrange Polynomial Method) . . . . . . . . . . . . . . 105<br />

8.4.2 Determining Weights (Method of Undetermined Coefficients) . . . . . . . . . 106<br />

8.4.3 Gaussian Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />

8.4.4 Determining Gaussian Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . 108<br />

8.4.5 Reinventing the Wheel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111<br />

9 Least Squares 115<br />

9.1 Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

9.1.1 The Definition of Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

9.1.2 Linear Least Squares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

9.1.3 Least Squares from Basis Functions . . . . . . . . . . . . . . . . . . . . . . . 117<br />

9.2 Orthonormal Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />

9.2.1 Alternatives to Normal Equations . . . . . . . . . . . . . . . . . . . . . . . . 120<br />

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

10 Ordinary Differential Equations 123<br />

1<strong>0.1</strong> Elementary <strong>Methods</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123<br />

1<strong>0.1</strong>.1 Integration and ‘Stepping’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br />

1<strong>0.1</strong>.2 Taylor’s Series <strong>Methods</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br />

1<strong>0.1</strong>.3 Euler’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

1<strong>0.1</strong>.4 Higher Order <strong>Methods</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

1<strong>0.1</strong>.5 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126<br />

1<strong>0.1</strong>.6 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126<br />

1<strong>0.1</strong>.7 Backwards Euler’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />

10.2 Runge-Kutta <strong>Methods</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

10.2.1 Taylor’s Series Redux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132<br />

10.2.2 Deriving the Runge-Kutta <strong>Methods</strong> . . . . . . . . . . . . . . . . . . . . . . . 132<br />

10.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134<br />

10.3 Systems of ODEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134<br />

10.3.1 Larger Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135<br />

10.3.2 Recasting Single ODE <strong>Methods</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . 135<br />

10.3.3 It’s Only Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br />

10.3.4 It’s Only Autonomous Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 138<br />

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!