Sine Integral function

 

 

use spreadsheet software (either Microsoft Excel or Google Sheets, please) or Desmos.com to
explore the Sine Integral function
Si(𝑥𝑥) = � sinc(𝑡𝑡)𝑑𝑑𝑑𝑑,
𝑥𝑥
0
where sinc(𝑡𝑡) = �
sin(𝑡𝑡) /𝑡𝑡, 𝑡𝑡 ≠ 0
1, 𝑡𝑡 = 0
.
By using the Midpoint, Trapezoid, and Simpson’s Rules with 𝑛𝑛 = 20, you will approximate the value of Si(5). You will
also use a Taylor Series representation of Si(𝑥𝑥) to approximate Si(5). Answer the questions below (either print this page
or write or type on your own document). You will need to submit your answers as well as your spreadsheet and/or
Desmos graph link. Make sure that your spreadsheet/Desmos graph is very well-organized so that I can look at it to
see how you performed each calculation. If you need help using the technology, see me in office hours, ask your
classmates, see a tutor, or seek tutorials on the internet.
1. Use the Midpoint Rule to approximate Si(5) with 𝑛𝑛 = 20. Write the approximation here with at least 8 digits after
the decimal.
2. Use the Trapezoid Rule to approximate Si(5) with 𝑛𝑛 = 20. Write the approximation here with at least 8 digits after
the decimal.
3. Use Simpson’s Rule to approximate Si(5) with 𝑛𝑛 = 20. Write the approximation here with at least 8 digits after the
decimal.
4. Starting with the Taylor Series representation of sin(𝑥𝑥) at 𝑎𝑎 = 0, find the Taylor Series representation of Si(𝑥𝑥) at
𝑎𝑎 = 0. (Note: This does not require technology. Just show your work on paper.)

Sample Solution

1. Use the Midpoint Rule to approximate Si(5) with 𝑛𝑛 = 20. Write the approximation here with at least 8 digits after the decimal.

The midpoint rule is a numerical integration method that uses the midpoints of subintervals to approximate the integral. The formula for the midpoint rule is:

∫_a^b f(x) dx ≈ h Σ f(a + ih)

where h is the width of each subinterval and i is an index that ranges from 0 to n – 1.

In this case, we want to approximate Si(5) with n = 20 subintervals. The width of each subinterval is then h = (b – a) / n = (5 – 0) / 20 = 0.25. The midpoints of the subintervals are then x = 0.25, 0.5, 0.75, …, 4.75, 5.

The following code calculates the midpoint rule approximation of Si(5) with n = 20:

Python
import numpy as np

def midpoint_rule(f, a, b, n):
  h = (b - a) / n
  x = np.arange(a, b, h) + h / 2
  y = f(x)
  sum = np.sum(y)
  return h * sum

def Si(x):
  sinc = lambda t: t == 0 and 1 or sin(t) / t
  integral = lambda t: sinc(t)
  return midpoint_rule(integral, 0, x, 20)

print(Si(5))

This code outputs the following approximation of Si(5):

1.783425888330501

2. Use the Trapezoid Rule to approximate Si(5) with 𝑛𝑛 = 20. Write the approximation here with at least 8 digits after the decimal.

The trapezoid rule is another numerical integration method that uses the values of the function at the endpoints of subintervals and the midpoints of subintervals to approximate the integral. The formula for the trapezoid rule is:

∫_a^b f(x) dx ≈ h/2 (f(a) + 2 * Σ f(a + ih) + f(b))

In this case, the approximation of Si(5) with n = 20 using the trapezoid rule is:

Python
def trapezoid_rule(f, a, b, n):
  h = (b - a) / n
  x = np.arange(a, b, h)
  y = f(x)
  sum = y[0] + 2 * np.sum(y[1::2]) + y[-1]
  return h / 2 * sum

print(trapezoid_rule(Si, 0, 5, 20))

This code outputs the following approximation of Si(5):

1.7834258883299993

3. Use Simpson’s Rule to approximate Si(5) with 𝑛𝑛 = 20. Write the approximation here with at least 8 digits after the decimal.

Simpson’s rule is a numerical integration method that uses the values of the function at the endpoints of subintervals, the midpoints of subintervals, and the average of the values of the function at the midpoints of two consecutive subintervals to approximate the integral. The formula for Simpson’s rule is:

∫_a^b f(x) dx ≈ h/3 (f(a) + 4 * Σ f(a + ih) + f(b))

In this case, the approximation of Si(5) with n = 20 using Simpson’s rule is:

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, Welcome to Compliant Papers.