Area under curve, Mathematics

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);
}
}
Posted Date: 8/31/2012 1:07:21 AM | Location : United States







Related Discussions:- Area under curve, Assignment Help, Ask Question on Area under curve, Get Answer, Expert's Help, Area under curve Discussions

Write discussion on Area under curve
Your posts are moderated
Related Questions
Rules for Partial Derivatives For a function, f = g (x, y) . h (x, y) = g (x, y)   + h

Properties of Logarithms 1. log a xy = log a x + log a y 2.  = log a x - log a y 3. log a x n   = n log

The scale of a map is 0.5 in 25mi the actual distance between two cities is 725mi write a proportion that represents the relationship how far apart will the cities be on the map


Theorem, from Definition of Derivative  If f(x) is differentiable at x = a then f(x) is continuous at x =a. Proof : Since f(x) is differentiable at x = a we know, f'(a

Definition of inverse functions :  Given two one-to-one functions f ( x ) and g ( x ) if ( f o g ) ( x ) = x  AND  ( g o f ) ( x ) = x then we say that f ( x ) & g ( x ) are i


Multiply the given below and write the answer in standard form. (2 - √-100 )(1 + √-36 ) Solution If we have to multiply this out in its present form we would get,  (2 -

if tan theta =1,find the value of sin4 theta + cos4 theta