Hi!
I have a problem, again.
I would like to write a program to integrate functions. If I write to console integrate(polynom, lower limit, upper limit). I already write function which seperate polynom, now I don't know how to calculate whole thing.
Example: integrate(x^2+3,-1,2) solution: 12
AnnA.B
13
Newbie Poster
Recommended Answers
Jump to PostI didn't understand everything...
You said,the function made by you...
Can you send some code?Too less information about your function....
Jump to PostI want to understand but... my efforts wasn't success :'(
function integral(input: string): extended;//WAITS STRING ,BACK EXTENDED var p,//STORES THE ',' POSITION IN THE *INPUT* STRING i, t2 : integer; niz1: string; l: integer; lower_limit, upper_limit: string[2]; begin { procedure Delete(var S: String; Index: Integer; Count:Integer); Delete …
Jump to PostKid if you're not already doing so, then use the trapezium rule.
Your program should take four arguments.
1) The function f(x)
2) The lower limit
3) The upper limit
4) The number of trapeziums to split it into
5) The height of the trapeziums- Unless …
Jump to PostYes well that is about as trivial as integration gets. The problem is when you want to consider trig functions etc.
I'm not sure exactly what you wish to do.
Do you want to enter ANY trivial expression at the command line? If that is the case then …
All 15 Replies
FlamingClaw
98
Posting Pro
AnnA.B
13
Newbie Poster
FlamingClaw
98
Posting Pro
AnnA.B
13
Newbie Poster
iamthwee
AnnA.B
13
Newbie Poster
squeege321
0
Newbie Poster
AnnA.B
13
Newbie Poster
iamthwee
AnnA.B
13
Newbie Poster
iamthwee
AnnA.B
13
Newbie Poster
iamthwee
AnnA.B
13
Newbie Poster
FlamingClaw
98
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.