Math 172 - IN1 Course Folder-collect / Project 3 - Trig part 2 / 4cbb13a3-92f0-488d-aefa-7ba8ae6f4bc2 / Step 1 - Modeling with trig function.sagews
4218 viewsSyracuse weather data (month, max temp): (1, 32),(2,34),(3,43),(4,57),(5,69),(6,78),(7,82),(8,80),(9,72),(10,60),(11,48),(12,36)
25.61099628075631*sin(0.5089522520223427*x - 2.068485038219847) + 56.87966137474419
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "sage/misc/lazy_import.pyx", line 354, in sage.misc.lazy_import.LazyImport.__call__ (/ext/sage/sage-8.0/src/build/cythonized/sage/misc/lazy_import.c:3559)
return self.get_object()(*args, **kwds)
File "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/numerical/optimize.py", line 685, in find_fit
raise ValueError("no variables given")
ValueError: no variables given
Your turn!
Follow the link http://mathbits.com/MathBits/TISection/Statistics2/sinusoidal.html to find data for the two other cities. Type in the data and create separate scatter plots. Then find the sinusoidal model for each.
Plot the function: f(x)=sin(2x-π)-2, g(x)=-3sec(πx); h(x)=tan(x-π/2) in a single graphing window from [-2π,2π]. Use different colors for each graph!
22.750416739876204*sin(0.4941622370155175*x - 1.947020081527723) + 65.36784787240074
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
NameError: name 'y' is not defined
17.757748190683763*sin(0.5034534732269098*x - 2.004683736962059) + 79.1495989202177
Error in lines 1-1
Traceback (most recent call last):
File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "sage/misc/lazy_import.pyx", line 354, in sage.misc.lazy_import.LazyImport.__call__ (/ext/sage/sage-8.0/src/build/cythonized/sage/misc/lazy_import.c:3559)
return self.get_object()(*args, **kwds)
File "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/numerical/optimize.py", line 685, in find_fit
raise ValueError("no variables given")
ValueError: no variables given