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

Ineqaulites, how to work out inequalities with negative signs?

how to work out inequalities with negative signs?

Generic rectangles and greatest common factors, miaty and yesenia have a gr...

miaty and yesenia have a group of base ten blocks.Misty has six more than yesnia. Yesenia''s blocks repersent 17 together they have 22 blocks,and the total of blocks repersent 85.

Theory of indices, In algebra knowing that 2 3 = 8 is not sufficient...

In algebra knowing that 2 3 = 8 is not sufficient. Equally important to know is what would be the result if quantities like 2 3 . 2 -4 . 2 6 or  3 7 / 3 2

Law of Cosines, The law of cosines can only be applied to acute triangles. ...

The law of cosines can only be applied to acute triangles. Is this true or false?

Jordan needs help, carlie is now fivetimes as old as henry. in nine years ...

carlie is now fivetimes as old as henry. in nine years her age will be twice henry''s age then. how old is carly now

How to left shifts and right shifts a graph, Q. How to Left shifts and righ...

Q. How to Left shifts and right shifts a graph? Ans. When you're translating (shifting) a graph, it's easy to get subtracting and adding mixed up. It seems counter-intuiti

Math, a business is owned by three people.the first owns 1/12 of the busine...

a business is owned by three people.the first owns 1/12 of the business and the second owns 1/6 of the business. what fractional part of the business is owned by the third person

Probability and statistics, f Y is a discrete random variable with expected...

f Y is a discrete random variable with expected value E[Y ] = µ and if X = a + bY , prove that Var (X) = b2Var (Y ) .

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