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

Math on a spot, compare: 643,251: 633,512: 633,893. The answer is 633,512.

compare: 643,251: 633,512: 633,893. The answer is 633,512.

Solve the following word problems, 1.   The length of a rectangle is 2 time...

1.   The length of a rectangle is 2 times its width.  The area of the rectangle is 72          square inches. Find the dimensions of the rectangle.   2.   The length of a rec

Mean, a data set has a mean of 3, a median of4, and a mode of 5, which numb...

a data set has a mean of 3, a median of4, and a mode of 5, which number must be in the data set 3,4,or5

Local maxima, Given that f(x,y) = 3xy -  x 2 y  - xy 2 . Fi nd all the poin...

Given that f(x,y) = 3xy -  x 2 y  - xy 2 . Fi nd all the points on the surface z = f(x, y)where local maxima, local minima, or saddles occur

Index number, reflection about index number in a creative way

reflection about index number in a creative way

Surds, I wanted to know what are surds.please explain with an example.

I wanted to know what are surds.please explain with an example.

Define combined functions, Q. Define Combined Functions? Ans. We a...

Q. Define Combined Functions? Ans. We are often interested in functions which combine a trigonometric function with another type of function.  For example, y = x + sinx wi

Problem, La proporción de empleados de una empresa que usan su auto para ir...

La proporción de empleados de una empresa que usan su auto para ir al trabajo es 5:16. Si hay un total de 800 empleados, diga la cantidad de autos que se espera que haya estacionad

Mensuration, In an equilateral triangle 3 coins of radius 1cm each are kept...

In an equilateral triangle 3 coins of radius 1cm each are kept along such that they touch each other and also the side of the triangle. Determine the side and area of the triangle.

How i get orders, how i become an assignment helper?n how i get order from ...

how i become an assignment helper?n how i get order from students?what should i do

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