Mathematica Lab #12

advertisement
November 22,2015
Section B
Arun Jeevanantham
Mathematica Lab #12
Arun Jeevanantham
Problem 1
Compute the product of the consecutive integers 4 through 9 two different ways.
Method 1:
9!  3!
60 480
Method 2:
Product[x, {x, 4, 9}]
60 480
Problem 2
Compute the sum of the first 25 prime numbers.
Total[Table[Prime[x], {x, 25}]]
1060
Problem 3
Compute the square root fot he sum of the squares of the integers 15 through 30, inclusive.
Sumx2 , {x, 15, 30}
2
2110
Problem 4
1
1
1
1
Compute the infinite sum 1+ 2 + 4 + 8 + 16 + ...
Printed by Wolfram Mathematica Student Edition
Page 1 of 4
November 22,2015
Section B
Arun Jeevanantham
Sum1  2x , {x, 0, ∞}
2
Problem 5
Sketch the graphs of y = sin [x], y = 2sin [x], y=3sin[x], for -π<=x<=π, on one set of axes.
Plot[{Sin[x], 2 * Sin[x], 3 * Sin[x]},
{x, - π, π},
PlotLegends → "Expressions",
AxesLabel → {x, y}]
y
3
2
sin(x)
1
-3
-2
1
-1
2
3
x
2 sin(x)
3 sin(x)
-1
-2
-3
Problem 6
How many zeros does the function f (x) = x2 - e0.1 x have? Provide a good graphical representation of
this problem.
It has three zeroes.
Printed by Wolfram Mathematica Student Edition
Page 2 of 4
November 22,2015
Section B
Arun Jeevanantham
Plotx2 - ⅇ0.1 x , {x, - 100, 100}, PlotLegends → "x2 -ⅇ0.1 x ", AxesLabel → {x, y}
y
10 000
5000
x2 -ⅇ0.1 x
-100
50
-50
100
x
-5000
Problem 7
Compute the product of the first twenty Fibonacci numbers two different ways.
Method 1:
Product[Fibonacci[x], {x, 20}]
9 692 987 370 815 489 224 102 512 784 450 560 000
Method 2:
Fibonorial[20]
9 692 987 370 815 489 224 102 512 784 450 560 000
Problem 8
If 35 x+1 =11 ten x ≈.
5x+1(log3)=log11
log11
5 x = log3 - 1
log11
x=
log3
-1
5
Log[3, 11] - 1
-1 +
Log[11]
Log[3]
Printed by Wolfram Mathematica Student Edition
Page 3 of 4
November 22,2015
N - 1 +
Section B
Log[11]
Log[3]
Arun Jeevanantham
 5
0.236532
Problem 9
1
2
3
4
99
Compute the sum 1+ 2 + 3 + 4 + 5 +...+ 100 .
Sumn  n + 1, {n, 1, 99} + 1
267 203 679 648 518 056 584 495 070 055 557 574 921 761
2 788 815 009 188 499 086 581 352 357 412 492 142 272
Problem 10
1
Compute the sum 1+ 1 + 2  + 1 +
1
2
1
+ 3  + ... + 1 +
1
2
+
1
3
+ ... +
1
 at
20
least two ways.
Method 1
Sum21 - x  x, {x, 1, 20} + 1
41 793 679
739 024
Method 2:
20
x
21 +   1  y
x=2 y=2
41 793 679
739 024
Printed by Wolfram Mathematica Student Edition
Page 4 of 4
Download