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

#title.heat loss in a cylindrical pipe., briefly explain how the famous equ...

briefly explain how the famous equation for the loss of heat in a cylindrical pipe is derived

If oa = ob = 14cm, If OA = OB = 14cm, ∠AOB=90 o , find the area of shaded r...

If OA = OB = 14cm, ∠AOB=90 o , find the area of shaded region.  (Ans:21cm 2 ) Ans:    Area of the shaded region = Area of ? AOB - Area of Semi Circle = 1/2  x 14 x

One tailed test, One Tailed Test It is a test where the alternative hy...

One Tailed Test It is a test where the alternative hypothesis (H 1 :) is only concerned along with one of the tails of the distribution for illustration, to test a business co

Determine rank correlation coefficient , Determine Rank Correlation Coe...

Determine Rank Correlation Coefficient A group of 8 accountancy students are tested in Quantitative Techniques and Law II.  Their rankings in the two tests were as:

Utilizes the denominator for our substitution, Evaluate given integrals. ...

Evaluate given integrals.                ∫3/(5 y + 4)   dy Solution Let's notice as well that if we take the denominator & differentiate it we get only a constant and th

DETERMINANT, IF 7 AND 2 ARE TWO ROOTS OF THE EQUATION |X 3 7 2 X 2 7 6 X...

IF 7 AND 2 ARE TWO ROOTS OF THE EQUATION |X 3 7 2 X 2 7 6 X |=0 THEN FIND THE THIRD ROOT IS

Unitary method, what is history of Unitary method

what is history of Unitary method

Compound interest, some experts estimate that the cost of education in the ...

some experts estimate that the cost of education in the US increases by 6% p.a. An Ivy League college currently costs $24,502 for one year''s study today. Using compound interest r

Equation, Solve : 4x2+2x+3=0 Ans) x^2 + (1/2)x = -(3/4) (x+1/4)^2 = 1/...

Solve : 4x2+2x+3=0 Ans) x^2 + (1/2)x = -(3/4) (x+1/4)^2 = 1/16 - 3/4 = -11/16 implies x = (-1+i(11)^(1/2))/4 and its conjugate.

Simplify the logical expression, Simplify the logical expression X‾ Y‾ + X‾...

Simplify the logical expression X‾ Y‾ + X‾ Z + Y Z +Y‾ Z W‾  Ans: The K-Map for the following Boolean expression is described by the following diagram. The optimized expression

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