0% found this document useful (0 votes)
91 views20 pages

Differentiation Corrected

Uploaded by

XYNC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
91 views20 pages

Differentiation Corrected

Uploaded by

XYNC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 20
wv Numerical Differentiation and Integrati aa aa ena 3 Numerical Differentiation Introduction ical differentation i 7 Numerical differentation is the process of computing the value of 4. oy for some particular value of x from the given data (x,,y;), 1=1,2,...” ones es fois not known explicitly. The interpolation formula to be used depends on the particular value of x at which the derivatives are required. If the values of x are not equally spaced, we represent the function by Newton’s divided difference formula and the derivatives are obtained. If the values of x are equally spaced, the derivatives are calculated by using Newton's forward or backward interpolation formula. If the derivatives are required at a point near the beginning of the table, we use Newton’s forward interpolation formula and if the derivatives are required at a point near the end of the table, we use Newton’s backward interpolation formula. Derivatives Using Divided Differences Principle a First fit a polynomial for the given data using Newton’s divided differenc interpolation formula and compute the derivatives for a given x. Example 1 Find (5) and /“(5) using the following data x 0 2 3 4 7 9 f(x): 4 26 58 112 466 922 Solution Since the v: ence formula. Divided Difference Table A, - Divided Difference Operator. alues of x are not equally spaced, we shall use Newton’s divide g Mf, ; f AS | ars 0 4 11 2 26 7 32 3 58 11 54 4 112 16 118 7 466 22 228 9 922 1 From the above table, L(%) = 4, F (4%) = 1, F (%,%),%))=7 and f (%95%,2)%5)=1 Further x, =0,x, =2,x, =3,%,=4,x, 5 7,45 =9 By Newton’s divided difference interpolation formula L() = S(%) + (8 9) f (X91) + (X= x9) - AF (%9%11%) HX =A Mx-H)X-H) SoA mA)te | = S()=4+ x11) + x(e~2)7 + x(r-2K—3)0) S441 1x4 7x? - 14x43? 5x? 46x S (= 42x? 43x44 Differentiating (1) w.r.to x, F(x) = 3x? +4x43 and S"(x) = 6x44 Put x=5, /"(5)=98 and "(5)=34. a) numerical Differentiation ang Integratio, =e gration le 2 exam Pe Sie /"Q5) and f*(4) Compute "G-5) and f"(4) given that S(0)=2; =2,f()=3,4(2)=12 and f(s) = golution ; : Lf (5) =147. pivided Difference Table f a a it 7 0 2 | As ay 1 1 3 i , 1 2 12 9 45 5 147 Newton’s divided difference formula is S()= Fo) + = %0)F (oH) +X — Mp M(X= HIF (Xoo oq) #(— Xp N(X = H(X= A) J (954.4754) +o Here x) =0,x, = 1%) =2 SF (%) =2.F Com) =F Hook 1%) =4 and f (59,4 %,%) =1 2 f(x) = 2+ x(l) + x(a 14+ x(x-e-2)0) fer txr x42 2 fe) = 3x7 +2x-1 and f"(x) = 6x +2 => f'(3.5) = 42.75 and f"(4) = 26. | Example 3 Find the value of 7G) using divided differences, given the data x 0 1 4 5 f(x): 8 ul 68 123 Solution x | f@ [as [ais [ae | | | | o| 8 ol 1-[aal 19 1 4 | 68 9 55 5 123 NUS A , Se, 3.4 difference interpolation formula is = rg lt A)S or) yar vo) fg ed Newton's divided fid= S00 A(x aX AEE a) Fort) Foe Here 204 24% F(x) =8 Form) = 3 fi) = Aand f(%%1%%)=1 From, f(x) =8+4G)4 20> 1dr a(x DE 4) Ay t x - 5x" 2 44x fx) =8 43x44 efQjer-¥ 4 3x48 ce f(a) = 3x? = 2x43 and f"(x) = 6x-2 2. f'Q)=18-2=16. Derivatives Using Finite Differences Newton's Forward Difference Formula to Compute the Derivati Consider Newton’s forward difference formula, ™ y=y_+ payy ee <)>, , pe=Wp-2) ot PAH oA Et a eee ) . The first derivative of y at x =x) + ph is dy 4 ip de dp ke La 2, eBay .2pal ary, 3p? “ “A a 2 aty, AES? gy, BPP OPE HNP} al Apt. 12 Not ay Al Iso de -Ale Yo +(p-NA* yy 22 =Itptly Vo toe The above two formulas x=2) + ph near the begi are used to find th: i beginnii \e first ani 8 particular, for tabular ee of a given data ae second derivative at a pot ee) x is not a tabular vabe numerical Differentiation and Integrati a ion [Also we have 4 @y A) ay, eens Jos, yy SP dL? S | and in particular at x = x dy 1 3 ay) slay 3a (2) Blears] newton’s Backward Difference Formula to Compute the Derivativ Consider Newton’s Backward interpolation formula, ° yay, + PV, ADD: yy + PPA +2) 5 — ! 3L h d 2 dy _dy dp iy @y dy 2 (2) de dp de de dx where P= dp? 3p +6p+2 2p +9p* SPF yy 2p sept P jp +lip+3 » 6 Va Viy, tL) : ze, span, LAMPE, vo] @ @y Alga, ,Wp+is Further Sr" Gs[V «tay V5, + @ Formulas (1), (2) and (3) are used to calculate the derivati DEY na TY op v ay dy used to calculate the eS a? we apoint x= x, + ph near the end of the given data, where x is not a tabular value, For tabular values, in particular at x =x, , We have dy) _1 vy, Vn Vide (Z) a ~Y§ The maximum or minimum value of the function y =S(x) ca found from the set of table values (x;,¥;),4=0,1,2,..0, First we find p using the relation ? 2 2p-ly2, 3p = OPt2 a3, 9 AY 58 ‘Yo + A N'Y Using this value of p, the value of x at which y is Maximum o- minimum is obtained as x= x, + ph. Then using Newton’, interpolation formula, the maximum or minimum value Of the function y = f (x) is then determined. Example 4 Find the first and second derivative of y at x =15 from the table below. x 15 17 19 21 23 25 Y! 3.873 4.123 4359 4.583 4.796 5.000 Solution Forward Difference Table x y ay | ay | ay [aty [asy 15 |B.873 0.259) 17 | 4.123 0.014 0.236 0.003] 19 | 4.359 -0.012 0.007 0.224 0.001 21 | 4.583 -0.011 0.001 0.213 0.002 23 | 4.796 -0.009 0.204 25 | 5.000 From the above table, Avy = 0.25054? y, =-0.014;A*y, = 0.00244 Yo =—0.001;A* yp = 0.002 From the tabular values, we have Here h=2 dy 1 0.014 (2) = F}o.2504 2.014 , 0.002 | 0.00 (2), { 1 ee 2002) 34S = 0.1250 40,0035 40,0003 4 0.000125 4 0.0002 1 01291 @yt 1 ; f= =—|-0.014~ — S fa i 1 0,002 4 1g 60-001) ~ §0.002)] 1 = ~ [0.0144 0.002 40.0009 + 0.0017] 0.0046 example 5 Find the first two derivatives of y at x = 54 from the following data 1 50) ST SR SSK y: 3.6840 3.7084 3.7325. 3.7563 3.7798 Solution Difference Table Xx y vy vey | vy | vty 50 | 3.6840 0.0244 51 | 3.7084 -0.0003 0.0241 0 52. | 3.7325 -0,0003 a 0.0238 a 53 | 3.7563 0.0003 54 | B.7798) By Newton’s backward difference formula , 2). gy =—| Vy, + Here fi=1;Vy, = 0.0235;V7), = ~0.0003 (2) : Nate dasa = 0.02335 4 __ Numerical Mey 3.8 : : natty: Example 6 Find the first and second derivatives ‘of the function tabulated below, ay * vel Sandxe4 x 1S 2.0 2.5 3.0 3.5 4.0 yi 3.375 7,000 13.625 24.000 38.875 59.000 Solution Difference Table x y Ay | aty | a’y | dty Ts | 3.375 3.625 2.0 | 7.000 3.000 6.625 0.75 2.5 | 13.625 3.750 0 10.375 0.75 3.0 | 24.000 4,500 0 14.875 0.75 3.5 | 38.875 5.250 20.125 4.0 | 39.000 Since x=1,5 isa tabular value near the beginning of the given data, the derivative, are given by » (2) tama @ (2). From (2), (2) ail =——[3.000- 4 Janis 0.25 0.75) = 9.000 yy numerical Differentiation and Integration 3.9 qhe value x=4 is at the end of the data, For the tabular values at the end of the data, (2), aS dx) gros, AL" and ay 2 (1... 7 “7 Vt Vy +O0y,4 *) - ra 5.250 | 0.750 2 20.125 + eo (z aired 0.5 “20°°3 - “6 dy 1 (= = Jpg 5250+ 0.75] = 24 stat Example 7 Find first and second derivatives of the function at the point =1.2 from the following data. x1 2 3 4 5 yO) 1 5 6 8 Solution Difference Table x [7 | ay | ay | avy | ty 1 | 0 1 2miel 3 4 6 7 3 10 1 4 4/6 1 2 5 [8 We shall use Newton's forward formula to compute the derivaatives since x=1,2 is at the beginning. ic 3 e ical Meth, os 3.10 eee Sie = xy + phy we ha For non-tabular value x =o +P ly 3p 6p t2 sy, % 1) ay, 022 A eee ile 2 2p’ -9P +MIP~3 n4y 2 Here x) =1,'=1 and x= 1.2 h % 5 p=0.2 1 \ 2143fo4-1]-1(0.12-1 2+2)+55[0.016-036+22-35. a )yea2 2 =1-0.9-0.92-0.953 =-1773 (2) =3+(02-1)-6)+ Z[6(0.04)-18(02)+11]00) ax atxel.2 =3+48+6.366 =14.17 Example 8 Find /"(x) andf"(x) at.x=2.9 from the following data, 7 1 2 as 3 Yi 271 106.75 324 783.75 1621 Solution Difference Table 2] Te Ta Tals Tear, 79.5 1S.) lass 1375 21725 1s ale 2425 Fa 459.75 ny 25 | 783.25 ay 3 | fay Bg | Numerical Differentiation a - a Nd Integrat; egration 3.11 For non-tabular value x= x, + ph the deivatiy y es are git a Nyy .2rtlon ap? given by Gehl nt i HP HOP 42D, 6 Vn ‘ 12 V+ 1 oly, ; mee [ Ye #(D+DV'y, SP BPE yy 12 Vat eves ere |X, =3,x=29,p= 2 Here = 3%=29,p=“— > pao 4 1 06 » =| 837.5+—| 3(0.2)? - (0.2) ( . 2 775) 09 022035) 4 L2(0.2)* + 9(0.04) -11(0.2) +3 co = 1936.68 ® soos tao2i- 1) 2 ey =a) 0.813: ay 025 5 + (0.8)135 + (30) ; de = 2018.4 Example 9 Find the value of sec31° using the following data xv: MO 32 3300234 tanx: 0.6008 0.6249 0.6494 0.6745 Soluti olution o. If y=tanx, then ha First we find sec’ 31’. Difference table | 3.12 Numerical umerical “Mathoas Here h=1) ie, b= 0.01745 radians By Newton’s forward interpolation formula, dy 1 a =—| Avy -- I, . i ‘» oy 1 ! 1 [@) 0.0241-4(0.0004) + + (0.0002 * (¢ i aaa (0.0004) +5 ( | 1 01745 ©. sec? 31° = 1.3732 => sec31° =1.1718 Example 10 From the following table, find x, correct to two decimal places, for which y sma; mum and find this value of y. i x: 12 1.3 1.4 15 1.6 ¥! 0.9320 0.9636 0.9855 0.9975 0.9996 Solution Difference Table [0.023967] x |» ay | ay 1.2 | 0.9320 0.0316 13 | 0.9636 -0.0097 0.0219 1.4 | 0.9855 -0.0099 0.0120 15 | 0.9975 -0.0099 0.0021 16 | 0.9996 Let x) =1.2. Then (@).- 2p-1 2, | 3p°-6, pt+2 2 A Y0 $y tae numerical Differentiation and Integration For maximum, =, 0.0316+ as (0.0097) =0 = p=38 Hence x=%) + ph=> x =1.2+(3.8)(0.1) :. y is maximum when x=1.58. For this value of x=.x, + ph , by Newton’s backward difference formula, y(x, + Ph)= Iq + PV, PED ory, ten x-xX, where p= => p=-0.2 2. y(1.58) = 0.9996 — (0.2)(0.0021) + 07108) (0.0099) = 0.9996 - 0.0004 + 0.0008 =1 Maximum value of y=. Example 11 Find the minimum value of y from the following table using num« x: 0.60 0.65 0.70 0.75 y: 0.6221 0.6155 0.6138 0.6170 Solution erical differentatic Difference Table x y ay | ary | a’y 0.60 | 0.6221 -0.0066 0.65 | 0.6155 0.0049 -0.0017 0 0.70 | 0.6138 0.0049 0.0032 0,75 | 0.6170 . #20 For minimum, 7, 2p=l pry, =0 2 yt Yo . 9955+ 22=# 0.0049) =0 = p=1.8469 S re ay + ph > x= 0.6923 ; Hence y is minimum when x = 0.692. -1 pe ) a2y, Minimum value of Y= Yo * PAY) + 1.846 = 0.6221 - (0.0066)(1.8469) + OOH) 0045) => Minimum y = 0.6137. Example 12 ‘Arod is rotating in a plane. The angle @ (in radians) through which the od baste for various values of time ¢ (seconds) are given below t: 0 0.2 04 06 0.8 1.0 1.2 6: 0 0.122 0.493 1.123 2.022 3.220 4.666 Find the angular velocity and angular acceleration of the rod when f= 0.6 seuss Solution Difference Table f a ve |ve lvoe |] ve Oo; 0 0.122 0.2 | 0.122 0.249 0.371 0.010 0.4 | 0.493, 0.259 0 0.630 0.010 0.6 | 1.123 0.269 0 0.899 0.010 0.8 | 2.022 Co an 1.0 | 3.200 0.009 12 h.66q cy By Newton's backward difference formula 3, 15 numerical Differentiation ang jn, ©Gratio, in (*) 1 re dpa dx. =—| Vy, +2241, 3, Ae) r4pn hh 7 “3 Y y, +P! +6p 42 ¢ Vy, 12 Vv Pt #) 1 [ 5 | =—/1.466-2 (0.288) 1 1 c aan 2 +5 005)-“-o00n| = 5[1.466-0.72 +.0.0165 +0.00025] = 3.81375 radians/sec. ® 2 ( :] =f] Pn sonny, AEs .] ft x=x,+ph = —_{o.288 — 0.018 - 0.0009] 0.04 = 6.7275 radians/sec* B12 NUMERICAL METHOp, $ Solution : v is dependent on time ¢ Gie.) » = ¥ (0). We require acceleration = * at 0. For initial acceleration (ie.,) # at ¢ = 0 we use forward formula of Newton. (¢| =} [an- farms farny—fatns..| Ip ded 1 = i/3-= = ——(2 33-7 +369 -724)] 1 = $13-4+ 2-6] ei -16 =1 6. Find the maximum and minimum value of y tabulated below. weRICAL DIFFERENTIATION AND INTEGRATION U 313 jution ¢ Netwon's forward difference formula is Solt u(u 1) 2, u(u-1) = 2) 3 y@* fot eds + Da or Not] au? - ou +2 get ome BeDory Matty de Forward difference table -0 ee Choosing xy = 0,4 = > 3. 24227 -6 2-642 jy) , Ar —18e +22 - 8 6 #2 oss ONay det oA Gl a& il” 2 = + 22-6 eats? {2a BRS = 025+ Day mcrae a -15 3 P-45e +55 25+ 45° -% = 0.25 + 25x - 1 NUMERICAL METH, s 3.14 wy _ p-x de | Now # = 02 p-x=0 | x@-1 =0 | x=0x-1=0 x = 0,@-1) @+1) = 0 x=0x=1x%=-1 ay _4P-1 ac At x = 0, 2 14, Sp og-1-2= +e fy 3-1=2 x= -l, =3-1=2= +ve ac y is maximum at x = 0, minimum at x = 1 and -1 -1 y() = protean eM ary + ..] y(0) = (0+ 0 =0 maximum value = 0 IC) = [ot Ayo t0+0+...] [0+ (0.25) ] = -0.25 * Minimum at x = 1, y(1) = ~025, jynenticat Dre favvnnnnn cuted nnedanienenny valine av Fett Ute Fel teeneteege , Rind the thax’ table. | v i d 1 1 7 y 0 1 0 i 7 = ) 4 . solution + Here h = | Newton's forward differenee formula is (uN) 2 ' ! [vv en dye t Oy D a2 yy 4 Ee i WDA yy du’ — We? + 22 = 6) +o 7 = 2A yy 4 1@) = » Gta ND A2yy4 (cu “ ' 2) Aryy i ~ Fy 4 2 =O Ady a | AY >! ’ (4? = 8 Forward Difference Table Ay NUMERICAL, METHODs, 3.16 . ead. 2 Choosing the origin at xp = 0" = = * 2 dy (2u =) (0,50) 4 GLa Ht? y 3 & = 025+ (05 ) 6 3 2 4u3 — 18u? + 22 — 6 oP ue ie 24 x6 = 4u3 — 12u? + Bu Now & = 0 > 43-120? + 8u = 0 de > du(u—2)(u-1) = 0 24.=0,42 #y _ ye Also 5 = 12u" — 24u + 8 ae & Atu = 0,22 = 8 which is positive. we p & Atu = 1, 2% = —4 which is negative. Atu = 2, i = 8 which is positive. + y is maximum at uw = 1 and minimum at u = 0 and 2. +. The maximum value y at wu = 1 [(ie.) x = 1] is v0) = yy u@u-1) =)u- ) = Yo 4+ Ary, + Hu De 2 395 = 041(0.25)+0 = 0.25 Minimum at x = L *=0 and x=2 are y (0) = 0,y (2) = 0 respectively.

You might also like