Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Trig function plot

Project: MA1200
Views: 34
Kernel: Python 3 (Anaconda 5)

Graph of trigonometric functions

#packages import numpy as np from sympy import * from sympy.plotting import plot, plot_implicit, plot_parametric
x = symbols('x') plot(sin(x), (x, -pi/2, pi/2))
Image in a Jupyter notebook
<sympy.plotting.plot.Plot at 0x7f8b0107c400>
plot(cos(x), xlim = (-6, 6), ylim = (-1, 1))
Image in a Jupyter notebook
<sympy.plotting.plot.Plot at 0x7f8b0175e7b8>
plot(tan(x), xlim = (-6, 6), ylim = (-2, 2))
Image in a Jupyter notebook
<sympy.plotting.plot.Plot at 0x7f8b016ea358>
f = 2*sin(x - pi/4)+1 plot(f, xlim = (-9, 9))
Image in a Jupyter notebook
<sympy.plotting.plot.Plot at 0x7f8b013d04e0>
p1 = plot(sin(x), (x, -2*pi,2*pi)) p2 = plot(cos(x), (x, -2*pi,2*pi)) p1.extend(p2) p1
Image in a Jupyter notebookImage in a Jupyter notebook
<sympy.plotting.plot.Plot at 0x7f8b055ad198>
3524 + 25 + 26**2
4225