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

Decimals, how to make 2.3 into a fraction?

how to make 2.3 into a fraction?

How much did sally earn if she worked 48 hours, Sally gets paid x dollars p...

Sally gets paid x dollars per hour for a 40-hour work week and y dollars for every hour she works over 40 hours. How much did Sally earn if she worked 48 hours? Since she worke

Marketing mix, 1) Identify key characteristics of product or services and e...

1) Identify key characteristics of product or services and estimate their significance to the market 2) Identify and analyse level of customer service provision to determine its si

Triganometry, Ask question #Minimum 100 words what is the hypotunus of a r...

Ask question #Minimum 100 words what is the hypotunus of a right bangled triangle a=5@ b=25 find c accwhepted#

Compute the quartile coefficient of skewness, By using the above data compu...

By using the above data compute the quartile coefficient of skewness Quartile coefficient of skewness = (Q3 + Q1 - 2Q2)/(Q3 + Q1)                                The positio

Ratios, 450 students. if there are 50 more boys than girls, how many boys a...

450 students. if there are 50 more boys than girls, how many boys and girls are there?

Good investment, Realtors estimate that 23% of homes purchased in 2004 were...

Realtors estimate that 23% of homes purchased in 2004 were considered investment properties. If a sample of 800 homes sold in 2004 is obtained what is the probability that at most

Cirlce Division, How can i calculate arc length for dividing a circle into ...

How can i calculate arc length for dividing a circle into 10 parts

Write the value of sin10+sin20+sin30+....+sin360., sin10+sin20+sin30+....+s...

sin10+sin20+sin30+....+sin360=0 sin10+sin20+sin30+sin40+...sin180+sin(360-170)+......+sin(360-40)+sin(360-30)+sin(360-20)+sin360-10)+sin360 sin360-x=-sinx hence all terms cancel

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