April 29th, 2013, 03:09 AM

Please i need to help you in c code
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
April 29th, 2013, 11:25 AM

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.
[code]
Code tags[/code] are essential for python code and Makefiles!
April 29th, 2013, 12:40 PM

You already asked this over a week ago  http://forums.devshed.com/cprogramm...ge943991.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.
April 30th, 2013, 01:37 AM

ok gys
i am so sorry but i need to this code quickly
if you know its ok
thanks
April 30th, 2013, 02:03 AM

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 coworker who expects everybody else to do his work for him.
{Added by edit:}
I gave you the answer over a week ago, on 22 April in my time zone. So I repeat my question: What did you find when you looked up those two methods I gave you?
Last edited by dwise1_aol; April 30th, 2013 at 07:46 PM.