Ausgangsmatrix: \[ \begin{pmatrix} 1 & 1 & 3 & 1 & | & 6 \\ 2 & -1 & 0 & 1 & | & -1 \\ -3 & 2 & 1 & -2 & | & 1 \\ 4 & 1 & 6 & 1 & | & 3 \end{pmatrix} \]
Ziel: Nullstellen unterhalb der ersten Spalte: \[ R2 \leftarrow R2 - 2R1: \quad \begin{pmatrix} 1 & 1 & 3 & 1 & | & 6 \\ 0 & -3 & -6 & -1 & | & -13 \\ -3 & 2 & 1 & -2 & | & 1 \\ 4 & 1 & 6 & 1 & | & 3 \end{pmatrix} \] \[ R3 \leftarrow R3 + 3R1: \quad \begin{pmatrix} 1 & 1 & 3 & 1 & | & 6 \\ 0 & -3 & -6 & -1 & | & -13 \\ 0 & 5 & 10 & 1 & | & 19 \\ 4 & 1 & 6 & 1 & | & 3 \end{pmatrix} \] \[ R4 \leftarrow R4 - 4R1: \quad \begin{pmatrix} 1 & 1 & 3 & 1 & | & 6 \\ 0 & -3 & -6 & -1 & | & -13 \\ 0 & 5 & 10 & 1 & | & 19 \\ 0 & -3 & -6 & -3 & | & -21 \end{pmatrix} \]
Diese 3 Operationen können auch in einem durchgeführt werden
Nullstellen unterhalb der zweiten Spalte: \[ R3 \leftarrow R3 + \frac{5}{3}R2: \quad \begin{pmatrix} 1 & 1 & 3 & 1 & | & 6 \\ 0 & -3 & -6 & -1 & | & -13 \\ 0 & 0 & 0 & 2 & | & 8 \\ 0 & -3 & -6 & -3 & | & -21 \end{pmatrix} \] \[ R4 \leftarrow R4 - R2: \quad \begin{pmatrix} 1 & 1 & 3 & 1 & | & 6 \\ 0 & -3 & -6 & -1 & | & -13 \\ 0 & 0 & 0 & 2 & | & 8 \\ 0 & 0 & 0 & -2 & | & -8 \end{pmatrix} \]
Diese 2 Operationen können auch in einem durchgeführt werden
Zurückwärtseinsetzen zur Bestimmung der Lösung \(x\): \[ x_4 = 4, \quad x_3 = x_3, \quad x_2 = 3-2x_3, \quad x_1 = -1-x_3 \] \[ x_4 = 4 \] \[ -3x_2-6x_3-4 = -13, \quad -3x_2-6x_3=-9, \quad x_2=3-2x_3 \] \[ x_1+(3-2x_3)+3x_3+4 = 6, \quad x_1 + 3x_3-2x_3=-1, \quad x_1+x_3=-1, \quad x_1=-1-x_3 \]
Taylor-Entwicklung um den Punkt \((x_0, y_0) = (1, 2)\): \[ f(1, 2) = 0, \quad f_x(1, 2) = 3, \quad f_y(1, 2) = 4\ln(1) = 0 \] \[ f_{xx}(1, 2) = -5, \quad f_{xy}(1, 2) = 4, \quad f_{yy}(1, 2) = 2\ln(1) = 0 \] \[ T_2(x, y) = 0 + 3(x - 1) + 0(y - 2) + \frac{1}{2}(-5(x - 1)^2 + 4(x - 1)(y - 2)) \]
\[ T_2(x, y) = 3(x - 1) - \frac{5}{2}(x - 1)^2 + 4(x - 1)(y - 2)) \]
Gegeben: \[ f(x,y) = (3x + 2y)x, \quad g(x,y) = 2x^3 + 3x^2y - 40 = 0 \]
Lagrange-Funktion: \[ \mathcal{L}(x, y, \lambda) = (3x + 2y)x + \lambda (2x^3 + 3x^2y - 40) \]
nach \(x\), \(y\) und \(\lambda\) ableiten: \[ \frac{\partial \mathcal{L}}{\partial x} = 6x + 2y + \lambda (6x^2 + 6xy) = 0 \] \[ \frac{\partial \mathcal{L}}{\partial y} = 2x + \lambda (3x^2) = 0 \] \[ \frac{\partial \mathcal{L}}{\partial \lambda} = 2x^3 + 3x^2y - 40 = 0 \]
System lösen, um Kandidaten für lokale Extrema zu finden (l eliminieren)
Es genügt, die partiellen Ableitungen von \(f_x,f_y, g_x, g_y\) zu bilden:
\[f_x=6x+2y,\quad f_y=2x\]
\[g_x=6x^2+6y, \quad g_y=3x^2\]
Berechne damit die Determinante \((f_x g_y - f_y g_x)=0\) und löse nach y auf.
\[3x^2 (6x+2y) - 2x (6x^2 + 6xy) = 0\]
ausklammern \(6x^2\):
\[6x^2(x-y)=0\]
Wird nur Null für \(y=x\)
\(y=x\) einsetzen in NB:
\[2x^3+3x^3-40=0 \rightarrow 5x^3-40=0 \rightarrow x^3=8 \rightarrow x=2\]
Ableitung entlang der Kurve:
Hier ist der kompakte Python-Code mit sympy, der alle
Aufgaben löst: https://live.sympy.org
import sympy as sp
# Aufgabe 1
A = sp.Matrix([
[1, 1, 3, 1],
[2, -1, 0, 1],
[-3, 2, 1, -2],
[4, 1, 6, 1]
])
b = sp.Matrix([6, -1, 1, 3])
x = A.LUsolve(b)
rank_A = A.rank()
# Aufgabe 2
t = sp.symbols('t')
g = sp.Matrix([4 - 2*t, 4 + 3*t, 2 - 2*t])
p1 = sp.Matrix([3, 1, 2])
p2 = sp.Matrix([-1, 3, 2])
p3 = sp.Matrix([5, -2, 4])
normal_vector = (p2 - p1).cross(p3 - p1)
plane_eq = normal_vector.dot(sp.Matrix([sp.symbols('x1'), sp.symbols('x2'), sp.symbols('x3')]) - p1)
distance = sp.Abs(plane_eq.subs({sp.symbols('x1'): g[0], sp.symbols('x2'): g[1], sp.symbols('x3'): g[2]})) / sp.sqrt(normal_vector.dot(normal_vector))
# Aufgabe 3
A2 = sp.Matrix([
[1, -2, 3],
[1, 0, 1],
[0, 4, -2]
])
eigenvals = A2.eigenvals()
eigenvects = A2.eigenvects()
P, D = A2.diagonalize()
# Aufgabe 4
x, y = sp.symbols('x y')
f = (y**2 - x) * sp.ln(x)
stationary_points = sp.solve([sp.diff(f, x), sp.diff(f, y)], (x, y))
hessian = sp.hessian(f, (x, y))
taylor_poly = f.series(x, 1, 3).removeO().series(y, 2, 3).removeO()
# Aufgabe 5
x, y, l = sp.symbols('x y l', real = True)
f5 = (3*x + 2*y)*x
g5 = 2*x**3 + 3*x**2*y - 40
L = sp.Lambda((x, y, l), f5 + l * g5)
grad_L = [sp.diff(L(x, y, l), var) for var in (x, y, l)]
lagrange_sol = sp.solve(grad_L, (x, y, l))
dy_dx = -sp.diff(g5, x) / sp.diff(g5, y)
df_dx = sp.diff(f5, x) + sp.diff(f5, y) * dy_dx
# Aufgabe 6
r, theta = sp.symbols('r theta')
x_polar = 2 + r * sp.cos(theta)
y_polar = r * sp.sin(theta)
f6_polar = (2 * y_polar / x_polar) * r
integral_result = sp.integrate(f6_polar, (r, 0, 2), (theta, 0, sp.pi))
# Ergebnisse ausgeben
(x, rank_A, g, normal_vector, distance, eigenvals, eigenvects, stationary_points, hessian, taylor_poly, lagrange_sol, df_dx, integral_result)