### Create a StudySoup account

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

Already have a StudySoup account? Login here

# MATH542 MATH542

SDSU

GPA 3.72

### View Full Document

## 43

## 0

## Popular in Course

## Popular in Mathematics (M)

This 8 page Class Notes was uploaded by Burnice Ratke on Tuesday October 20, 2015. The Class Notes belongs to MATH542 at San Diego State University taught by P.Blomgren in Fall. Since its upload, it has received 43 views. For similar materials see /class/225268/math542-san-diego-state-university in Mathematics (M) at San Diego State University.

## Popular in Mathematics (M)

## Reviews for MATH542

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

Numerical Solutions to Differential Equations Lecture Notes 17 BVP The Shooting Method continued Peter Blomgren ltblomgrenpeter gmail comgt Department of Mathematics and Statistics Dynamlcal Systems roup Computational Science Raearch Center San Diego State University San Diego CA 921827720 httpterminussdsuedu Spring 2009 BVP The Shooting Method continued Quick Recap Boundary Value Problems 7 129 Outline 0 Introduction 0 Recap 0 Rough Roadmap for This Lecture and Beyond 6 Shooting for Systems of ODEs 0 Convert BVP w NP 0 Taylor Expanding 0 Additional ODEs for the Sensitivity Functions 0 The Final Formulation 9 Alternative quotPurelyquot Numerical Shooting 0 The Idea 0 Example Euler Bernoulli Beam Deflection BVP The Shooting Method continued 7 229 Today s Lecture Last time 9 Physical motivation for boundary value problems bending beams constructing bridges and buildings cooling fins keeping those processors running 9 The shooting method convert a BVP into a sequence of lVPs and apply techniques from the first half of the semester 9 Variational approach add ODEs for the sensitivity variables 9 Finite difference approach approximate the sensitivity by differences of the results of different initial guesses BVP The Shooting Method continued m 329 0 Theory 0 Generalize shooting methods to larger systems n simultaneous ODEs 9 Example 0 Shooting for a 4th order ODE Beam Bending o Other Approaches a Finite Difference Methods next time BVP The Shooting Method continued 7 429 Generalizing Shooting to Systems of ODEs Given a system of simultaneous ODEs k dimensional Initial Guesses We want to find k initial guesses MM 7 f1X7y17y27 7YH y la V l 1727 39 39 k V2X Xy Y17YZ7 J n so that the solution to the initial value problem X 6 a7 b X fX YlX 1X7Y17YZ7w7yn y 7 n 7Y17YZ77n yQX f2X717277n X 6 a7 b With boundary conditions y X 1 Xv17y 7y ybyquot i12k quot quot yia yiay k 17 k 27 t t t 7 n with initial conditions a Y 12 k In order to convert this to an initial value problem we have to ylEa 7 7 7 k771 k7 2 n replace the first k terminal conditions with k guessed initial y T y 7 T 7 7quot COHditions m Satisfies the terminal conditions yb yib7 i 17 27 7 k m BVP The Shooting Method continued 7 529 BVP The Shooting Method continued 7 629 k dimensional Discrepancy Functions Taylor Expanding and Truncating 0 Let V Yb 327 39 t t 7 YkT be the vector of guessed initial We Taylor expand and throw out terms of order 2 2 just as in values the Taylor derivation of Newton39s Method Math 541 k 0 Let ybY7 I 1727 7 k be the terminal values 0 M A hi Z 7 17277k 0 Define h yb 7 yib7 i 1727 7k be the 11 1 discrepancy functions measuring how far off the computed We end up with the following k X k system of equations terminal solutions are from the desired values of the terminal ahl ahl ahl conditions AY1 AYz AYk 7h1Y 8h2 8h2 8h2 0 We are now looking for a correction AY to the guesses Y so 7 Ayl 7 Ayz 7 AYk 7h2Y that the corrected initial conditions lead to a solution with 6Y1 6Y2 yk hY AY O 39 39 39 39 39 6h 6h 6h 0 We use our favorite mathematical tool the Taylor Ayl AYZ m Ayk ihkw Expan5ion to get an equation for the correction m 0Y1 6Y2 6W 535 BVP The Shooting Method continued 7 729 BVP The Shooting Method continued 7 329 A Little Bit of Matrix Notation Computing the Entries of the Jacobian at X b a Let A AY1AY2 0 Let h1 h2 hkT be the vector of discrepancy functions 0 Let the matrix J7 b be the matrix the Jacobian with entries 3h JI39J xb 0 Then the equation for the update becomes A 7 1011171 no AYltT be the vector of updates The entries of the Jacobian are the partial derivatives of the discrepancy functions with respect to the guessed initial values computed at the terminal point As in the one constraint problem we looked at last time we have to derive additional ODEs to get equations for the needed values We differentiate the ODEs we already have with respect to the guessed initial values apply the chain rule and the fact that we can switch the order of differentiation we get ii eii yii n 37539 3Y1 dX 3Y1 k1 3 3V wherei12nandj12k 539 m BVP The Shooting Method continued 7 929 BVP The Shooting Method continued 7 1029 Equations for the Sensitivity Functions lll Equations for the Sensitivity Functions llll We define the sensitivity functions The initial conditions for the sensitivity functions are 3 i 37139 1 f gij7 ay 7 llj 7 7 J J gU7 O ifiij 1712n7 1712k and get the following set of n gtlt k ODEs This makes sense since at X a there is no mixing of the guessed lues dgij n 3f I va dXZ7 1727quot397n7 11727 7k oyiaEYil2kand k1 oyiayIaik1k2n m 5393 BVP The Shooting Method continued 7 1129 BVP The Shooting Method continued 7 1229 Putting the Pieces Together Now we solve the following lVP consisting of n n gtlt k simultaneous ODEs III Putting the Pieces Together At the terminal point X b we compute the discrepancy functions yX 1 1X7y17y27 7yn and the entries of the Jacobian J7j gigb Y2X f2X7y17y277yn lf VAX fnl717276F J n gt tolerance g0 Zk1gkj6739k 712n 112 k or other stopping criteria then we update the guess with initial conditions ya Y 739 12 k you ws Jam b 1 50m y7a ny ik17k277n 1 if 39 j I and start over go 0 if1 117277n7 11727 7k J m m BVP The Shooting Method continued 7 1329 BVP The Shooting Method continued 7 1429 Comments The Numerical Alternative 0 We started with n ODEs o lfWhen the price is too high we can compute numerical difference a roximations of the terminal values of the o The equations for the sensitivity functions added n gtlt k PP ODES senSItIVIty unctions I 0 Let Y e61j7 6217 7619 ie the vector of all zeros except 0 That can be a high price to pay If n 1000 and k 500 a the value 5 in the jth position Very reasonably Sized Pr0blem7 thequot the eXtended 5y5tem has 0 If we solve the initial value problem for the two initial guesses 5017000 equat390quot5l Y and Y Y we can compute the difference approximations o The ood news The ODEs and initial conditions for the g ah not w 7 mm additional equations are very easy to write down 7 m J 1 2 H k ayj Xib E 7 7 7 7 af 7 gig Z gag 397 i 1727 7 n7 j 1727 k Letj 127 7 k gives us approximations to all entries of the k1 yk Jacobian gala 6 1 m o The price Solving the system of n ODEs k 1 times 5353 BVP The Shooting Method continued 7 1529 BVP The Shooting Method continued 7 1629 Example Shooting for the Euler Bernoulli Beam Equation Transverse deflection of a beam WX subject to distributed load PX d2 d2 E Exlxl px Here we will assume a uniform beam ie EX and IX are constant For simplicity EXIX 1 We39ll let the beam have length L 1 and be fixed at the end Shooting for Beam Bending Equations Our problem is 04 xiL22 e ampywz dX4 Subject to wo wo w1 wl o We introduce y df 139 1727374 and get the following system of ODEs oints like a book shelf P l l n W m0 We use a non uniform load function i yg i y3 y20 O xiL22 dX ys T ll ma O pX e Us 4 e new y21 0 539 m BVP The Shooting Method continued 7 1729 BVP The Shooting Method continued 7 1329 Shooting for Beam Bending lVP Code RKF45 Shooting for Beam Bending lV 394 Example Shooting for a uniform fixed Beam 394 394 EX Constant IO Constant 394 Octave Code wwwoctaveorg We are gomg to solve the followmg lVP clear all 394 Length of the Beam y1 y2 y10 O globiil L 1 Y2 i y3 y20 O 39 7 Y4 7 7 dX ys Xei 2 2 y3g T I 4 Shooting with RKF 45 2 y4 6 US y4 394 The Load Function function p px and numerically determine the parameters A and B so that the global L terminal conditions O and engfi l XL2XL2L8L8i 394 The Forcing Function of the System of ODEs function rhska45 rhska45xw rhsrkf45 w24 px m endfunction m BVP The Shooting Method continued 7 1929 BVP The Shooting Method continued 7 2029 Code RKF45 Shooting for Beam Bending IIV Code RKF45 Shooting for Beam Bending IIIV function yxvi RKF45ltyOxOL YNEXt Yquot hb1k c e 0 14 38 1213 1 12 yErr hEk A 0000001000003329320000 A A 19322197 772002197 72962197 0 0 0 yErrAbs 39 n myErri A A 439216 8 3680513 7845 4104 if yErrAbs lt TUL A 7827 2 7 442565 18594104 71140 0 y y yNext b1 25216 0 14082565 21974104 71 5 0 b2 16135 0 665612825 2856156430 7950 255 Yquot YNEXtv E 1360 0 71284275 7219775240 150 255 xv xv xh 3 0 Asia x xh e2 Y 1 YO Y 1 YO XV x0 x 1 x0 if yErrAbs20 lt TUL wh11exltL h h2 f h L printf 1ncreasing the step size to hfn h d Y en k zeroS 6 else k1 rthkf45lt xhc1 yNhltA1kJ h 112 k2 r 51kt45lt mince yNhA2 m 4 4 4 4 k3 rhajkf45 xhc3 NhA3Ygtky Aprint Reducing the step size to hiifn h k4 rhajkf45 xhc4 yNhltAlt4kJ gt en k5 rthkf45lt xhc5 yNhA5kY d k6 rthkf45lt minds yiimltAlt6gtk endfunction m m BVP The Shooting Method continued 7 2129 BVP The Shooting Method continued 7 2229 Code RKF45 Shooting for Beam Bending IVV Code RKF45 Shooting for Beam Bending VV 394 Initial initial Values wO O O O 0 Err 2 01 wBO wO wBO4 wBO4 Perturb yxv RKF45WB00L while Err gt Ylperturbml yY Y 4i 1 1 th yxv RKF45ltWOOL W ma ylt eng x10 Ymonperturbed y J11 Ylw3iinal1 Ympiinal1 Perturb Ympjinal y 1engthxv J12 Yw4jinal1 Ympjinal1 Perturb w1discr y11engthxv J21 Ylw3iinal2 Ympiinal2 Perturb w2discr y21engthxv J22 Yw4jinal2 Ympjinal2 Perturb Err normW1discr W2discr Ja J11 J12 J21 J22 y 394 Skip out of the loop when tolerance is met w034 w034 JaW1discr W2discr if Err lt tol break end end wAO wO wAO3 wAO3 Perturb yxv RKF45ltonoL Yperturbw3 y Yw3final y lengthxv 5351 5353 BVP The Shooting Method continued 7 2329 BVP The Shooting Method continued 7 2429 Beam Bending Numerical Results Beam Bending Numerical Results The Displacement Iteration Discrepancy i i i i i 1 0029003 7 7 2 17206e 11 00005 7 08 0001 7 0677 4quot 00015 7 7 0277 7 7 41002 i i i i i i i i i 02 04 06 08 FIGURE 1 The distributed load m FIGURE 2 The displacement due to the load WX y1x m BVP The Shooting Method continued 7 2529 BVP The Shooting Method continued 7 2629 Beam Bending Numerical Results WX Beam Bending Numerical Results Curvature W X 0004 i i i i i i i i 002 0002 001 0002 0 02 0004 i i i i i i i i i i i i i 02 04 06 08 1 02 04 ols 08 FIGURE 3 w x y2X nu FIGURE 4 w x y3x m BVP The Shooting Method continued 7 2729 BVP The Shooting Method continued 7 2829 Beam Bending Numerical Results WWX 02 02 x x x n x n 02 04 05 08 FIGURE 5 w x y4x ms BVP The Shooting Method continued 7 2929

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

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

#### "I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

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