Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Question No.

1
Write the procedure how to install Mathematica software in laptop.
Answer
1. Install
2. Run
3. Press the “Other ways to activate”, choose “Manual Activation”
4. Copy MathID to keygen, enter any Activation Key to keygen (you can use 1234-4321-123456),
press the “Generate” button
5. Copy Activation Key and Password to Activation window, press Activate

Question No.2
Construct a Hilbert Matrix of order 5 x 5 by using Mathematica.
Answer
a[i_, j_] = 1/(i + j – 1);
hilbert = Array[a,{5, 5}];
hilbert//MatrixForm

1 1 1 1
1 2 3 4 5
1 1 1 1 1
2 3 4 5 6
1 1 1 1 1
3 4 5 6 7
1 1 1 1 1
4 5 6 7 8
1 1 1 1 1
5 6 7 8 9

Question No.3

Compute the value of π+ π +π


Answer

N π+ π +π 

2.3148126332632235

Question No.4
Express the value of (x + 1)10 in traditional polynomial form.
Answer
Expand[(x+1)^10]
1 + 10 x + 45 x2 + 120 x3 + 210 x4 + 252 x5 + 210 x6 + 120 x7 + 45 x8 + 10 x9 + x10
2 pdff.nb

Question No.5
Plot the graph of y=sinx from 0 to 2π
Answer
Plot[Sin[x], {x, 0, 2 π}]

1.0

0.5

1 2 3 4 5 6

-0.5

-1.0

Question N0.6
Find the greatest common divisor and least common multiple of 24 , 40 and 48.
Answer
GCD[24,40,48]
8
LCM[24,40,48]
240

Question No.7
Computer the square of Sin 45°.
Answer
Square[Sin[45°]]
 1
2

Question No.8
Compute 3 + 2 and 3 - 2 to 50 significant digits. Then compute their product.
Answer
N 3 + 2 , 50
3.1462643699419723423291350657155704455124771291873
N 3 - 2 , 50
0.31783724519578224472575761729617428837313337843343
N 3 + 2 , 50*N 3 - 2 , 50
1.0000000000000000000000000000000000000000000000000
pdff.nb 3

Question No.9
Compute 10! using For Loop
Answer
using For loop
For[fact=1;n=1,n≤10,n++,fact=n*fact]
fact
For loop using
3628800

Question No.10
Plot the graph of y = x 2 on the interval -5<=X<= 5.
Answer
Plot[x^2,{x,-5,5}]

25

20

15

10

-4 -2 2 4

Question No. 11
Find the union and intersection of the set {a,b,c,d,e,f,g}, {c,d,e,f,g,h,i} and {e,f,g,h,i,j,k}.
Answer
Union[{a,b,c,d,e,f,g},{c,d,e,f,g,h,i},{e,f,g,h,i,j,k}]
{a,b,c,d,e,f,g,h,i,j,k}
Intersection[{a,b,c,d,e,f,g},{c,d,e,f,g,h,i},{e,f,g,h,i,j,k}]
{e,f,g}

Question No. 12
Compute the sum of the reciprocals of 5,7,9,11 and 13.
Answer
N 15 + 17 + 19 + 11
1 1
+ 13 
0.6218

Question No. 13
Write Factor integer of 2*381*400.
Answer
4 pdff.nb

FactorInteger[2*381*400]
{{2,5},{3,1},{5,2},{127,1}}

Question No. 14
Plot the graph y=Sinx , y=2Sinx, and y=3Sinx from -2π to 2π on the same set of axes.
Answer
Plot[{Sin[x],2Sin[x],3Sin[x]},{x,-2π,2π}]
3

-6 -4 -2 2 4 6

-1

-2

-3

Question No. 15
Compute the square of Sin45°.
Answer
Square[Sin[45°]]
 1
2

Question No. 16
Find an algebraic expression for CosArcSin x^2+1
x^2

Answer
x^2
ExpandCosArcSin x^2+1 
x4
1- 2
1+x2 

Question No. 17
Sketch the graph of the function y=-x, y=x and y=xSinx on the interval -6π<=x<=6π on one set of
axes.
Answer
Plot[{-x,x,x Sin[x]},{x,-6π,6π}]
pdff.nb 5

20

10

-15 -10 -5 5 10 15

-10

-20

Question No. 18
Sketch the three-dimesnsional surface defined by Z=(x^2 + 3 y^2) ⅇ-(x^2+y^2) on the interval
-3<=x<=3 ,-3<=x<=3.
Answer
Plot3D(x^2 + 3 y^2) ⅇ-(x^2+y^2) , {x, -3, 3}, {y, -3, 3}

Question No. 19
Construct a list of the reciprocals of the first ten even integers.
Answer
Table[1/k, {k, 2, 20, 2}]
[1/2, 1/4, 1/6, 1/8, 1/10.1/12, 1/14, 1/16, 1/18, 1/20 ]

Question No. 20
Construct the 5×5 identity matrix by using Mathematica.
Answer
MatrixForm[{{1, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}]
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
6 pdff.nb

Question No. 21
Construct the 5×5 matrix having the first five primes as diagonal entries and 0’s by using Mathe-
matica.
Answer
MatrixForm[SparseArray[{{1, 1} → 2, {2, 2} → 3, {3, 3} → 5, {1, 3} → 0, {4, 4} → 7, {5, 5} → 11}]]
2 0 0 0 0
0 3 0 0 0
0 0 5 0 0
0 0 0 7 0
0 0 0 0 11

Question No. 22
Construct 3×3 matrix whose entries are consecutive integers, increasing as we go to the right and
down.
Answer
MatrixForm[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}]
1 2 3
2 3 4
3 4 5

Question No. 23
Show that GoldenRatio satisfies the algebraic equation x^2 – x – 1 = 0.
Answer
x = GoldenRatio;
x2 – x – 1 //N
0
pdff.nb 7
8 pdff.nb

You might also like