Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: MATH 205L
Views: 76

1

Use Newton's Method with 5 iterations

f(x)=4*x^3-9*x^2+10 plot(f,xmin=-2,xmax=0,ymin=-5,ymax=5) df(x)=derivative(f,x) r=-1 n=5 for i in range(n): r=r-f(r)/df(r) N(r)
-0.900000000000000 -0.892052469135802 -0.892003706245178 -0.892003704415253 -0.892003704415253

2

Find dy/dxdy/dx when x2+xy+y2=x2y2x^2+xy+y^2= x^2y^2

%var y y=function('y',x) solve(derivative(x^3-3*y^2==4*x+2*y,x),derivative(y,x)) show(_)
Error in lines 3-3 Traceback (most recent call last): File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 905, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/calculus/functional.py", line 130, in derivative return f.derivative(*args, **kwds) File "sage/symbolic/expression.pyx", line 3765, in sage.symbolic.expression.Expression.derivative (/projects/sage/sage-6.10/src/build/cythonized/sage/symbolic/expression.cpp:22854) return multi_derivative(self, args) File "sage/misc/derivative.pyx", line 222, in sage.misc.derivative.multi_derivative (/projects/sage/sage-6.10/src/build/cythonized/sage/misc/derivative.c:2861) F = F._derivative(arg) File "sage/symbolic/expression.pyx", line 3833, in sage.symbolic.expression.Expression._derivative (/projects/sage/sage-6.10/src/build/cythonized/sage/symbolic/expression.cpp:23333) raise TypeError("argument symb must be a symbol") TypeError: argument symb must be a symbol

3

Suppose that x, y, and z are all functions of t, and x3+y3=z3x^3+y^3=z^3

%var t x=function('x',t) y=function('y',t) z=function('z',t) solve(derivative(x+y==2*x*y*z,t),derivative(z,t)) show(_) solve(derivative(x+y==2*x*y*z,t),derivative(y,t)) show(_) solve(derivative(x+y==2*x*y*z,t),derivative(x,t)) show(_)
[D[0](z)(t) == -1/2*((2*y(t)*z(t) - 1)*D[0](x)(t) + (2*x(t)*z(t) - 1)*D[0](y)(t))/(x(t)*y(t))]
[D[0](z)(t)=(2y(t)z(t)1)D[0](x)(t)+(2x(t)z(t)1)D[0](y)(t)2x(t)y(t)\displaystyle D[0]\left(z\right)\left(t\right) = -\frac{{\left(2 \, y\left(t\right) z\left(t\right) - 1\right)} D[0]\left(x\right)\left(t\right) + {\left(2 \, x\left(t\right) z\left(t\right) - 1\right)} D[0]\left(y\right)\left(t\right)}{2 \, x\left(t\right) y\left(t\right)}]
[D[0](y)(t) == -(2*x(t)*y(t)*D[0](z)(t) + (2*y(t)*z(t) - 1)*D[0](x)(t))/(2*x(t)*z(t) - 1)]
[D[0](y)(t)=2x(t)y(t)D[0](z)(t)+(2y(t)z(t)1)D[0](x)(t)2x(t)z(t)1\displaystyle D[0]\left(y\right)\left(t\right) = -\frac{2 \, x\left(t\right) y\left(t\right) D[0]\left(z\right)\left(t\right) + {\left(2 \, y\left(t\right) z\left(t\right) - 1\right)} D[0]\left(x\right)\left(t\right)}{2 \, x\left(t\right) z\left(t\right) - 1}]
[D[0](x)(t) == -(2*x(t)*y(t)*D[0](z)(t) + (2*x(t)*z(t) - 1)*D[0](y)(t))/(2*y(t)*z(t) - 1)]
[D[0](x)(t)=2x(t)y(t)D[0](z)(t)+(2x(t)z(t)1)D[0](y)(t)2y(t)z(t)1\displaystyle D[0]\left(x\right)\left(t\right) = -\frac{2 \, x\left(t\right) y\left(t\right) D[0]\left(z\right)\left(t\right) + {\left(2 \, x\left(t\right) z\left(t\right) - 1\right)} D[0]\left(y\right)\left(t\right)}{2 \, y\left(t\right) z\left(t\right) - 1}]