Area under curve, Mathematics

Assignment Help:
w/ You could use this sample code to test your C functions
// Please make appropriate changes to use this for C++.

// Following main function contains 3 representative test cases

int main() {
// test case 1
{
int noOfTerms = 2;
struct Term *equation = (struct Term*)malloc(sizeof(struct Term) * noOfTerms);
equation[0].exponent = 1;
equation[0].coefficient = 1;

equation[1].exponent = 2;
equation[1].coefficient = 3;

int limit1 = 4;
int limit2 = 8;

double usrout = getAreaUnderCurve(equation, noOfTerms, limit1, limit2);
printf("%lf", usrout);

}

// test case 2
{
int noOfTerms = 1;
struct Term *equation = (struct Term*)malloc(sizeof(struct Term) * noOfTerms);
equation[0].exponent =1;
equation[0].coefficient = 1;

int limit1 = 1;
int limit2 = 1;

double usrout = getAreaUnderCurve(equation, noOfTerms, limit1, limit2);
printf("%lf", usrout);

}

// test case 3
{
int noOfTerms = 1;
struct Term *equation = (struct Term*)malloc(sizeof(struct Term) * noOfTerms);
equation[0].exponent =1;
equation[0].coefficient = 1;

int limit1 = 2;
int limit2 = 1;

double usrout = getAreaUnderCurve(equation, noOfTerms, limit1, limit2);
printf("%lf", usrout);
}
}

Related Discussions:- Area under curve

Conclusion of egroff''s theorem and lusin''s theorem, (1) Show that the con...

(1) Show that the conclusion of Egroff's theorem can fail if the measure of the domain E is not finite. (2) Extend the Lusin's Theorem to the case when the measure of the domain E

Reduced Row-Echelon Form, The augmented matrix from a system of linear equa...

The augmented matrix from a system of linear equations has the following  reduced row-echelon form (a)  How many equations are there in the system?  (b)  How many variab

Upper limit of normal , Frequently, tests that yield abnormal results are r...

Frequently, tests that yield abnormal results are repeated for confirmation.  What is the probability that for a usual person a test will be at least 1.5 times as high as the upper

Conjugate of the complex number, The conjugate of the complex number a + b ...

The conjugate of the complex number a + b i is the complex number a - b i .  In other terms, it is the original complex number along the sign on the imaginary part changed.  Here

What was the total cost of her order, Leslie ordered a slice of pizza for $...

Leslie ordered a slice of pizza for $1.95, a salad for $2.25, and a soda for $1.05. What was the total cost of her order? The cost of every item must be added together; $1.95 +

How many people said that red was their favorite color, In a recent survey ...

In a recent survey of 700 people, 15% said that red was their favorite color. How many people said that red was their favorite color? Find out 15% of 700 through multiplying 70

Estimate percent of the babies born among 6 and 8.5 pounds, 25% of babies b...

25% of babies born at Yale New Haven Hospital weigh less than 6 pounds and 78% weigh less than 8.5 pounds. What percent of the babies born at Yale New Haven Hospital weigh among 6

What are factors, What are Factors? When you multiply several numbers t...

What are Factors? When you multiply several numbers together, (4 x 5 x 3), the numbers (4, 5, and 3) being multiplied are called factors. The result of the multiplying th

Calculate the total surface area which is exposed , A golf ball has a diame...

A golf ball has a diameter equal to 4.1cm. Its surface has 150 dimples each of radius 2mm. Calculate the total surface area which is exposed to the surroundings assuming that the d

Binomial theorem, use the expansion of (1-x)^7 to find the value of 1.998^7...

use the expansion of (1-x)^7 to find the value of 1.998^7 correct to five significant figures

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd