Die vollständige Aufgabenstellung inklusive des Graphen von \(f(x)\) ist nachfolgend direkt im Bericht sichtbar:
Gesucht ist die Stammfunktion \(F\) mit \(F(0)=1\). Es gilt \(F'(x) = f(x)\).
| Eigenschaft von \(f(x)\) (im Graphen) | Konsequenz für \(F(x)\) (zu skizzieren) |
|---|---|
| \(f(x) > 0\) (oberhalb x-Achse) | \(F(x)\) steigt streng monoton |
| \(f(x) < 0\) (unterhalb x-Achse) | \(F(x)\) fällt streng monoton |
| \(f(x) = 0\) (Nullstelle) | \(F(x)\) hat Hoch- oder Tiefpunkt (waagrechte Tangente) |
| \(f(x)\) hat Extremum | \(F(x)\) hat Wendepunkt (steilster Anstieg/Abfall) |
| Startbedingung | Der Graph muss durch den Punkt \((0|1)\) gehen. |
Wir modellieren die Funktion aus dem Graphen (sinusförmig, Amplitude 2, Periode 6) und berechnen die exakte Stammfunktion.
# 1. Paket laden
library(ggplot2)
# 2. Funktionen definieren
f <- function(x) {
2 * sin((pi/3) * x)
}
C_const <- 1 + (6/pi)
F <- function(x) {
-(6/pi) * cos((pi/3) * x) + C_const
}
# 3. Daten vorbereiten
x_werte <- seq(-7, 7, length.out = 1000)
daten <- data.frame(
x = x_werte,
f_x = f(x_werte),
F_x = F(x_werte)
)
# 4. Plot erstellen
ggplot(daten, aes(x = x)) +
geom_line(aes(y = f_x, color = "f(x) (gegeben)"), linewidth = 1) +
geom_line(aes(y = F_x, color = "F(x) (gesucht)"), linewidth = 1, linetype = "dashed") +
geom_point(aes(x = 0, y = 1), color = "red", size = 3) +
geom_vline(xintercept = 0, linetype = "dotted", color = "gray") +
geom_hline(yintercept = 0, linetype = "dotted", color = "gray") +
labs(
title = "Graph von f(x) und ihrer Stammfunktion F(x)",
subtitle = "Bedingung: F(0) = 1",
x = "x",
y = "y",
color = "Funktion"
) +
scale_color_manual(values = c("f(x) (gegeben)" = "blue", "F(x) (gesucht)" = "darkred")) +
theme_minimal() +
theme(legend.position = "bottom")