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

Multiplication in decimal notations., Consider the following multiplication...

Consider the following multiplication in decimal notations: (999).(abc)=def132 ,determine the digits a,b,c,d,e,f. solution) a=8 b=6 c=8 d=8 e=6 f=7 In other words, 999 * 877 = 8

Dr.., I need some material on Bachet equation

I need some material on Bachet equation

How many permutations can you make of the word statistics, Q. How many perm...

Q. How many permutations can you make of the word STATISTICS? Solution:  There are 10 letters in the word STATISTICS, i.e. n=10. Three of them are S's, so n 1 =3, three are T'

Solving equations, darien agrees to sponsor her sister $8 plus $1 for every...

darien agrees to sponsor her sister $8 plus $1 for every mile she walks.Write an expression to show her total money

Measures of central tendency-graphical method , Illustration In a soci...

Illustration In a social survey whether the main reason was to establish the intelligence quotient or IQ of resident in a provided area, the given results were acquired as tab

What is the formula to know total area square shaped quilt, Cathy is formin...

Cathy is forming a quilt out of fabric panels that are 6 in through 6 in. She needs to know the total area of her square-shaped quilt. Which formula will she use? The area of a

Net Present Value, A business has the opportunity to expand by purchasing ...

A business has the opportunity to expand by purchasing a machine at a cost of £80,000. The machine has an estimated life of 5 years and is projected to generate a cashflow of £20,0

Construct a tangent to a circle of radius, 1.  Draw a pair of tangents to a...

1.  Draw a pair of tangents to a circle of radius 2cm that are inclined to each other at an angle of 900. 2.  Construct a tangent to a circle of radius 2cm from a point on the c

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