Mehrdimensionale Funktionen - Übungen

%pylab inline
%config InlineBackend.figure_format = 'svg'
%pylab is deprecated, use %matplotlib inline and import the required libraries.
Populating the interactive namespace from numpy and matplotlib

Aufgaben

Aufgabe MF1: Kurve und Geschwindigkeit

Sei \(f:\mathbb{R} \rightarrow \mathbb{R}^2\) die Kurve \(f(t)= \begin{pmatrix} x(t) \\ y(t) \end{pmatrix} = \sqrt{t}\begin{pmatrix} \cos(\pi t) \\ \sin(\pi t) \end{pmatrix}\)

  1. Erstellen Sie einen Plot der Kurve für \(t\in[0, 2]\).

  2. Berechnen Sie den Geschwindigkeitsvektor für jeden Zeitpunkt \(t\) und zeichen Sie mit Hilfe des Befehls quiver Geschwindigkeitsvektoren in Ihren Plot ein. Tipp: Verwenden Sie die scale-Option.

  3. Bestimmen und zeichnen Sie Kurve sowie Geschwindigkeitsvektor in Polarkoordinaten.

Aufgabe MF2: Divergenz und Rotation

  1. Berechnen Sie die Divergenz des Vektorfelds \(F(x,y) = \frac{1}{x^2 + y^2}\begin{pmatrix} x \\ y \end{pmatrix}\) on \(\mathbb{R}^2\) in den kartesischen Koordinaten \((x,y)\). Erstellen Sie einen Plot des Vektorfelds mit Hilfe des quiver Befehls. Geben Sie ein physikalischen Grund für das Ergebnis an.

  2. Berechnen Sie die Rotation des Vektorfelds \(F(x,y,z) = \begin{pmatrix} xy -z^2 \\ 2xyz \\ x^2z - y^2z \end{pmatrix}\) on \(\mathbb{R}^3\) in den kartesischen Koordinaten \((x,y,z)\).

Aufgabe MF3: Kurve, Tangente

Gegeben ist die Kurve \(\begin{pmatrix} x(t) \\ y(t) \end{pmatrix} = \begin{pmatrix} \sin(2t) \\ \cos(3t) \end{pmatrix}\).

  1. Berechnen Sie die Tangente an die Kurve bei \(t=1\).

  2. Plotten Sie die Kurve im Bereich \(t\in[-3,3]\) in Python.

Aufgabe MF4: Vektorfeld, Divergenz

  1. Erstellen Sie von Hand und danach in Python einen Plot des Vektorfeldes

    \[\begin{split}F(x,y) = \begin{pmatrix} 1 \\ x \end{pmatrix}.\end{split}\]
  2. Berechnen Sie die Divergenz des Vektorfeldes und interpretieren Sie das Ergebnis.

Lösungen

