library(ggplot2)
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)

Aufgabe 1

Mathematische Grundlagen Um das Krümmungsverhalten einer Funktion f zu bestimmen, untersuchen wir das Vorzeichen der zweiten Ableitung f ′′ (x):

Linksgekrümmt (konvex): f ′′ (x)>0

Rechtsgekrümmt (konkav): f ′′ (x)<0

Aufgaben und Lösungen mit Visualisierung a) \(f(x) = -x^2 + 2x - 1\)Analyse: \(f''(x) = -2\). Da \(f''(x) < 0\) für alle \(x\), ist der Graph überall rechtsgekrümmt.Intervall: Rechtsgekrümmt in \((-\infty, \infty)\).

Code-Snippet

f_a <- function(x) -x^2 + 2*x - 1
ggplot(data.frame(x = c(-2, 4)), aes(x = x)) +
  stat_function(fun = f_a, color = "blue", size = 1) +
  ggtitle("a) f(x) = -x^2 + 2x - 1 (Überall rechtsgekrümmt)") +
  theme_minimal()

  1. \(f(x) = -x^3 + 3x^2\)Analyse: \(f''(x) = -6x + 6\). Wendepunkt bei \(x = 1\).Intervalle: * \((-\infty, 1]\): Linksgekrümmt (\(f'' > 0\))\([1, \infty)\): Rechtsgekrümmt (\(f'' < 0\))

Code-Snippet

f_b <- function(x) -x^3 + 3*x^2
ggplot(data.frame(x = c(-2, 4)), aes(x = x)) +
  stat_function(fun = f_b, color = "blue", size = 1) +
  geom_vline(xintercept = 1, linetype = "dashed", color = "red") +
  annotate("text", x = 1.5, y = 10, label = "WP bei x=1", color = "red") +
  ggtitle("b) f(x) = -x^3 + 3x^2") +
  theme_minimal()

c) f(x)= c) \(f(x) = \frac{1}{3}x^4 - 2x^2\)Analyse: \(f''(x) = 4x^2 - 4\). Nullstellen bei \(x = \pm 1\).Intervalle:\((-\infty, -1]\) und \([1, \infty)\): Linksgekrümmt\([-1, 1]\): Rechtsgekrümmt Code-Snippet

f_c <- function(x) (1/3)*x^4 - 2*x^2
ggplot(data.frame(x = c(-3, 3)), aes(x = x)) +
  stat_function(fun = f_c, color = "blue", size = 1) +
  geom_vline(xintercept = c(-1, 1), linetype = "dashed", color = "red") +
  ggtitle("c) f(x) = 1/3x^4 - 2x^2") +
  theme_minimal()

d) \(f(x) = e^x\)Analyse: \(f''(x) = e^x > 0\). Überall linksgekrümmt.Intervall: Linksgekrümmt in \((-\infty, \infty)\).

Code-Snippet

f_d <- function(x) exp(x)
ggplot(data.frame(x = c(-2, 2)), aes(x = x)) +
  stat_function(fun = f_d, color = "blue", size = 1) +
  ggtitle("d) f(x) = e^x (Überall linksgekrümmt)") +
  theme_minimal()

e) e) \(f(x) = (2-x)^3 - 3x^2\)Analyse: \(f''(x) = 6 - 6x\). Wendepunkt bei \(x = 1\).Intervalle:\((-\infty, 1]\): Linksgekrümmt\([1, \infty)\): Rechtsgekrümmt

Code-Snippet

f_e <- function(x) (2-x)^3 - 3*x^2
ggplot(data.frame(x = c(-1, 4)), aes(x = x)) +
  stat_function(fun = f_e, color = "blue", size = 1) +
  geom_vline(xintercept = 1, linetype = "dashed", color = "red") +
  ggtitle("e) f(x) = (2-x)^3 - 3x^2") +
  theme_minimal()

  1. \(f(x) = (3x-6)^4 + 3x\)Analyse: \(f''(x) = 108(3x-6)^2 \geq 0\). Die Krümmung ist überall linksseitig (oder null am Punkt \(x=2\), aber ohne Vorzeichenwechsel).Intervall: Linksgekrümmt in \((-\infty, \infty)\).

Code-Snippet

