In [162]:
%matplotlib notebook
#init_session(use_unicode=True)
from __future__ import division
from sympy import *
x, y, z, t = symbols('x y z t', real=True)
k, m, n = symbols('k m n', integer=True)
f, g, h = symbols('f g h', cls=Function)
init_printing()
To run a cell: Shift+Enter.
To print:
Print your name using print function.
Example: print("Ali bin Ahmad")
In [ ]:
Print your student id using print function.
In [ ]:
Define function f.
Example: f = x + 4
In [ ]:
x-intercepts. When $y=0$, $x=?$.
Use function solve (Sympy Docs pg. 1462).
In [ ]:
x-intercept:
Answer:
y-intercepts. When $x=0$, $y=?$
Use function subs (Sympy Docs pg. 15).
In [ ]:
y-intercept:
Answer:
Find the first derivative, $f'(x)$, and assign it to variable called f1.
Use function diff (Sympy Docs pg. 37).
Print f1 using function pprint (Sympy Docs pg. 22).
In [ ]:
Solve $f'(x)=0$.
Use function solve (Sympy Docs pg. 1462).
In [ ]:
Critical value:
Answer: x=0
$f'(x<c)$
Use function subs (Sympy Docs pg. 15).
In [ ]:
The function is
Answer:
$f'(x>c)$
Use function subs (Sympy Docs pg. 15).
In [ ]:
The function is
Answer:
Find the second derivative, $f''(x)$, and assign it to variable called f2.
Use function diff (Sympy Docs pg. 37).
Print f2 using function pprint.
In [ ]:
Find the value of $f''$ at the critical value.
Use function subs (Sympy Docs pg. 15).
In [ ]:
The point is (maximum / minimum / neither)
Answer:
Solve the second derivative equation for $x$.
Use function solve (Sympy Docs pg. 1462).
In [ ]:
$f''(x < c)$
Use function subs (Sympy Docs pg. 15).
In [ ]:
The function is
Answer:
$f''(x > c)$
Use function subs (Sympy Docs pg. 15).
In [ ]:
The function is
Answer:
Use function plot to plot the function (Sympy Docs pg. 1264).
In [ ]: