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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
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()
# 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()
# 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()
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()
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()
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()