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

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

Calculate the area of remaining piece of cardboard, A piece of cardboard in...

A piece of cardboard in the shape of a trapezium ABCD & AB || DE, ∠ BCD = 900, quarter circle BFEC is removed. Given AB = BC = 3.5 cm, DE = 2 cm. Calculate the area of remaining p

3D Trigometry problems, I have difficuties in working out those 3D trigomen...

I have difficuties in working out those 3D trigomentry problems within teh shortest possible time. Are there any tricks to get through such problems as soon as possible?

Geometry, how to make an obtuse scalene triangle FAT with m

how to make an obtuse scalene triangle FAT with m

Decimals, which one of the following examples represents a repeating decima...

which one of the following examples represents a repeating decimal? 0.123123,1.111114,0.777777,4.252525?

1234 Mathematics, use only the digits 1,2,3 and 4 in any order to write an ...

use only the digits 1,2,3 and 4 in any order to write an expression for the numbers 1 to 100. you may only use each digit once. You may use exponents of 1,2,3 and 4 in some of th

Two even digits , Find the number of six-digit positive integers that can b...

Find the number of six-digit positive integers that can be formed using the digits 1,2, 3, 4, and 5 (every of which may be repeated) if the number must start with two even digits o

Find fourier series, Question: Find Fourier series for the periodic fun...

Question: Find Fourier series for the periodic function of period 2 π,defined by      f(x) = x 4 ,  - π ≤ x ≤ π

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