1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Apr 2013
Posts
4
Rep Power
0

welcome

i need to code in c language for limited integration

e.x : integrate function 1/x from 1 to 10 and the program give me the result is 2.30

e.x : integrate function (x^2 + 5) from 5 to 50 and the program give me the result is 41850

please i am ready to pay money for who do it for me

thanks
2. I'll verify the polynomial integral using executable Iverson notation
Code:
```   5-~&((0 p..5 0 1x)&p.)50
41850```
In English,
-~ "subtract after reversing the arguments"
& "but first evaluate"
((0 p..5 0 1x)&p.) "the integral of the polynomial with 0 constant term"
the x means to use rational arithmetic.

Look, nasr251. People at this web site care about academic integrity. Who would want to be stuck working with you?

Show a good effort, ask a specific question if you're stuck, and you'll get help.

The other integral is trickier. J integrates polynomials so we need the Taylor series coefficients. I expanded 1/x about x=6 and took 50 terms of the expansion. x:inv converts the rational number to floating point.
Code:
```   x:inv _5-~&((0 p..((%@(6&+))t.(i.50)))&p.)4
2.30258```
(%@(6&+))t.(i.50) this part (obviously) does the Taylor series work.
Last edited by b49P23TIvg; April 29th, 2013 at 11:28 AM.
3. You already asked this over a week ago -- http://forums.devshed.com/c-programm...ge-943991.html -- and were satisfied with clifford's answer. What changed your mind? Simply recognizing that the integral of 1/x is the natural log wasn't what you were being asked to do?

What did you find when you looked up those two methods I gave you? You've had more than a week to do that minimal amount of research.

PS
Originally Posted by nasr251
i need to code in c language for limited integration
Even though English is not your native language, you still need to use the proper terminology.

An integral without bounds (ie, x can range from +/- infinity) is an indefinite integral. As I recall from more than three decades ago, the value of an indefinite integral cannot be calculated.

An integral with upper and lower bounds for x is a definite integral, which can be calculated.

Your assignment has you working with definite integrals. If you need to learn what that is, then you now have the words to search on.
Last edited by dwise1_aol; April 29th, 2013 at 12:46 PM.
4. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Apr 2013
Posts
4
Rep Power
0
ok gys

i am so sorry but i need to this code quickly

if you know its ok

thanks
5. I already gave you the answer! Over a week ago! Do you expect me to also feed you your baby bottle, burp you, and change your diaper?

If you are too lazy to perform a simple Google search, then it is better for all of us that you wash out now. We would not want to have you as a co-worker who expects everybody else to do his work for him.