Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \!\(f[x_] = \(-1\)/x\[IndentingNewLine]
- \(a = 1;\)\[IndentingNewLine]
- \(b = 10;\)\[IndentingNewLine]
- \(n1 = 100;\)\[IndentingNewLine]
- \(dx1 = \((b - a)\)/n1;\)\[IndentingNewLine]
- \(xzve1 = a + \((k - 1)\)*dx1;\)\[IndentingNewLine]
- \(g1[x_] = dx1*f[xzve1];\)\[IndentingNewLine]\[IndentingNewLine]
- ∑\+\(k = 1\)\%n1 g1[x] // N\[IndentingNewLine]
- \(r = Plot[f[x], {x, 1, 10}];\)\[IndentingNewLine]
- \(j1 = Graphics[
- Table[Rectangle[{\((x - 1)\), f[dx1*x]}, {\((\((x)\))\), 0}], {x,
- 1, n1, 10/n1}]];\)\[IndentingNewLine]
- Show[r, j1]\)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement