answersLogoWhite

0


Best Answer

Please refer to Wikipedia where there is a full C example to do specifically this. I imagine whoever had the homework assignment before you posted their answer there.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you compute the integral of a function using midpoint rule in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a java that computes the value of 2?

Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);


Write algorithm compute sum of square of N numbers?

1. Design an algorithm to compute sum of the squares of n numbers?


Is there an equation that addresses how pressure psi affects flow cfm through a fixed orifice?

yes, the pressure is directly related to the effective force acting on the fluid body, so from the pressure differential you can compute the effective force on a small mass of fluid in the orifice, which can then be translated into a flux integral, which can be solved for Volume/time.


How do you write a program in c to compute the power of a number without using the mathh library?

There is a function which can do it for you. You have to include math.h in headers. And then use the function pow(x, y) which returns a value of type double (x and y are double too).pow(x, y) = x to the power of y.


What is the function that compute the CPU utilization in c plus plus language?

There is no such function in C++ as the implementation is hardware-dependant and would require a low-level operating system API call. C++ is designed to be as generic as possible, thus there are no built-in functions to cater for this. See related links below for an article which describes how such information can be obtained.

Related questions

How do you compute quadratic equation in qbasic programming?

See the related link for details.


How do you compute the probability distribution of a function of two Poisson random variables?

we compute it by using their differences


How can you find the length of arc?

If you want to find the lenght of a curve y = f(x) between two values of x, lets say x1 and x2, you must compute this integral : Intx1 to x2[sqrt(dx2 + dy2)] You can either express the original function in terms of y or in terms of x, but it is much simpler to express it in a way such that the integral will not be improper. For example, lets say we want to find the lenght of arc of the curve y = x2 between x = 0 and x = 1. We could express this function in terms of y but we will keep it this way because if we change it, we will have to compute an improper integral, which can sometimes be very tedious. The differential of y = x2 is dy = 2x dx. We now need to square the differential : (dy)2 = (2x dx)2 = 4x2 (dx)2 We now have to compute this integral: Int0 to 1[sqrt(dx2 + dy2)] = Int0 to 1[sqrt(dx2 + 4x2 dx2)] = Int0 to 1[sqrt(1 + 4x2) dx] This last integral is easy to compute using a trigonometric substitution.


Which excel formula will compute the midpoint value in a range?

Median( number1, number2, ... number_n )You may enter up to 30 values


Which best characterizes an integral computer?

The only characteristic of any computer is the ability to compute. That's why they're called computers. However, an integral computer is a computer that is integral to another system such that both systems are integrated as a single system. A car computer system is an example of an integral computer. The computer in your microwave is an integral computer.


What is the difference between triple integral and volume integral?

While I searching for the answer to this question, I totally confused. Atlast I reach in one thing that we may compute some volume integrals by using double integral but to evaluate a triple integral we should go through all the three integrals.


How do you compute the holzer method in C programming?

Hafner/Maass have done it in Fortran. Maybe of help by translating?


What are the advantages of sigmoidal function in neural network?

its derivative is easy to compute


How do you compute norm on matlab?

using the function norm(A,x) where A is the matrix/vector that you have to compute the norm for and x can be 1,2,inf, or 'fro' to compute the 1-norm, 2-norm, infinite-norm and frobenius norm respectively.


What has the author Daniel Wolf written?

Daniel Wolf has written: 'Compute!'s Amiga machine language programming guide' -- subject(s): Amiga (Computer), Motorola 68000 (Microprocessor), Programming


Use the concept of a limit to explain how you could find the exact value for the definite integral value for a section of your graph?

The definite integral value for a section of a graph is the area under the graph. To compute the area, one method is to add up the areas of the rectangles that can fit under the graph. By making the rectangles arbitrarily narrow, creating many of them, you can better and better approximate the area under the graph. The limit of this process is the summation of the areas (height times width, which is delta x) as delta x approaches zero. The deriviative of a function is the slope of the function. If you were to know the slope of a function at any point, you could calculate the value of the function at any arbitrary point by adding up the delta y's between two x's, again, as the limit of delta x approaches zero, and by knowing a starting value for x and y. Conversely, if you know the antideriviative of a function, the you know a function for which its deriviative is the first function, the function in question. This is exactly how integration works. You calculate the integral, or antideriviative, of a function. That, in itself, is called an indefinite integral, because you don't know the starting value, which is why there is always a +C term. To make it into a definite integral, you evaluate it at both x endpoints of the region, and subtract the first from the second. In this process, the +C's cancel out. The integral already contains an implicit dx, or delta x as delta x approaches zero, so this becomes the area under the graph.


How do you compute marginal cost of capital?

Take the first-order derivative of the cost of capital function.