Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download

Jupyter notebook 0201 Funciones y graficas.ipynb

Views: 41
Kernel: SageMath 6.10
""" ¿Cu ́al es el dominio y el rango de y = x**2 + 2? """ x,y=var("x,y") f(x)=x**2+2 r=2 grafica = plot(f, (-r,r)) M=f(r) region = region_plot(y>2, (x, -r, r), (y, 0, M), incol='pink', bordercol='red', borderstyle='dashed', plot_points=250,aspect_ratio=1) show(grafica+region)
Image in a Jupyter notebook
""" ¿Cual es el dominio y el rango de y = 1/(x-3)? """ x=var("x") f(x)=1/(x-3) r=8 grafica = plot(f, (3-r,3+r), legend_label='$1/(x-3)$')+plot(0, (3-r,3+r), color=hue(0.9), thickness=3) #ejex = plot(const, (3-r,3+r), color="red").show(ymin = -5, ymax = 5) #region = region_plot(y>2, (x, -r, r), (y, -M, M), incol='pink', bordercol='red', borderstyle='dashed', plot_points=250,aspect_ratio=1) grafica.show(ymin = -5, ymax = 5)
Image in a Jupyter notebook
x=var("x") f(x)=x^2 R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x-2),(-R,R),legend_label=str(f(x-2)), color="red") plt3=plot(f(x+1),(-R,R),legend_label=str(f(x+1)), color="green") (plt1+plt2+plt3).show()
Image in a Jupyter notebook
x=var("x") f(x)=3*x R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x-2),(-R,R),legend_label=str(f(x-2)), color="red") plt3=plot(f(x+1),(-R,R),legend_label=str(f(x+1)), color="green") (plt1+plt2+plt3).show()
Image in a Jupyter notebook
x=var("x") f(x)=2/x R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x-2),(-R,R),legend_label=str(f(x-2)), color="red") plt3=plot(f(x+1),(-R,R),legend_label=str(f(x+1)), color="green") (plt1+plt2+plt3).show(ymin = -5, ymax = 5)
Image in a Jupyter notebook
x=var("x") f(x)=sqrt(x) R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x-2),(-R,R),legend_label=str(f(x-2)), color="red") plt3=plot(f(x+1),(-R,R),legend_label=str(f(x+1)), color="green") (plt1+plt2+plt3).show()
verbose 0 (3531: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 100 points. verbose 0 (3531: plot.py, generate_plot_points) Last error message: 'math domain error' verbose 0 (3531: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 140 points. verbose 0 (3531: plot.py, generate_plot_points) Last error message: 'math domain error' verbose 0 (3531: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 80 points. verbose 0 (3531: plot.py, generate_plot_points) Last error message: 'math domain error'
Image in a Jupyter notebook
x=var("x") f(x)=x^2 R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x)+2,(-R,R),legend_label=str(f(x)+2), color="red") plt3=plot(f(x)-1,(-R,R),legend_label=str(f(x)-1), color="green") (plt1+plt2+plt3).show()
Image in a Jupyter notebook
x=var("x") f(x)=3*x R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x)+2,(-R,R),legend_label=str(f(x)+2), color="red") plt3=plot(f(x)-1,(-R,R),legend_label=str(f(x)-1), color="green") (plt1+plt2+plt3).show()
Image in a Jupyter notebook
x=var("x") f(x)=2/x R=100 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x)+2,(-R,R),legend_label=str(f(x)+2), color="red") plt3=plot(f(x)-1,(-R,R),legend_label=str(f(x)-1), color="green") (plt1+plt2+plt3).show(ymin=-5, ymax=5)
Image in a Jupyter notebook
x=var("x") f(x)=sqrt(x) R=5 plt1=plot(f(x),(-R,R),legend_label=str(f(x)), color="blue") plt2=plot(f(x)+2,(-R,R),legend_label=str(f(x)+2), color="red") plt3=plot(f(x)-1,(-R,R),legend_label=str(f(x)-1), color="green") (plt1+plt2+plt3).show(ymin=-2, ymax=5)
verbose 0 (3531: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 100 points. verbose 0 (3531: plot.py, generate_plot_points) Last error message: 'math domain error' verbose 0 (3531: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 100 points. verbose 0 (3531: plot.py, generate_plot_points) Last error message: 'math domain error' verbose 0 (3531: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 100 points. verbose 0 (3531: plot.py, generate_plot_points) Last error message: 'math domain error'
Image in a Jupyter notebook