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

Differential calculus, lim n tends to infintiy ( {x} + {2x} + {3x}..... +{n...

lim n tends to infintiy ( {x} + {2x} + {3x}..... +{nx}/ n2(to the square) )where {X} denotes the fractional part of x? Ans) all no.s are positive or 0. so limit is either positive

Area between curves, Area between Curves In this section we will be fi...

Area between Curves In this section we will be finding the area between two curves. There are in fact two cases that we are going to be looking at. In the first case we des

Find how much women prefer a job outside of the home, According to a Gallup...

According to a Gallup poll 51% of US women prefer to have a job outside of the home. What is the chance that a survey of 200 women would find that 45% or less of the respondants

Define degrees and radians, Q. Define Degrees and Radians? Ans. Ju...

Q. Define Degrees and Radians? Ans. Just as your height can be measured in meters or feet and your weight can be measured in pounds or kilograms, angles can be measured in

Derivatives of trig functions, Derivatives of Trig Functions In this s...

Derivatives of Trig Functions In this section we will see derivatives of functions other than polynomials or roots of polynomials. We'll begin this process off through taking

Surface area with polar coordinates, Surface Area with Polar Coordinates ...

Surface Area with Polar Coordinates We will be searching for at surface area in polar coordinates in this part.  Note though that all we're going to do is illustrate the formu

State demorgans law and prove it using the truth table, State DeMorgan's la...

State DeMorgan's law. Prove it using the truth table.   Ans: DeMorgan's law defines that    (i)  (x ∨ y)' = x' ∧ y' (ii)  (x ∧ y)' = x' ∨ y'      Now let us dr

Fractions, What fraction could you add to 4/7 to get a sum greater than 1

What fraction could you add to 4/7 to get a sum greater than 1

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