Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use VBA TO SOLVE PLEASE Use Option Explicit and type all variables. Input from InputBox. Echo input values. Output to a file for both problems.

Use VBA TO SOLVE PLEASE
image text in transcribed
Use Option Explicit and type all variables. Input from InputBox. Echo input values. Output to a file for both problems. Turn in your output file and your source listing. 1. Consider the following integral: 0.415-a--4x/2.22)dr Write a VBA program to evaluate this integral using Simpson's 1/3 rule. Input the lower and upper limits and the first n from InputBox in the main Sub, Subl. But output from a 2nd Sub. Put the 1/3 rule in a 3rd Sub called by the main program. Use a function for the integrand. Note: you will need to include logic to account for the alternating 4's and 2's. Probably the easiest way is to include two for loops. In the main Sub check your input to see that the input value of n is even. If not MsgBox a warning and leave the program and stop calculation. Begin with n-2. Compute the relative error, Ea, as the difference between the present value and the previous value. (Forn 2 the previous value was zero.) Put the call to Simpson inside a Do While loop and double n each time until you get an Ea value less than 103 in magnitude or you have made 15 attempts Output should include each iterated value, and the corresponding values of n and Ea

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

=+6 Who is the peer of the IA ?

Answered: 1 week ago

Question

=+herself to in terms of equity with regard to this assignment?

Answered: 1 week ago

Question

=+ What typical employee will the IA compare him/

Answered: 1 week ago