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

Find the 14th term in the arithmetic sequence. 60, Find the 14th term in t...

Find the 14th term in the arithmetic sequence. 60, 68, 76, 84, 92

Write an equation in radius and solve it for radius, X and Y are centers of...

X and Y are centers of circles of radius 9cm and 2cm and XY = 17cm. Z is the centre of a circle of radius 4 cm, which touches the above circles externally.  Given that XZY=90 o , w

Multiplication of binomials, To understand the multiplication of binomials,...

To understand the multiplication of binomials, we should know what is meant by Distributive Law of Multiplication. Suppose that we are to multiply (a + b) and m. We

Constructions, Draw a line segment AB of length 4.4cm. Taking A as centre, ...

Draw a line segment AB of length 4.4cm. Taking A as centre, draw a circle of radius. 2cm and taking B as centre, draw another circle of radius 2.2cm. Construct tangents to each cir

How many inches is the smaller dimension of the decreased, A photographer d...

A photographer decides to decrease a picture she took in sequence to fit it within a certain frame. She requires the picture to be one-third of the area of the original. If the ori

Solution to an initial value problem, S olve the subsequent IVP. dv/dt =...

S olve the subsequent IVP. dv/dt = 9.8 - 0.196v;               v(0) = 48 Solution To determine the solution to an Initial Value Problem we should first determine the gen

DECIMALS, the mass of a container is 5.81kg when full with sugar .the mass ...

the mass of a container is 5.81kg when full with sugar .the mass of container is 3.8kg when 3/8 of the sugar is removed.what is the mass of empty container

Ratio, ther are 162 student in a school.20 of them are girls .how many are ...

ther are 162 student in a school.20 of them are girls .how many are boy

Prove that ac2 =ab2 + bc2+2bcxbd, If ABC is an obtuse angled triangle, obtu...

If ABC is an obtuse angled triangle, obtuse angled at B and if AD⊥CB Prove that AC 2 =AB 2 + BC 2 +2BCxBD Ans:    AC 2 = AD 2 + CD 2 = AD 2 + (BC + BD) 2 = A

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