Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

needs to be done in C programming and the last material cover in class was arrays Write a program that can calculate a definite integral

needs to be done in C programming and the last material cover in class was arrays

image text in transcribed

Write a program that can calculate a definite integral of a function. If you haven't taken Calculus 2, a definite integral is defined as follows: f(x) = F(b)-F (a) al where F is the antiderivative off-ie. f = dF. If the function f is simple, it's possible to find the antiderivative. For example, iff = 2x then F x2. However, if the function is more complicated, it's not possible to easily find the antiderivative - this is called a nonelementary antiderivative. For example, if f=sin(H), the antiderivative is not obvious. In this case, we can use the following approximation i -1 f(a + iAx) + f(a + (i +1)Ax2 f(x) = Where N =- Your program should take 4 arguments: function a b deltax where function is 1, 2, or 3. If function is 1, f(x)sin (x). If function is 2, f (x)-2. Iffunction is 3,f(x) = sin (x2). So, to calculate .10 sin (x) with Ax 0.0001, your program should do the following $./integral 1 0 3.1415926 0.0001 integral value = 2.000000 To calculate x', your program should do the following: $./integral 2 0 2 0.0001 integral value = 2.666667

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

Timeline for implementation report

Answered: 1 week ago

Question

a. What aspects of the situation are under your control?

Answered: 1 week ago