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

What is the vertex form for a quadratic equation, What is the Vertex Form f...

What is the Vertex Form for a Quadratic Equation ? The vertex form for a quadratic function is as follows: f(x) = a(x - h) 2 + k The graph of this function Is a parabola whos

Parabola, please i need the answers to x^_7x+10 i want the vertex,axis of s...

please i need the answers to x^_7x+10 i want the vertex,axis of semetery,y intersect and the x intercept

Calculus, I need help with my calculus work

I need help with my calculus work

Right angled triangle, In proving relation of trigonometric ratios we becam...

In proving relation of trigonometric ratios we became confused that what should we do next, so to complete any question quickly what should we do?

Elementary row operations to reduce the augmented matrix, Consider the syst...

Consider the system of linear equations X + ay = 1 2x + 8y = b Where a and b are real numbers. (a)  Write out the augmented matrix for this system of linear equations.

Explain the decimal system in detail, Explain The Decimal System in detail?...

Explain The Decimal System in detail? A decimal, such as 1.23, is made up of two parts: a whole number and a decimal fraction. In 1.23, the whole number is 1 and the decimal fr

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