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

Sequence-or-series, in and ap 1,2,3,4,5,6,7,8,9 11,12,13,14,15,16,17,18,19...

in and ap 1,2,3,4,5,6,7,8,9 11,12,13,14,15,16,17,18,19 and like that nonzzero digit find tn Solution) First break the ''n'' number in terms of 10''s power. For e.g if n=3259 wri

Find the number., There is a number. If the sum of digits is 14, and if 29 ...

There is a number. If the sum of digits is 14, and if 29 is subtracted from the number, the digits become equal. Find the number.

Example to understand means to count, Place ten pebbles (or any other such ...

Place ten pebbles (or any other such objects) in front of a child who can recite number names upto ten in the correct sequence. Ask him/her to count them aloud while touching the p

Developing an understanidng of multiplication, DEVELOPING AN UNDERSTANIDNG ...

DEVELOPING AN UNDERSTANIDNG OF MULTIPLICATION :  The most important aspect of knowing multiplication is to understand what it means and where it is applied. It needs to be first i

Give the definition of logarithms, Give the Definition of Logarithms ? ...

Give the Definition of Logarithms ? A logarithm to the base a of a number x is the power to which a is raised to get x. In equation format: If x = ay, then log a x = y.

First order differential equations, In this section we will consider for so...

In this section we will consider for solving first order differential equations. The most common first order differential equation can be written as: dy/dt = f(y,t) As we wil

Prove that three times the sum of the squares, Prove that three times the s...

Prove that three times the sum of the squares of the sides of a triangle is equal to four times the sum of the squares of the medians of the triangle. Ans:    To prove 3(AB 2

Define period, Q. Define Period, Amplitude and Phase Shift? Ans. P...

Q. Define Period, Amplitude and Phase Shift? Ans. Period, amplitude and phase shift are used when describing a sinusoidal curve The period of a function is the smallest

Geometry help, A painter leans a 10-foot ladder against the house she is to...

A painter leans a 10-foot ladder against the house she is to paint. The foot of the ladder is 3 feet from the house. How far above the ground does the ladder touch the house? Appro

Example of addition of signed numbers, Example of addition of Signed Number...

Example of addition of Signed Numbers: Example: (-2) + 3 + 4 = 0 - 2 + 3 + 4 Solution: Thus: (-2) + 3 + 4 = 5  Example: 10 + (-5) + 8 + (-7)

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