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 homework help, I need help witth my homework can you help please

I need help witth my homework can you help please

Venn Diagram, In a group of 85 people, 33 own a microwave, 28 own a DVD pla...

In a group of 85 people, 33 own a microwave, 28 own a DVD player and 38 own a computer. In addition, 6 people own both a microwave and a DVD player, 9 own both a DVD player and a c

Word Problem, a local pizza store offers medium two-topping pizzas delivere...

a local pizza store offers medium two-topping pizzas delivered for $6.00 per pizza plus a $1.50 delivery charge per order. on weekends, the store runs a game day special: if six or

Cone - three dimensional spaces, Cone - Three dimensional spaces The be...

Cone - Three dimensional spaces The below equation is the general equation of a cone. X 2 / a 2 + y 2 /b 2 = z 2 /c 2 Here is a diagram of a typical cone. Not

Add subtract fractions., how do you add and subtract mixed numbers with fra...

how do you add and subtract mixed numbers with fractions

How much do they save if they pay the bill inside 10 days, Oscar's Oil Comp...

Oscar's Oil Company provides customers a 5% discount if they pay their bill within 10 days. The Stevens' oil bill is $178. How much do they save if they pay the bill inside 10 days

Plot your data on a scatter plot, Devise data that link a certain relations...

Devise data that link a certain relationship OF YOUR CHOOSING between two variables. Write a rationale stating why you chose this particular data and what you are planning to STAT

Explain that odd positive integer to be a perfect square, Show that for odd...

Show that for odd positive integer to be a perfect square, it should be of the form 8k +1. Let a=2m+1 Ans: Squaring both sides we get a2 = 4m (m +1) + 1 ∴ product of two

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