Summer Semester, 2009

Basic part

(5 points)

Define and plot the function

h(x)={({{-x  for x<0}, {(x^2) for 0≤x<1}, {h[x-2]      for x≥1}})

on the interval [-2,10], such that the x-axis be twice long than the y-axis, and color the graph depending on the y-coordinate.

h[x_]:=Which[x<0,-x,0≤x<1, x^2,True, h[x-2]]

Plot[h[x],{x,-2,10},AspectRatio->0.5,ColorFunction->Hue]

(15 points)

Find the values of k, for which the matrix

A=(({{1, 1, 1}, {1, k, 0}, {1, 0, k}}))

is singular. Find the nullspace in these cases. (5 points)

Apply the transformation A.r to the points of the unit sphere. Visualize the transformation with interactive change of the parameter. (10 points)

A:=(({{1, 1, 1}, {1, k, 0}, {1, 0, k}}));

sol=Solve[Det[A]==0,k]

Map[NullSpace,A/.sol]

Clear[Sph]
Sph[t_,s_]={Sin[s]Cos[t],Sin[s]Sin[t],Cos[s]}

A.Sph[t,s]

Manipulate[
ParametricPlot3D[Evaluate[
{Sph[t,s],(({{1, 1, 1}, {1, k, 0}, {1, 0, k}})).Sph[t,s]}],{t,0,2Pi},{s,0,Pi},PlotRange->{{-5,5},{-5,5},{-5,5}},PlotStyle->{Opacity[0.5]}],{k,-4,4}]

(10 points)

Intersect the cone

{z Cos[s], z Sin[s], z } (s∈[0,2π], z∈[-2,2])

with the plane passing throuh the point {-0.5,0,0} with the normal vector (Overscript[n, ->]). Change the normal vector interactively and visualize the intersection curve of these surfaces. Use MeshFunctions!

Manipulate[Show[ParametricPlot3D[{u Cos[v],u Sin[v],u},{v,0,2Pi},{u,-2,2},
MeshFunctions->{({#1,#2,#3}-{x0,0,0}).{Sin[s]Cos[t],Sin[s]Sin[t],Cos[s]}&},Mesh->{{0}},PlotPoints->ControlActive[10,50]],
ContourPlot3D[({x,y,z}-{x0,0,0}).{Sin[s]Cos[t],Sin[s]Sin[t],Cos[s]}==0,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->False,PlotPoints->ControlActive[10,50]]
],{x0,-1,1},{t,0,2Pi},{s,0,Pi}
]

(10 points)

Use the following iteration,

(Subscript[x, n+1])=a (Subscript[x, n])(1-(Subscript[x, n]))

for 0<(Subscript[x, 0])<1, 0<a<4. Plot the points {n,(Subscript[x, n])}. What is the linit of it (i.e. the fixed point of it)? That can be the fixed points? Change the parameter a interactively.

Manipulate[
ListPlot[
NestList[T[a,#]&,x0,n],PlotRange->{0,1}],{a,2,4},{x0,0,1},{n,1,100,1},Initialization:>(T[a_,x_]:=a x(1-x))]

Choose One of the following problems!

(20 points)

Visualize the concept of the directional derivative of  function of two variables. The derivative of F(r) at (Subscript[r, 0])={(Subscript[x, 0]),(Subscript[y, 0])} with respect to the direction v  (v={(Subscript[v, 1]),(Subscript[v, 2])} is a unit vector) is

(lim_(t->0))((F((Subscript[r, 0])+t v)-F((Subscript[r, 0])))/t)=(lim_(t->0))((F((Subscript[x, 0])+t (Subscript[v, 1]),(Subscript[y, 0])+t (Subscript[v, 2]))-F((Subscript[x, 0]),(Subscript[y, 0])))/t)=∇F((Subscript[r, 0])).v,

the slope of the tangent line drawn to the graph of  F((Subscript[r, 0])+t v) at (Subscript[r, 0]) along the line (Subscript[r, 0])+t v. Use manipulate to plot the graph, the direction and the tangent line by interactive changing of (Subscript[r, 0]) and v.

Manipulate[
expr=x^2-y^2;
grad=D[expr,{{x,y}}];
Show[Plot3D[{expr,-1.1},{x,-1,1},{y,-1,1},MeshFunctions->{({#1,#2,#3}-{x0,y0,0}).{-Sin[s],Cos[s],0}&},Mesh->{{0}},PlotStyle->{Opacity[0.5]},PlotRange->{-1.2,1.2},BoxRatios->Automatic],
ContourPlot3D[({x,y,z}-{x0,y0,0}).{-Sin[s],Cos[s],0}==0,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->False,PlotPoints->ControlActive[5,50],ContourStyle->{Opacity[0.5]}],
Graphics3D[{PointSize[0.03],Point[{x0,y0,expr/.{x->x0,y->y0}}],
Red,Thickness[0.01],Line[{({x0,y0,expr/.{x->x0,y->y0}}-0.5{Cos[s],Sin[s],(grad/.{x->x0,y->y0}).{Cos[s],Sin[s]}}),
({x0,y0,expr/.{x->x0,y->y0}}+0.5{Cos[s],Sin[s],(grad/.{x->x0,y->y0}).{Cos[s],Sin[s]}})}]}]],
{s,0,2Pi},{x0,-1,1},{y0,-1,1}]

(20 points)

Consider the planar linear differential equation

(({{x'}, {y'}}))=(({{1, 1}, {-3, k}})).(({{x}, {y}}))

Find the eigenvalues of its matrix, the general solution with initial conditions x(0)=(Subscript[x, 0]), y(0)=(Subscript[y, 0]). Visualize interactively (by changing the parameter k) its vectorfield and the trajectories of the solutions in the 2D phasespace. Change the initial values of the solutions interactively.