Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Задача 1:
- \!\(f[x_] = Log[x + 1]\[IndentingNewLine]
- \(a = 0;\)\[IndentingNewLine]
- \(b = 1;\)\[IndentingNewLine]
- \(n1 = 10;\)\[IndentingNewLine]
- \(n2 = 50;\)\[IndentingNewLine]
- \(n3 = 100;\)\[IndentingNewLine]
- \(dx1 = \((b - a)\)/n1;\)\[IndentingNewLine]
- \(dx2 = \((b - a)\)/n2;\)\[IndentingNewLine]
- \(dx3 = \((b - a)\)/n3;\)\[IndentingNewLine]
- \(xzve1 = a + \((k - \((1/2)\))\)*dx1;\)\[IndentingNewLine]
- \(xzve2 = a + \((k - \((1/2)\))\)*dx2;\)\[IndentingNewLine]
- \(xzve3 = a + \((k - \((1/2)\))\)*dx3;\)\[IndentingNewLine]
- \(g1[x_] = dx1*f[xzve1];\)\[IndentingNewLine]
- \(g2[x_] = dx2*f[xzve2];\)\[IndentingNewLine]
- \(g3[x_] = dx3*f[xzve3];\)\[IndentingNewLine]
- ∑\+\(k = 1\)\%n1 g1[x] // N\[IndentingNewLine]
- ∑\+\(k = 1\)\%n2 g2[x] // N\[IndentingNewLine]
- ∑\+\(k = 1\)\%n3 g3[x] // N\[IndentingNewLine]
- \(r = Plot[f[x], {x, 0, 1}];\)\[IndentingNewLine]
- \(j1 = Graphics[Table[Rectangle[{\((x - 1)\)/n1, 0}, {\((\((x)\)/n1)\), f[
- dx1*x]}], {x, 1, n1, 1}]];\)\n
- \(j2 = Graphics[Table[Rectangle[{\((x - 1)\)/n2,
- 0}, {\((\((x)\)/n2)\), f[dx2*x]}], {x, 1,
- n2, 1}]];\)\[IndentingNewLine]
- \(j3 = Graphics[Table[Rectangle[{\((x - 1)\)/n3, 0}, {\((\((
- x)\)/n3)\), f[dx3*x]}], {x, 1, n3, 1}]];\)\[IndentingNewLine]
- Show[r, j1]\[IndentingNewLine]
- Show[r, j2]\[IndentingNewLine]
- Show[r, j3]\)
- Задача 2:
- \!\(df[x_] = Log[2 x]/x\n
- \(df[\[ExponentialE]/2] = 3/2;\)\n
- f[x_, y_] = ∫df[x]\ \[DifferentialD]x + y\n
- NSolve[f[\[ExponentialE]/2, y] == 3/2, y]\[IndentingNewLine]
- funk[x_] = ∫df[x]\ \[DifferentialD]x + 1\)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement