Message Boards Message Boards

0
|
2976 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

[?] Calculate upper and lower sum (Riemann sum) for different functions?

Posted 5 years ago

Hi community!

I am a Mathematica beginner and want to solve the following problem. I am sure you can help me.

Task description: There are given functions like f(x)=cos(x^2), g(x)=(x^2+1)^(1/2) and h(x)=3^(2x+1) in an intervall of x ? [0,2]

I should calculate the upper sum enter image description here

and lower sum. enter image description here

And print the functions and segments afterwards. I know how to solve this problem on paper, but i struggle with mathematica commands.

Thank you in advance and BR, Gabriel

POSTED BY: Gabriel Wurzer
n = 4;
xx = Table[2 (j - 1) / (n - 1), {j, 1, n}]
ff = Table[Cos[xx[[j]]^2], {j, 1, n}]
Sum[(xx[[j]] - xx[[j - 1]]) ff[[j]], {j, 2, n}]
Sum[(xx[[j]] - xx[[j - 1]]) ff[[j - 1]], {j, 2, n}]
POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract