vault backup: 2026-02-21 22:40:01
This commit is contained in:
parent
980e3084d6
commit
2a0115528a
4
Estudos/Cálculo/.vscode/settings.json
vendored
Normal file
4
Estudos/Cálculo/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"python-envs.defaultEnvManager": "ms-python.python:system",
|
||||||
|
"python-envs.pythonProjects": []
|
||||||
|
}
|
||||||
36
Estudos/Cálculo/3_graph.py
Normal file
36
Estudos/Cálculo/3_graph.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import numpy as np
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
|
||||||
|
# f(x) = sqrt(2(x^2 - 8)) + x, for x < -4
|
||||||
|
# f(x) = 2^(x+4), for x >= -4
|
||||||
|
|
||||||
|
x1 = np.linspace(-12, -4, 500, endpoint=False)
|
||||||
|
y1 = np.sqrt(2 * (x1**2 - 8)) + x1
|
||||||
|
|
||||||
|
x2 = np.linspace(-4, 4, 500)
|
||||||
|
y2 = 2 ** (x2 + 4)
|
||||||
|
|
||||||
|
plt.figure(figsize=(8, 5))
|
||||||
|
plt.plot(x1, y1, label=r"$f(x)=\sqrt{2(x^2-8)}+x$, $x<-4$", color="tab:blue")
|
||||||
|
plt.plot(x2, y2, label=r"$f(x)=2^{x+4}$, $x\\ge -4$", color="tab:orange")
|
||||||
|
|
||||||
|
# Open circle at x = -4 for first branch
|
||||||
|
y_left_limit = np.sqrt(2 * ((-4) ** 2 - 8)) - 4
|
||||||
|
plt.scatter(-4, y_left_limit, facecolors="white", edgecolors="tab:blue", s=80, zorder=5)
|
||||||
|
|
||||||
|
# Closed circle at x = -4 for second branch
|
||||||
|
y_at_minus4 = 2 ** (0)
|
||||||
|
plt.scatter(-4, y_at_minus4, color="tab:orange", s=80, zorder=5)
|
||||||
|
|
||||||
|
plt.axhline(0, color="black", linewidth=0.8)
|
||||||
|
plt.axvline(0, color="black", linewidth=0.8)
|
||||||
|
plt.grid(True, linestyle="--", alpha=0.5)
|
||||||
|
plt.xlim(-12, 4)
|
||||||
|
plt.ylim(-2, max(y2) * 1.1)
|
||||||
|
plt.title("Graph of the piecewise function f(x)")
|
||||||
|
plt.xlabel("x")
|
||||||
|
plt.ylabel("f(x)")
|
||||||
|
plt.legend()
|
||||||
|
plt.tight_layout()
|
||||||
|
plt.show()
|
||||||
@ -24,6 +24,5 @@ $$
|
|||||||
y'=\small \dfrac{7}{2}. x^2\sqrt{x}+5x^4
|
y'=\small \dfrac{7}{2}. x^2\sqrt{x}+5x^4
|
||||||
$$
|
$$
|
||||||
# 3.
|
# 3.
|
||||||
$$
|
$f(x) = \sqrt{2(x^2 - 8)}+x$ se $x<-4$
|
||||||
\s
|
$f(x) = 2^{x+4}$ se $x\ge-4$
|
||||||
$$
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user