Lösung MF1: Kurve und Geschwindigkeit

  1. Siehe Code.

  2. Der Geschwindigkeitsvektor zum Zeitpunkt \(t\) ist der Vektor der ersten Ableitungen: \(f'(t)= \begin{pmatrix} x'(t) \\ y'(t) \end{pmatrix} = \begin{pmatrix} \frac{1}{2 \sqrt{t}}\cos(\pi t) - \sqrt{t}\pi\sin(\pi t) \\ \frac{1}{2 \sqrt{t}}\sin(\pi t) + \sqrt{t}\pi\cos(\pi t) \end{pmatrix}\). Siehe Code.

  3. \(r(t) = \sqrt{t}\), \(\varphi(t) = \pi t\). \(r'(t) = \frac{1}{2 \sqrt{t}}\), \(\varphi'(t) = \pi\). Siehe Code.

t = linspace(0.01, 2)

x = sqrt(t)*cos(pi*t)
y = sqrt(t)*sin(pi*t)

xp = 0.5/sqrt(t)*cos(pi*t) - pi*sqrt(t)*sin(pi*t)
yp = 0.5/sqrt(t)*sin(pi*t) + pi*sqrt(t)*cos(pi*t)

figure(figsize=(3,3))
plot(x, y, 'r')
quiver(x, y, xp, yp, scale_units='xy', scale= 3)
xlabel('x')
ylabel('y')
xlim(-2, 2)
ylim(-2, 2)
grid(True)
_images/08_mehrdim_funktionen_ue_9_0.svg
r = sqrt(t)
phi = pi*t

rp = 0.5/sqrt(t)
phip = pi*ones(r.shape)
figure(figsize=(3,3))
plot(r, phi, 'r')
quiver(r, phi, rp, phip, scale_units='xy', scale= 4)
xlabel('r')
ylabel('phi')
xlim(0, 8)
ylim(0, 8)
grid(True)
_images/08_mehrdim_funktionen_ue_11_0.svg

Aufgabe MF2: Divergenz und Rotation

  1. \(\text{div}(F)(x,y) = \frac{\partial}{\partial x}\left(\frac{x}{x^2 + y^2} \right) + \frac{\partial}{\partial y}\left(\frac{y}{x^2 + y^2} \right)= 0\). Siehe Code. Die Vektoren \(F(x,y)\), die man als Fluß am Ort \((x,y)\) der Ebene interpretieren kann, haben alle Länge \(\frac{1}{\sqrt{x^2 + y^2}} = \frac{1}{r}\), sind im rechten Winkel auf Kreise um den Ursprung und zeigen nach außen. Daher ist der Gesamtfluss über Kreise mit dem Koordinatenursprung als Mittelpunkt erhalten. Das Vektorfeld hat \(F\) hat somit keine Quellen - außer am Ursprung, wo es nicht differenzierbar ist.

  2. \(\text{rot}(F)(x,y,z) = \begin{pmatrix} -2yz - 2xy \\ -2z -2xz \\ 2yz - x \end{pmatrix}\).

x = linspace(-2,2,10)
y = linspace(-2,2,10)
X,Y = meshgrid(x, y)

FX = X/(X**2 + Y**2)
FY = Y/(X**2 + Y**2)

figure(figsize=(3,3))
Q = quiver(X,Y, FX,FY)
xlabel('x')
ylabel('y')
grid(True)
_images/08_mehrdim_funktionen_ue_13_0.svg

Lösung MF3: Kurve, Tangente

  1. Ort bei \(t=1\) ist \(\begin{pmatrix} x(1) \\ y(1) \end{pmatrix} = \begin{pmatrix} \sin(2) \\ \cos(3) \end{pmatrix}\). Geschwindigkeitsvektor bei \(t=1\) ist \(\begin{pmatrix} x'(1) \\ y'(1) \end{pmatrix} = \begin{pmatrix} 2\cos(2) \\ -3\sin(3) \end{pmatrix}\). Tangentengleichung: \(\begin{pmatrix} x_T(t) \\ y_T(t) \end{pmatrix} = \begin{pmatrix} \sin(2) \\ \cos(3) \end{pmatrix} + t\begin{pmatrix} 2\cos(2) \\ -3\sin(3) \end{pmatrix}\).

  2. Siehe Code

t = linspace(-3, 3, 500)
x = sin(2*t)
y = cos(3*t)

figure(figsize=(3,3))
plot(x, y)
xlabel('x')
ylabel('y')
grid(True)
_images/08_mehrdim_funktionen_ue_15_0.svg

Lösung MF4: Vektorfeld, Divergenz

  1. Siehe Code.

  2. \(\text{div}(F)(x,y) = \frac{\partial}{\partial x}\left(1 \right) + \frac{\partial}{\partial y}\left(x \right)= 0\). Quellenfreiheit.

x = linspace(-2,2,10)
y = linspace(-2,2,10)
X,Y = meshgrid(x, y)

FX = 1
FY = X

figure(figsize=(3,3))
Q = quiver(X,Y, FX,FY)
xlabel('x')
ylabel('y')
grid(True)
_images/08_mehrdim_funktionen_ue_17_0.svg

Kurztestfragen

  1. Eine Kurve ist eine Funktion von \(\mathbb{R}\) hoch … nach \(\mathbb{R}\) hoch …. Ein Skalarfeld ist eine Funktion von \(\mathbb{R}\) hoch … nach \(\mathbb{R}\) hoch …. Ein Vektorfeld ist eine Funktion von \(\mathbb{R}\) hoch … nach \(\mathbb{R}\) hoch ….

  2. Womit misst man die Quelldichte und womit die Wirbeldichte eines Vektorfeldes?

  3. Geben Sie ein konkretes (als Formeln) Beispiel für eine Kurve im \(\mathbb{R}^3\) an.

  4. Geben Sie ein konkretes (als Formeln) Beispiel für ein Vektorfeld auf \(\mathbb{R}^2\) an.

  5. Berechnen Sie die Quelldichte des Vektorfelds \(f(x,y) = \begin{pmatrix} 6x-3y \\ 3x - 6y\end{pmatrix}\)?

  6. Berechnen Sie die Wirbeldichte des Vektorfelds \(f(x,y) = \begin{pmatrix} 6x-3y \\ 3x - 6y\end{pmatrix}\)?

  7. Geben Sie ein konkretes Zahlenbeispiel für eine Kurve im \(\mathbb{R}^3\) an.

  8. Durch die Berechnung … wird ein Vektorfeld im \(\mathbb{R}^3\) in ein Skalarfeld umgewandelt.

    1. der Rotation

    2. der Divergenz

    3. des Gradienten

  9. Skizzieren Sie das Vektorfeld \(F(x,y)=\left(\begin{array}{c} -0.5x \\ -0.5y \end{array}\right)\).

  10. Berechnen Sie für das Vektorfeld aus der vorherigen Aufgabe die Rotation. Was können Sie über die Wirbeldichte des Vektorfelds sagen?

  11. Gegeben ist die Kurve \(\left(\begin{array}{c} x(t) \\ y(t) \end{array}\right) = \left(\begin{array}{c} t^2 \\ \sqrt{t} \end{array}\right)\). Berechnen Sie die Tangente an die Kurve bei \(t=1\).

  12. Zeigen Sie, dass für beliebige Vektorfelder \(F(x,y,z)=\left(\begin{array}{c} F_x \\ F_y \\ F_z \end{array}\right)\) die Beziehung div(rot(\(F))=0\) gilt.

Programmierprojekte