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

Explain different base numbers, Explain Different Base Numbers? In mult...

Explain Different Base Numbers? In multiplying or dividing two exponential expressions with different base numbers, write out the exponential expressions as products. Since

Calculus, Determine the linear approximation for f(x)= sin delta at delta =...

Determine the linear approximation for f(x)= sin delta at delta =0

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

Compare and contrast african immigrants, Compare and contrast African immig...

Compare and contrast African immigrants with our immigrant groups? How are they different? What are the implications of these differences for their adjustment to the larger society

Find probabilities for the standard normal distribution, Q. Find Probabilit...

Q. Find Probabilities for the Standard Normal Distribution? Ans. Suppose the history teacher decides to distribute the final grades of his class with a normal distribution

Proof of root test - sequences and series, Proof of Root Test  Firstly...

Proof of Root Test  Firstly note that we can suppose without loss of generality that the series will initiate at n = 1 as we've done for all our series test proofs.  As well n

Linear programming, Chelsea has been facing some financial problems which e...

Chelsea has been facing some financial problems which even caused her daily expenses for food, at the same time, she hasn''t receive the money from the bank loan yet. Therefore, sh

Solve 5x tan (8x ) =3x trig function, Solve 5x tan (8x ) =3x . Solution...

Solve 5x tan (8x ) =3x . Solution : Firstly, before we even begin solving we have to make one thing clear.  DO NOT CANCEL AN x FROM BOTH SIDES!!! Whereas this may appear like

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