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

Ronding off numbers, how to round off numbers to the nearest tens and to th...

how to round off numbers to the nearest tens and to the nearest hundred

Prove that ac2 =ab2 + bc2+2bcxbd, If ABC is an obtuse angled triangle, obtu...

If ABC is an obtuse angled triangle, obtuse angled at B and if AD⊥CB Prove that AC 2 =AB 2 + BC 2 +2BCxBD Ans:    AC 2 = AD 2 + CD 2 = AD 2 + (BC + BD) 2 = A

Addition of like terms with same signs, Case 1: Suppose we are given...

Case 1: Suppose we are given expressions like 3abc and 7abc and asked to compute their sum. If this is the case we should not worry much. Because adding like exp

Vectors, A triangle has vertices A (-1, 3, 4) B (3, -1, 1) and C (5, 1, 1)....

A triangle has vertices A (-1, 3, 4) B (3, -1, 1) and C (5, 1, 1). The area of ABC is a) 30.1 b) 82.1 c) 9.1 d) 52.1

Find the number., There is a number. If the sum of digits is 14, and if 29 ...

There is a number. If the sum of digits is 14, and if 29 is subtracted from the number, the digits become equal. Find the number.

Adding & subtracting i guess, Jack and his mother paid $11.50 for tickets t...

Jack and his mother paid $11.50 for tickets to the movies, and adults tickets cost $4.50 more than a child ticket what was the cost of each ticket?

Trignometery., using the formula sin A =under root 1+ cos2A /2 . find value...

using the formula sin A =under root 1+ cos2A /2 . find value of 30 degree, it is being given that cos 60 degree =1/2.

Use the definition of the right- and left-handed limits, Use the definition...

Use the definition of the limit to prove the given limit. Solution Let ε> 0 is any number then we have to find a number δ > 0 so that the following will be true. |

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