Package: Loose Leaf For Numerical Methods For Engineers With 1 Semester Connect Access Card
Package: Loose Leaf For Numerical Methods For Engineers With 1 Semester Connect Access Card
7th Edition
ISBN: 9781259289163
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Chapter 23, Problem 1P

Compute forward and backward difference approximations of O ( h ) and O ( h 2 ) , and central difference approximations of O ( h 4 ) for the first derivative of y = cos x at x = π / 4 using a value of h = π / 12 . Estimate the true percent relative error ε t for each approximation.

Expert Solution & Answer
Check Mark
To determine

To calculate: The forward and backward difference approximations of O(h) and O(h2), and central difference approximations of O(h2) and O(h4) for the first derivative of y=cosx at x=π4 using a value of h=π12. Also find the true percent error ε, for each approximation.

Answer to Problem 1P

Solution:

Forward difference approximation of O(h) is 0.79108963 with true percent error ε=11.877%

Forward difference approximation of O(h2) is 0.72601275 with true percent error ε=2.674%

Backward difference approximation of O(h) is 0.60702442 with true percent error ε=14.154%

Backward difference approximation of O(h2) is 0.71974088 with true percent error ε=1.787%

Central difference approximation of O(h2) is 0.69905703 with true percent error ε=1.138%

Central difference approximation of O(h4) is 0.70699696 with true percent error ε=0.016%

Explanation of Solution

Given information:

Function, y=cosx

Step size, h=π12

The initial value of x, x=π4

Formula used:

Forward difference approximation of O(h) is,

f(xi)=f(xi+1)f(xi)h

Forward difference approximation of O(h2) is,

f(xi)=f(xi+2)+4f(xi+1)3f(xi)2h

Backward difference approximation of O(h) is,

f(xi)=f(xi)f(xi1)h

Backward difference approximation of O(h2) is,

f(xi)=3f(xi)4f(xi1)+f(xi2)2h

Central difference approximation of O(h2) is,

f(xi)=f(xi+1)f(xi1)2h

Central difference approximation of O(h4) is,

f(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

xi+1=xi+h Here i=0,1,2,...

True percent relative error is,

ε=(exact value  numerical valueexact value)×100

Calculation:

Consider the function,

f(x)=cosx

First derivation of the function is,

f(x)=sinx

Thus, the true value of the first derivative of y=cosx at x=π4 is,

f(π4)=sin(π4)=0.70710678

The value of xi2 is,

xi2=xi2h=π42(π12)=π12=0.261799388

The value of the function at xi2=0.261799388 is,

f(0.261799388)=cos(0.261799388)=0.965925826

The value of xi1 is,

xi1=xih=π4(π12)=0.523598776

The value of the function at xi1=0.523598776 is,

f(0.523598776)=cos(0.523598776)=0.866025404

The value of xi is,

xi=π4=0.785398163

The value of the function at xi=0.785398163 is,

f(0.785398163)=cos(0.785398163)=0.707106781

The value of xi+1 is,

xi+1=xi+h=π4+π12=1.047197551

The value of the function at xi+1=1.047197551 is,

f(1.047197551)=cos(1.047197551)=0.5

The value of xi+2 is,

xi+2=xi+2h=π4+2(π12)=1.308996936

The value of the function at xi+2=1.308996936 is,

f(1.308996936)=cos(1.308996936)=0.258819045

Forward difference approximation of O(h) is,

f(xi)=f(xi+1)f(xi)h

For y=cosx forward difference approximation is,

f(xi)=0.50.707106781(π12)=0.2071067810.261799388=0.79108963

True percent error is,

ε=(exact value  numerical valueexact value)×100=((0.70710678)(0.79108963)(0.70710678))×100=11.877%

Forward difference approximation of O(h2) is,

f(xi)=f(xi+2)+4f(xi+1)3f(xi)2h

For y=cosx forward difference approximation is,

f(xi)=0.258819045+4(0.5)3(0.707106781)2(π12)=0.380139388(π6)=0.72601275

True percent error is,

ε=(exact value  numerical valueexact value)×100=((0.70710678)(0.72601275)(0.70710678))×100=2.674%

Backward difference approximation of O(h) is,

f(xi)=f(xi)f(xi1)h

For y=cosx backward difference approximation is,

f(xi)=0.7071067810.866025404(π12)=0.158916230.261799388=0.60702442

True percent error is,

ε=(exact value  numerical valueexact value)×100=((0.70710678)(0.60702442)(0.70710678))×100=14.154%

Backward difference approximation of O(h2) is,

f(xi)=3f(xi)4f(xi1)+f(xi2)2h

For y=cosx backward difference approximation is,

f(xi)=3(0.707106781)4(0.866025404)+0.9659258262(π12)=0.376855447(π6)=0.71974088

True percent error is,

ε=(exact value  numerical valueexact value)×100=((0.70710678)(0.71974088)(0.70710678))×100=1.787%

Central difference approximation of O(h2) is,

f(xi)=f(xi+1)f(xi1)2h

For y=cosx central difference approximation is,

f(xi)=0.50.8660254042(π12)=0.366025404(π6)=0.69905703

True percent error is,

ε=(exact value  numerical valueexact value)×100=((0.70710678)(0.69905703)(0.70710678))×100=1.138%

Central difference approximation of O(h4) is,

f(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

For y=cosx central difference approximation is,

f(xi)=(0.258819045)+8(0.5)8(0.866025404)+0.96592582612(π12)=2.221096451π=0.70699696

True percent error is,

ε=(exact value  numerical valueexact value)×100=((0.70710678)(0.70699696)(0.70710678))×100=0.016%

Therefore, Forward difference approximation of O(h) is 0.79108963 with true percent error ε=11.877%

Forward difference approximation of O(h2) is 0.72601275 with true percent error ε=2.674%

Backward difference approximation of O(h) is 0.60702442 with true percent error ε=14.154%

Backward difference approximation of O(h2) is 0.71974088 with true percent error ε=1.787%

Central difference approximation of O(h2) is 0.69905703 with true percent error ε=1.138%

Central difference approximation of O(h4) is 0.70699696 with true percent error ε=0.016%

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!

Chapter 23 Solutions

Package: Loose Leaf For Numerical Methods For Engineers With 1 Semester Connect Access Card

Knowledge Booster
Advanced Math
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
  • Advanced Engineering Mathematics
    Advanced Math
    ISBN:9780470458365
    Author:Erwin Kreyszig
    Publisher:Wiley, John & Sons, Incorporated
    Numerical Methods for Engineers
    Advanced Math
    ISBN:9780073397924
    Author:Steven C. Chapra Dr., Raymond P. Canale
    Publisher:McGraw-Hill Education
    Introductory Mathematics for Engineering Applicat...
    Advanced Math
    ISBN:9781118141809
    Author:Nathan Klingbeil
    Publisher:WILEY
  • Mathematics For Machine Technology
    Advanced Math
    ISBN:9781337798310
    Author:Peterson, John.
    Publisher:Cengage Learning,
    Basic Technical Mathematics
    Advanced Math
    ISBN:9780134437705
    Author:Washington
    Publisher:PEARSON
    Topology
    Advanced Math
    ISBN:9780134689517
    Author:Munkres, James R.
    Publisher:Pearson,
  • Advanced Engineering Mathematics
    Advanced Math
    ISBN:9780470458365
    Author:Erwin Kreyszig
    Publisher:Wiley, John & Sons, Incorporated
    Numerical Methods for Engineers
    Advanced Math
    ISBN:9780073397924
    Author:Steven C. Chapra Dr., Raymond P. Canale
    Publisher:McGraw-Hill Education
    Introductory Mathematics for Engineering Applicat...
    Advanced Math
    ISBN:9781118141809
    Author:Nathan Klingbeil
    Publisher:WILEY
    Mathematics For Machine Technology
    Advanced Math
    ISBN:9781337798310
    Author:Peterson, John.
    Publisher:Cengage Learning,
    Basic Technical Mathematics
    Advanced Math
    ISBN:9780134437705
    Author:Washington
    Publisher:PEARSON
    Topology
    Advanced Math
    ISBN:9780134689517
    Author:Munkres, James R.
    Publisher:Pearson,
    Finding Local Maxima and Minima by Differentiation; Author: Professor Dave Explains;https://www.youtube.com/watch?v=pvLj1s7SOtk;License: Standard YouTube License, CC-BY