Mathematica Demystified

Answers

Quiz 1

1.1

<span class="beginpage"> pagenum="335"><a name="746"></a><a name="IDX-335"></a></span><b class="bold">(1/2 + 1/3)^3</b>

1.2

<b class="bold">(1/2 + 1/3)^3.0</b>0.578704

1.3

<b class="bold">N[E^Pi]N[Pi^E]</b>23.140722.4592

1.4

<span class="beginpage"> pagenum="336"><a name="747"></a><a name="IDX-336"></a></span>(* radius of earth in miles *)<b class="bold">r = 4000</b>(* volume of earth in cubic miles *)<b class="bold">V = N[4/3 Pi r^3]</b>(* surface area in square miles *)<b class="bold">S = N[4 Pi r^2]</b>40002.68083 x 10<sup11</sup>2.01062 x 10<sup8</sup>

1.5

(* volume of pyramid of Cheops *)(* base area in square meters *)<b class="bold">baseArea = 230^2</b>(* height in meters *)<b class="bold">height = 147</b>(* volume in cubic meters *)<b class="bold">volume = 1/3 baseArea height</b>529001472592100

1.6

<b class="bold">Table[</b>k^<b class="bold">3, {</b>k, <b class="bold">1, 10}]</b>{1, 8, 27, 64, 125, 216, 343, 512, 729, 1000}

1.7

<b class="bold">Table[N[Sin[</b>x<b class="bold">], 10], {</b>x<b class="bold">, 0, Pi/2, Pi/20}]</b>{0, 0.1564344650, 0.3090169944, 0.4539904997, 0.5877852523, 0.7071067812, 0.8090169944, 0.8910065242, 0.9510565163, 0.9876883406, 1.0000000000}

Alternatively, Sin is listable so that we can take Sin of a list and it will apply Sin to each element of the list. Notice also using 0.0 to force approximations.

<span class="beginpage"> pagenum="337"><a name="748"></a><a name="IDX-337"></a></span><b class="bold">Sin[Table[</b>x<b class="bold">, {</b>x<b class="bold">, 0.0, Pi/2, Pi/20}]]</b>{0., 0.156434, 0.309017, 0.45399, 0.587785, 0.707107, 0.809017, 0.891007, 0.951057, 0.987688, 1.}

1.8

<b class="bold">Table[N[(1 + 1/10^</b>k)<b class="bold">^(10^</b>k<b class="bold">)], {</b>k<b class="bold">, 1, 6}]N[E]</b>{2.59374, 2.70481, 2.71692, 2.71815, 2.71827, 2.718282.71828

1.9

<b class="bold">Table[</b>n<b class="bold">!, {</b>n<b class="bold">, 0, 20}]</b>{1, 1, 2, 6, 24, 120, 720, 5040, 40 320, 362 880, 3 628 800, 39 916 800, 479 001 600, 6 227 020 800, 87 178 291 200, 1...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Inorganic Chemicals and Compounds
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.