F. Fassò.    University of Padova. 
Introduction to the use of Mathematica in Mathematics and Science. SoftSkills course for the PhD program in Mathematics
Exercise for the first three lectures (October 28, 2023)

Exercises for lectures 1-3

1. Create a list of the squares of the natural numbers between 1 and 99. Extract its 11th element.

2. Define a function f(n) which produces the approximation of  (Sqrt[3])-1  with n decimal digits.

3. Determine the zeroes of the polynomial  (x^3)-2x+1

4. Compute the length of the ellipse of semiaxes  a=2 and b=1?  
[Suggestions: a parametrization of the ellipse is
       t ->   (a  cos(t) , b sin(t) ) ,    0≤ t≤2π .
The length of a curve t-> γ(t) =  (x(t),y(t))  is the integral of ||γ’(t)|| = (Sqrt[x'(((t))^2)+y'(((t))^2)]) . See the help for how to compute a definte integral. You can compute the integral symbolically of numerically.

5. Compute the area of an ellipse of semiaxes a and  b. 
[Suggestions: if the Cartesian equation  of the ellipse is   ((x^2)/(a^2))+ ((y^2)/(b^2))=1, the area is twice the integral of   b(Sqrt[(1- ((x^2)/(a^2)))])  for - a ≤ x ≤  a ].
Write now the equation of the ellipse as   A (x^2)+ B (y^2)=1 and the area as twice the integral of  (Sqrt[((1- (Ax^2))/B))])  for - (1/(Sqrt[A])) ≤ x ≤ (1/(Sqrt[A])) ].
Why Mathematica  does not give (π/(Sqrt[AB])) as result?  Can you “Refine” it with suitable assumtions? 
[Suggestions: logical AND is written “&&”]

6. Write a function that creates the list of the first n odd naturales. Plot the graph of such a list for n=11, joining the points with segments.
[Suggestions: ListPlot; Option: Joined]

7. Write, in three different ways, a function f(a,b) that plots an ellipse of semiaxes a and b: 
    - with the ellipse given as a parametrized curve in (((Reals))^2)
    - with the ellipse given as a level curve of function (((Reals))^2)-> (Reals)
    - with the ellipse formed by the union of the graphs of two functions  x->(Subscript[y, ±])(x) = ±(Sqrt[....])

8. Plot a sphere:
    - as a parametrized surface
    - as level set of a function

9. A parametrization of the Moebius band a surface ⊂ (((Reals))^3) is

(s,φ)-> (({{Cos[φ], -Sin[φ], 0}, {Sin[φ], Cos[φ], 0}, {0, 0, 1}}))(({{R+s Cos[(φ/2)]}, {0}, {s Sin[(φ/2)]}})) ,     s∈ [-r,r] ,  φ ∈ [0,2π] 

where R > r > 0 are two parameters. Create a picture of a Moebius band.

10.  A possibile (non-injective) immersion of  the Klein bottle in (((Reals))^3) is
            
Plot it, and tryi to make the selfintersection clearly visible.

11. Find the integer zeroes of the polynomial   2 (x^2) - 5 x - 3

Suggestions:Solve[ equation, variable, domain]

12. The “Number Prime Theorem” states the number π(n) of primes , ≤ n is asymptotic to  (n/(log(n)))  for n->∞.

- In Mathematica, π is the function PrimePi, and is defined for real arguments.
Plot together the two functions π(x)  and  (x/(log(x)))  (and/or ((π(x))/x)  and  (1/(log(x))))  for x up to (10^5), (10^6) , (10^(7 )), (10^8), or even more if you can handle it.  (Taking x reals speeds up the computation). Is there a convergence?

- In fact, asymptotic means that   π(x)/(x/(log(x))) -> 1. Make plots of this. Is the convergence clear?

13. Find the solutions of the system
            (x^2)-(y^3)=0  ,    xy +(x^2)=0
Then plot the two curves  (x^2)-(y^3) = 0,  xy +(x^2)=0 so as to show the solutions of the system as intersection points of the curves.

14. Consider the function
               f: (((Reals))^2)->(Reals) ,   f(x,y) = (((x+y))^2)-xy+1 
1. Find its critical points  [The differential is   D[  f[x,y] ,  {{x,y}}  ]
2. Plot the graph of f in a region that contains all critical points 
3. Superpose to the graph of f a point in each of its critical point 
    [If the critical point has coordinates (x,y), create a graphics 3d object that represent a point (of a suitable PontSize) located at the point of coordinates
    (x,y,f(x,y)).
    Then, superpose it to the Plot of  f  with the Option      Epilog -> Graphics3D[ { PointSize[...], Point[{....}}]
4. Investigate whether the fixd points are minima, maxima or saddle points  [The Hessian is   D[ f(x,y),  { {x,y} , 2 } ]

14. Consider the function
               f: (((Reals))^2)->(Reals) ,   f(x,y) = (Sqrt[(x^4)+(x^2) (y^2)+(y^4)-x +1])
1. Determine the region of the plane where it is defined and plot it.
2. Plot its graph.
2. Find its critical points and investigate if they are minima, maxima or saddle points.