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

Fracrions, how do u do fractions on a nummber line

how do u do fractions on a nummber line

Calculate how much ribbon is needed to wrap the box, Ribbon is wrapped arou...

Ribbon is wrapped around a rectangular box that is 10 by 8 by 4 in. Using the example provided, calculate how much ribbon is needed to wrap the box. consider the amount of ribbon d

Inverse of a matrix, Explain Inverse of a matrix, need assignment help.

Explain Inverse of a matrix, need assignment help.

Find relation between x and y while lies on straight line, Find the relatio...

Find the relation between x and y when the point (x,y) lies on the straight line joining the points (2,-3) and (1,4) [ Hint: Use area of triangle is 0] Ans :   Hint: If the poi

Solve 6 sin ( x/2)= 1 on [-20, Solve 6 sin ( x/2)= 1 on [-20,30] Soluti...

Solve 6 sin ( x/2)= 1 on [-20,30] Solution Let's first work out calculator of the way since that isn't where the difference comes into play. sin( x/2)= 1/6   ⇒x/2= sin

Halm''s differential equation, please i need the solution for halm''s diffe...

please i need the solution for halm''s differential equation

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