The University of Jordan                           Math 473                  Lab:  H.W. 1    
Department of Mathematica                                          due   30/10/2014                                                                   

Student Name:                                               Student No.

Use Mathematica to solve each of the following questions

Q1)

Q1:
a) Compute the exact value of  sin((45^0))  

b) Compute  log(3+ cosh((e^(- π)))) to 20 significant figures

c) Find two consecutive integers such tha  (((π^3-1))^7) lies between them.

Q1)

a)

Sin[Pi/4]

b)

N[Log[3+Cosh[Exp[-Pi]]],20]

c)

Floor[(Pi^3 -1)^7]
Ceiling[(Pi^3 -1)^7]

OR

Floor[(Pi^3 -1)^7]
Floor[(Pi^3 -1)^7]+1

Q2)

Q2: Find all solutions the each of following 

a)  system of equations 5(x^2)+3(y^2)-7=0  and  5(y^2)+3(x^2)=7

b) equation   log(3x+1)  -  (e^(-2x)) - 5 = 0   where -0.25 < x < 4

c)  the system of equations  x = 2 mod(7),  x = 4 mod(9),  x= 11 mod(17)

Q2)

a)

Clear[x,y]
Solve[ 5(x^2)+3(y^2)-7==0  &&5(y^2)+3(x^2)==7 ,{x,y}]

b)

Plot[Log[(3x+1)]+2(E^(-2x))-1.9,{x,0,4},AxesOrigin->{0,0}]

FindRoot[Log[(3x+1)]+2(E^(-2x))-1.9==0,{x,{0.3,2}}]

c)

Reduce[ Mod[x,7]==2&& Mod[x,9]==4&&Mod[x,17]==11 ,x,Integers]

Not the required solution

ChineseRemainder[{2,4,11},{7,9,17}]

Q3)

Q3: Sketch
  
a)  the curve of  f(x)= (e^(sin(x)  ))- 2 in red and g(x) = sin(4x) in blue on the same axes, for x between 1 and 3.  

b) the curve of  f(x) = {({{-x, if x≤0}, {(x^2),           if 0<x≤3}, {18-3x, if x>3}})   }  for -6 ≤ x ≤ 6.
c) the curve of   r = 5 - 3 sin(2θ)  on a suitable domain

d) the surface of  z=(e^(-(x^2)-(y^2))),  -2 ≤ x ≤ 2,  -2 ≤ y ≤ 2 .

e) the surface of  y = sin(-2x)/cosh(2x) on a suitable domain

f) the surface  z = 5 - 3 r sin(2θ)  on a suitable domain

Q3)

a)

Plot[{Exp[Sin[x]]-2,Sin[4x]},{x,-6,6},PlotStyle->{Red,Blue}]

b)

Plot[Which[x≤ 0, -x, 0<x≤ 3,x^2,x>3,18-3x],{x,-6,6}]

c)

PolarPlot[5-3 Sin[2 t],{t,0,2Pi}]

d)

Plot3D[Exp[-x^2-y^2],{x,-2,2},{y,-2,2},BoxRatios->{1,1,1.5}]

e)

Plot3D[Sin[-2x]/Cosh[2x],{x,-2,2},{z,-3,3},BoxRatios-> {1,3,1}]

f)

RevolutionPlot3D[5-3r Sin[2t],{r,0,5},{t,0,2Pi}]

Q4)

Q6: Use each of the following commands to Compute 20! (Do not use Factorial command or its notation)

 (a) Do  
  
 (b) While 
 
 (c) For   
 
 d) Product  
 
 e) Apply and Times

Q4)

a)

s=1;
Do[s*=i,{i,1,10}]
s

b)

i=1;s=1;
While[i≤10,s=s*i;i++]
s

c)

s=1;
For[i=1,i≤10,s=s*i;i++]
s

d)

Product[i,{i,1,10}]

e)

Apply[Times,Range[10]]