f_f <- function(x) (3*x-6)^4 + 3*x
ggplot(data.frame(x = c(1, 3)), aes(x = x)) +
  stat_function(fun = f_f, color = "blue", size = 1) +
  ggtitle("f) f(x) = (3x-6)^4 + 3x (Überall linksgekrümmt)") +
  theme_minimal()

Aufgabe 2

Mathematische GrundlageDas Krümmungsverhalten wird durch die zweite Ableitung \(f''(x)\) bestimmt:\(f''(x) > 0\): Linksgekrümmt (konvex)\(f''(x) < 0\): Rechtsgekrümmt (konkav)Aufgaben und Lösungena) \(f(x) = 2x + e^x\)Ableitungen: \(f'(x) = 2 + e^x\), \(f''(x) = e^x\).Analyse: Da \(e^x\) für alle \(x \in \mathbb{R}\) immer positiv ist (\(>0\)), ist der Graph überall linksgekrümmt.

ggplot(data.frame(x = c(-3, 2)), aes(x = x)) +
  stat_function(fun = function(x) 2*x + exp(x), color = "blue") +
  ggtitle("a) f(x) = 2x + e^x (Linksgekrümmt)") + theme_minimal()

  1. \(f(x) = x^2 - e^{-x}\)Ableitungen: \(f'(x) = 2x + e^{-x}\), \(f''(x) = 2 - e^{-x}\).Analyse: \(f''(x) = 0 \Rightarrow e^{-x} = 2 \Rightarrow -x = \ln(2) \Rightarrow x = -\ln(2) \approx -0,69\).\(x > -\ln(2) \Rightarrow f''(x) > 0\) (Linksgekrümmt)\(x < -\ln(2) \Rightarrow f''(x) < 0\) (Rechtsgekrümmt)
ggplot(data.frame(x = c(-2, 2)), aes(x = x)) +
  stat_function(fun = function(x) x^2 - exp(-x), color = "blue") +
  geom_vline(xintercept = -log(2), linetype = "dashed", color = "red") +
  ggtitle("b) f(x) = x^2 - e^-x") + theme_minimal()

  1. \(f(x) = 2x - e^{2x}\)Ableitungen: \(f'(x) = 2 - 2e^{2x}\), \(f''(x) = -4e^{2x}\).Analyse: Da \(e^{2x} > 0\), ist \(f''(x)\) immer negativ (\(<0\)). Der Graph ist überall rechtsgekrümmt.
ggplot(data.frame(x = c(-2, 1)), aes(x = x)) +
  stat_function(fun = function(x) 2*x - exp(2*x), color = "blue") +
  ggtitle("c) f(x) = 2x - e^2x (Rechtsgekrümmt)") + theme_minimal()

  1. \(f(x) = e^{-2x} + x^2\)Ableitungen: \(f'(x) = -2e^{-2x} + 2x\), \(f''(x) = 4e^{-2x} + 2\).Analyse: Da beide Terme (\(4e^{-2x}\) und \(2\)) positiv sind, ist \(f''(x) > 0\). Der Graph ist überall linksgekrümmt.
ggplot(data.frame(x = c(-1, 2)), aes(x = x)) +
  stat_function(fun = function(x) exp(-2*x) + x^2, color = "blue") +
  ggtitle("d) f(x) = e^-2x + x^2 (Linksgekrümmt)") + theme_minimal()

  1. \(f(x) = 3x - e^{-3x}\)Ableitungen: \(f'(x) = 3 + 3e^{-3x}\), \(f''(x) = -9e^{-3x}\).Analyse: \(f''(x)\) ist immer negativ (\(<0\)), da \(e^{-3x}\) positiv ist. Der Graph ist überall rechtsgekrümmt.
ggplot(data.frame(x = c(-1, 1)), aes(x = x)) +
  stat_function(fun = function(x) 3*x - exp(-3*x), color = "blue") +
  ggtitle("e) f(x) = 3x - e^-3x (Rechtsgekrümmt)") + theme_minimal()

  1. \(f(x) = \frac{1}{2}x^2 - e^{-x}\)Ableitungen: \(f'(x) = x + e^{-x}\), \(f''(x) = 1 - e^{-x}\).Analyse: \(f''(x) = 0 \Rightarrow e^{-x} = 1 \Rightarrow x = 0\).\(x > 0 \Rightarrow f''(x) > 0\) (Linksgekrümmt)\(x < 0 \Rightarrow f''(x) < 0\) (Rechtsgekrümmt)
ggplot(data.frame(x = c(-2, 3)), aes(x = x)) +
  stat_function(fun = function(x) 0.5*x^2 - exp(-x), color = "blue") +
  geom_vline(xintercept = 0, linetype = "dashed", color = "red") +
  ggtitle("f) f(x) = 1/2x^2 - e^-x") + theme_minimal()

Aufgabe 3

Mathematische GrundlagenUm das Krümmungsverhalten einer Funktion \(f\) zu bestimmen, untersuchen wir das Vorzeichen der zweiten Ableitung \(f''(x)\) im angegebenen Intervall \(I\):Linksgekrümmt (konvex): \(f''(x) > 0\)Rechtsgekrümmt (konkav): \(f''(x) < 0\)Aufgaben und Lösungena) \(f(x) = \cos(x); \ I = ]0; 2\pi[\)Ableitungen: \(f'(x) = -\sin(x)\), \(f''(x) = -\cos(x)\).Analyse: * \(-\cos(x) > 0\) für \(x \in ]\frac{\pi}{2}; \frac{3\pi}{2}[ \Rightarrow\) Linksgekrümmt.\(-\cos(x) < 0\) für \(x \in ]0; \frac{\pi}{2}[ \cup ]\frac{3\pi}{2}; 2\pi[ \Rightarrow\) Rechtsgekrümmt.

ggplot(data.frame(x = c(0, 2*pi)), aes(x = x)) +
  stat_function(fun = cos, color = "blue", size = 1) +
  geom_vline(xintercept = c(pi/2, 3*pi/2), linetype = "dashed", color = "red") +
  ggtitle("a) f(x) = cos(x) auf ]0, 2pi[") + theme_minimal()

  1. \(f(x) = \sin(2x) - 1; \ I = ]0; 2\pi[\)Ableitungen: \(f'(x) = 2\cos(2x)\), \(f''(x) = -4\sin(2x)\).Analyse: Das Vorzeichen wechselt alle \(\frac{\pi}{2}\).Rechtsgekrümmt (\(f'' < 0\)): \(]0; \frac{\pi}{2}[\) und \(]\pi; \frac{3\pi}{2}[\).Linksgekrümmt (\(f'' > 0\)): \(]\frac{\pi}{2}; \pi[\) und \(]\frac{3\pi}{2}; 2\pi[\).
f_b <- function(x) sin(2*x) - 1
ggplot(data.frame(x = c(0, 2*pi)), aes(x = x)) +
  stat_function(fun = f_b, color = "blue") +
  geom_vline(xintercept = c(pi/2, pi, 3*pi/2), linetype = "dashed", color = "red") +
  ggtitle("b) f(x) = sin(2x) - 1") + theme_minimal()

  1. \(f(x) = \cos(\frac{\pi}{2}x) + 2x; \ I = ]-2; 2[\)Ableitungen: \(f'(x) = -\frac{\pi}{2}\sin(\frac{\pi}{2}x) + 2\), \(f''(x) = -\frac{\pi^2}{4}\cos(\frac{\pi}{2}x)\).Analyse: * \(f''(x) < 0\) für \(x \in ]-1; 1[ \Rightarrow\) Rechtsgekrümmt.\(f''(x) > 0\) für \(x \in ]-2; -1[ \cup ]1; 2[ \Rightarrow\) Linksgekrümmt.
f_c <- function(x) cos((pi/2)*x) + 2*x
ggplot(data.frame(x = c(-2, 2)), aes(x = x)) +
  stat_function(fun = f_c, color = "blue") +
  geom_vline(xintercept = c(-1, 1), linetype = "dashed", color = "red") +
  ggtitle("c) f(x) = cos(pi/2 * x) + 2x") + theme_minimal()

  1. \(f(x) = \sin(x - 1) + x; \ I = ]0; 2[\)Ableitungen: \(f'(x) = \cos(x - 1) + 1\), \(f''(x) = -\sin(x - 1)\).Analyse: Wendepunkt bei \(\sin(x-1)=0 \Rightarrow x=1\).\(x \in ]0; 1[: f''(x) = -\sin(\text{negativ}) > 0 \Rightarrow\) Linksgekrümmt.\(x \in ]1; 2[: f''(x) = -\sin(\text{positiv}) < 0 \Rightarrow\) Rechtsgekrümmt.
f_d <- function(x) sin(x - 1) + x
ggplot(data.frame(x = c(0, 2)), aes(x = x)) +
  stat_function(fun = f_d, color = "blue") +
  geom_vline(xintercept = 1, linetype = "dashed", color = "red") +
  ggtitle("d) f(x) = sin(x - 1) + x") + theme_minimal()

Testaufgabe

Wichtiger Hinweis zur Logik: Da in den Abbildungen die Graphen der ersten Ableitung \(f'\) gegeben sind, müssen wir das Krümmungsverhalten von \(f\) über die Steigung von \(f'\) bestimmen:Steigt der Graph von \(f'\) (positive Steigung), ist \(f'' > 0\) und damit ist \(f\) linksgekrümmt.Fällt der Graph von \(f'\) (negative Steigung), ist \(f'' < 0\) und damit ist \(f\) rechtsgekrümmt.Die Extremstellen von \(f'\) markieren die Wendepunkte von \(f\).

Theoretischer HintergrundWenn der Graph der ersten Ableitung \(f'\) gegeben ist, gilt für die ursprüngliche Funktion \(f\):Linksgekrümmt: Wo \(f'\) monoton steigend ist.Rechtsgekrümmt: Wo \(f'\) monoton fallend ist.Analyse der Teilaufgabena) Analyse von \(f'\) (Parabel)Der Graph von \(f'\) ist eine nach oben geöffnete Parabel mit dem Scheitelpunkt (Tiefpunkt) bei ca. \(x = 1,5\).Rechtsgekrümmt: \(f\) ist rechtsgekrümmt für \(x < 1,5\), da \(f'\) dort fällt.Linksgekrümmt: \(f\) ist linksgekrümmt für \(x > 1,5\), da \(f'\) dort steigt.

# Rekonstruktion einer beispielhaften Funktion f, deren Ableitung f' so aussieht
f_a <- function(x) (1/3)*x^3 - 1.5*x^2 + x 
ggplot(data.frame(x = c(-1, 4)), aes(x = x)) +
  stat_function(fun = f_a, color = "darkgreen", size = 1) +
  geom_vline(xintercept = 1.5, linetype = "dotted", color = "red") +
  ggtitle("Beispielhafter Graph von f zu Aufgabe a (WP bei x ≈ 1,5)") +
  theme_minimal()

  1. Analyse von \(f'\) (W-Form)Der Graph von \(f'\) hat einen Tiefpunkt bei \(x = 0,25\), einen Hochpunkt bei \(x = 1\) und einen weiteren Tiefpunkt bei \(x = 1,75\) (geschätzte Werte).Rechtsgekrümmt: \(x \in ]-\infty; 0,25]\) und \(x \in [1; 1,75]\).Linksgekrümmt: \(x \in [0,25; 1]\) und \(x \in [1,75; \infty[\).
# Qualitative Skizze von f
f_b <- function(x) 0.25*x^5 - 1.25*x^4 + 2*x^3 - x^2 
ggplot(data.frame(x = c(-0.5, 2.5)), aes(x = x)) +
  stat_function(fun = f_b, color = "darkgreen") +
  geom_vline(xintercept = c(0.25, 1, 1.75), linetype = "dotted", color = "red") +
  ggtitle("Beispielhafter Graph von f zu Aufgabe b") +
  theme_minimal()

  1. Analyse von \(f'\) (Sättigungsfunktion/Logarithmus-ähnlich)Der Graph von \(f'\) steigt im gesamten sichtbaren Bereich monoton an.Analyse: Da \(f'\) überall steigt, ist \(f''\) überall positiv.Krümmung: Die Funktion \(f\) ist im gesamten Bereich linksgekrümmt.
# Da f' steigt, könnte f eine nach oben geöffnete Kurve sein (z.B. Parabel-ähnlich)
f_c <- function(x) x^2 + 2*x 
ggplot(data.frame(x = c(-2, 2.5)), aes(x = x)) +
  stat_function(fun = f_c, color = "darkgreen") +
  ggtitle("Beispielhafter Graph von f zu Aufgabe c (Überall linksgekrümmt)") +
  theme_minimal()

Aufgabe 8

Mathematische VorgehensweiseFür jede Funktion bestimmen wir \(f''(x)\). Die Intervalle werden wie folgt eingeteilt:Linksgekrümmt (konvex): \(f''(x) > 0\)Rechtsgekrümmt (konkav): \(f''(x) < 0\)Aufgaben und Lösungena) \(f(x) = x^4 - 2x^2 + 1\)Ableitungen: \(f'(x) = 4x^3 - 4x\), \(f''(x) = 12x^2 - 4\).Nullstellen von \(f''\): \(12x^2 - 4 = 0 \Rightarrow x^2 = \frac{1}{3} \Rightarrow x \approx \pm 0,58\).Intervalle:\(]-\infty; -0,58]\) und \([0,58; \infty[\): Linksgekrümmt (\(f'' > 0\))\([-0,58; 0,58]\): Rechtsgekrümmt (\(f'' < 0\))

f_8a <- function(x) x^4 - 2*x^2 + 1
ggplot(data.frame(x = c(-2, 2)), aes(x = x)) +
  stat_function(fun = f_8a, color = "blue", size = 1) +
  geom_vline(xintercept = c(-sqrt(1/3), sqrt(1/3)), linetype = "dashed", color = "red") +
  ggtitle("a) f(x) = x^4 - 2x^2 + 1") + theme_minimal()

  1. \(f(x) = x^3 - 6x^2 + 9x\)Ableitungen: \(f'(x) = 3x^2 - 12x + 9\), \(f''(x) = 6x - 12\).Nullstelle von \(f''\): \(6x - 12 = 0 \Rightarrow x = 2\).Intervalle:\(]-\infty; 2]\): Rechtsgekrümmt (\(f'' < 0\))\([2; \infty[\): Linksgekrümmt (\(f'' > 0\))
f_8b <- function(x) x^3 - 6*x^2 + 9*x
ggplot(data.frame(x = c(-1, 5)), aes(x = x)) +
  stat_function(fun = f_8b, color = "blue") +
  geom_vline(xintercept = 2, linetype = "dashed", color = "red") +
  ggtitle("b) f(x) = x^3 - 6x^2 + 9x") + theme_minimal()

  1. \(f(x) = x \cdot e^x\)Ableitungen: \(f'(x) = (x+1)e^x\), \(f''(x) = (x+2)e^x\).Analyse: Da \(e^x\) immer positiv ist, hängt das Vorzeichen von \((x+2)\) ab.Intervalle:\(]-\infty; -2]\): Rechtsgekrümmt (\(x+2 < 0\))\([-2; \infty[\): Linksgekrümmt (\(x+2 > 0\))
f_8c <- function(x) x * exp(x)
ggplot(data.frame(x = c(-5, 1)), aes(x = x)) +
  stat_function(fun = f_8c, color = "blue") +
  geom_vline(xintercept = -2, linetype = "dashed", color = "red") +
  ggtitle("c) f(x) = x * e^x") + theme_minimal()

  1. \(f(x) = \sin(x) + \cos(x)\) für \(x \in [0; 2\pi]\)Ableitungen: \(f'(x) = \cos(x) - \sin(x)\), \(f''(x) = -\sin(x) - \cos(x)\).Nullstellen von \(f''\): \(-\sin(x) = \cos(x) \Rightarrow \tan(x) = -1 \Rightarrow x = \frac{3\pi}{4}\) und \(x = \frac{7\pi}{4}\).Intervalle:\([0; \frac{3\pi}{4}]\) und \([\frac{7\pi}{4}; 2\pi]\): Rechtsgekrümmt (\(f'' < 0\))\([\frac{3\pi}{4}; \frac{7\pi}{4}]\): Linksgekrümmt (\(f'' > 0\))
f_8d <- function(x) sin(x) + cos(x)
ggplot(data.frame(x = c(0, 2*pi)), aes(x = x)) +
  stat_function(fun = f_8d, color = "blue") +
  geom_vline(xintercept = c(3*pi/4, 7*pi/4), linetype = "dashed", color = "red") +
  ggtitle("d) f(x) = sin(x) + cos(x)") + theme_minimal()