Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
51 views
ubuntu2204
Kernel: SageMath 10.1
## cos z lekicji a=solve(x^3-3*x^2==x*2-6,x) a
[x == -sqrt(2), x == sqrt(2), x == 3]
#zadanie 1 a) p1 = plot(-1/2*x + 1, (x, -10, 10), color='red', title='Funkcja liniowa malejąca ($a < 0$)', legend_label='$y = -\\dfrac{1}{2}x + 1$') p2 = plot(3*x^2+2*x-2, (x, -10, 10), color='blue', title='fukcja kwadratowa ($a>0$)', legend_label='$y=3x^2+2x-2$') p3 = plot((2*x+1)/(x-1), (x, -10, 10), detect_poles=True, title='wykres funkcji homograficznej',color='green', legend_label='$y = \\dfrac{2x+2}{x-3}$') aspion = line([(1, -11), (1, 11)], color='blue', linestyle='--') aspoz = plot(2,(x, -10, 10), color='red', linestyle='--') p3l = aspion + aspoz + p3 p4 = plot(real_nth_root(4*x-2, 3), (x, -10, 10), color='purple', title='funkcja niewymierna', legend_label='$y= \\sqrt[3]{4x-2}$') p5 = plot(exp(x), (x, -10, 10), color='yellow', title='funkcja wykładnicza', legend_label='$y=e^x$') p6 = plot(log(x), (x, -10, 25), color='lightblue', title='funkcja logarytmiczna', legend_label='$y=\\ln x$') grid = graphics_array([[p1,p2,p3l], [p4,p5,p6]]) show(grid, ymin=-10, ymax=10, frame=True, gridlines=True, aspect_ratio=1, figsize=[11, 6])
verbose 0 (3935: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 57 points. verbose 0 (3935: plot.py, generate_plot_points) Last error message: 'Unable to compute f(-0.2000650301931223)'
Image in a Jupyter notebook
#zadanie 1 b) h(x)=(2*x+1)/(x-1) h1(x)=(x+3)/(x) h3(x)=(3*x)/(x-3) plot([h, h1, h3], (x, -10, 10), legend_label=['$y = \\dfrac{2x+1}{x-1}$','$y = \\dfrac{x+3}{x}$','$y = \\dfrac{3x}{x-3}$'], title='Tytuł', gridlines=True, detect_poles=True, ymin=-10, ymax=10, aspect_ratio=0.6, figsize=8)
Image in a Jupyter notebook
#zadanie 2 from math import exp # Funkcja def f(x): return (3 - 3 * exp(x)) / (2 + 2 * exp(x)) # Wyznaczanie dziedziny funkcji def domain_f(): return "Dziedzina funkcji obejmuje wszystkie liczby rzeczywiste." # Testowanie print("Dziedzina funkcji:", domain_f())
Dziedzina funkcji: Dziedzina funkcji obejmuje wszystkie liczby rzeczywiste.