diff --git "a/all/amps_calculus.json" "b/all/amps_calculus.json" deleted file mode 100644--- "a/all/amps_calculus.json" +++ /dev/null @@ -1,98444 +0,0 @@ -{ - "Source": [ - "AMPS.algebra.mathematica/calculus/series_compose" - ], - "Categories": [ - { - "Math complexity": 4, - "Language complexity": 1, - "Domain knowledge complexity": 3 - } - ], - "Instances": [ - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{y}{z}\\right)^{3/2}$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 y \\sqrt{\\frac{y}{z}}}{2 z^2},\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{3 \\sqrt{\\frac{y}{z}}}{2 z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)**(3/2)\ng = cbrt(x)\nh = cbrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{\\cos \\left(\\frac{y}{z}\\right)}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(x^2-3\\right)$\n", - "Output Answer": [ - "$-\\frac{2 \\left(x^4-8\\right)}{\\left(-x^4+6 x^2-8\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(x**2-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\frac{4051 (x+3)}{10}-243-\\tan ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**5\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(x^5+1\\right)^5+\\sqrt{2-2 x}$\n", - "Output Answer": [ - "$25 \\left(x^6+x\\right)^4-\\frac{1}{\\sqrt{2-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((x**5+1)**5+sqrt(2-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y+z}^2},0,3 x^2-\\cos (x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y)\ng = x**3\nh = x**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(\\frac{3}{100}+\\frac{1}{2 e^3}\\right) (x+3)^2+\\left(\\frac{1}{10}+\\frac{1}{e^3}\\right) (x+3)+\\frac{1}{e^3}-\\tan ^{-1}(3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = atan(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(\\frac{26 x}{5}+8\\right)$\n", - "Output Answer": [ - "$-\\frac{80 (13 x+20)}{\\left(52 x^2+160 x+125\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(((26*x)/5)+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x-6} (\\log (5)+i \\pi )$\n", - "Output Answer": [ - "$25 e^{5 x-6} (\\log (5)+i \\pi )$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x-6)*(log(5)+1j*pi)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-(x-y)^2}},-\\frac{1}{\\sqrt{1-(x-y)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\log \\left(x^4-y+z\\right)$, and $h(x,y,z) = -\\tanh ^{-1}\\left(x^4-y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n \\frac{4 x^3}{x^4-y+z} & -\\frac{1}{x^4-y+z} & \\frac{1}{x^4-y+z} \\\\\n -\\frac{4 x^3}{1-\\left(x^4-y\\right)^2} & \\frac{1}{1-\\left(x^4-y\\right)^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = log(x**4-y+z)\nh = -atanh(x**4-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\tan ^{-1}\\left(y+z^5\\right)$, and $h(x,y,z) = \\frac{1}{z^{10}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 0 & \\frac{1}{\\left(y+z^5\\right)^2+1} & \\frac{5 z^4}{\\left(y+z^5\\right)^2+1} \\\\\n 0 & 0 & -\\frac{10}{z^{11}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = atan(y+z**5)\nh = (1/(z**10))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+3)^2 \\left(-\\frac{1}{9}-\\frac{\\sin (3)}{2}\\right)+(x+3) \\left(-\\frac{2}{3}-\\cos (3)\\right)+2 \\log (3)+\\sin (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = sin(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{7-9 x}}{\\left(2 x^2-5\\right)^4}$\n", - "Output Answer": [ - "$\\frac{270 x^2-224 x+45}{2 \\sqrt{7-9 x} \\left(2 x^2-5\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(7-9*x))/((2*x**2-5)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\sin (4 x+5)}$\n", - "Output Answer": [ - "$8 e^{\\sin (4 x+5)} (-2 \\sin (4 x+5)+\\cos (8 x+10)+1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(sin(4*x+5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan \\left(y^2\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 2 y \\sec ^2\\left(y^2\\right) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = tan(y**2)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\tan ^{-1}\\left(x^5\\right)$", - "Output Answer": [ - "$\\frac{1}{x^{9/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = atan(x**5)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$25 e^{5 x^5-8} x^4$\n", - "Output Answer": [ - "$e^{5 x^5-8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 25*math.e**(5*x**5-8)*x**4\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(y+z^4\\right)$, and $h(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{4 z^3 \\sin \\left(y+z^4\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y+z**4)\nh = cos(y+z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**(3/2)\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/x)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(z-x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{x}{y^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{-x+z-1} \\sqrt{-x+z+1}} & 0 & \\frac{1}{\\sqrt{-x+z-1} \\sqrt{-x+z+1}} \\\\\n 0 & 4 y^3 & 0 \\\\\n \\frac{1}{y^4} & -\\frac{4 x}{y^5} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(z-x)\ng = y**4\nh = (x/(y**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-15 (5 x+9)^2$\n", - "Output Answer": [ - "$-125 x^3-675 x^2-1215 x$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -15*(5*x+9)**2\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5-y^4$, $g(x,y,z) = \\log \\left(y^4\\right)$, and $h(x,y,z) = z^{20}$", - "Output Answer": [ - "$\\left\\{0,5 z^4,4 y^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5-y**4\ng = log(y**4)\nh = log(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\left(x^5+z\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & -\\frac{1}{z} \\\\\n 0 & 0 & -\\sin (z) \\\\\n \\frac{15}{2} x^4 \\sqrt{x^5+z} & 0 & \\frac{3 \\sqrt{x^5+z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((y/z))\ng = cos(z)\nh = (x**5+z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y-z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (x y)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y-z)\ng = y\nh = sin(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{1-\\sec ^2(z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-x^4-3\\right)^3 \\cos (5 x+2)$\n", - "Output Answer": [ - "$\\left(x^4+3\\right)^2 \\left(5 \\left(x^4+3\\right) \\sin (5 x+2)-12 x^3 \\cos (5 x+2)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-x**4-3)**3*cos(5*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{y^4}{x}\\right)$, $g(x,y,z) = y^4+z$, and $h(x,y,z) = \\cosh (x)$", - "Output Answer": [ - "$\\left\\{-1,-\\sinh (x),-\\frac{4 y^3}{x \\left(\\frac{y^8}{x^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((y**4)/x)\ng = y**4+z\nh = y**4+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan ^{-1}\\left(x^4\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{4 x^3}{x^8+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = atan(x**4)\nh = atan(x**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x+z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,\\sinh (x+z),0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x+z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y^5-x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{y^5-x}^2} & \\frac{5 y^4}{3 \\sqrt[3]{y^5-x}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = cbrt(y**5-x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(5 x^5-2\\right)+e^{-8 x-5}$\n", - "Output Answer": [ - "$\\frac{25 x^4}{5 x^5-2}-8 e^{-8 x-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x**5-2)+math.e**(-8*x-5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\tan \\left(\\frac{z^5}{y}\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(y z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^y & 0 \\\\\n 0 & -\\frac{z^5 \\sec ^2\\left(\\frac{z^5}{y}\\right)}{y^2} & \\frac{5 z^4 \\sec ^2\\left(\\frac{z^5}{y}\\right)}{y} \\\\\n 0 & -\\frac{z^5}{\\sqrt{1-y^2 z^{10}}} & -\\frac{5 y z^4}{\\sqrt{1-y^2 z^{10}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**y\ng = tan(((z**5)/y))\nh = acos(y*z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{e^{5-5 x}}+e^{6-3 x}$\n", - "Output Answer": [ - "$-5 e^{-5 x+e^{5-5 x}+5}-3 e^{6-3 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(math.e**(5-5*x))+math.e**(6-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3 x-7} \\sin (9 x+9)$\n", - "Output Answer": [ - "$\\frac{3 (\\sin (9 (x+1))+6 (3 x-7) \\cos (9 (x+1)))}{2 \\sqrt{3 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3*x-7)*sin(9*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\frac{1}{625}-\\frac{4 (x-5)}{3125}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = x**5\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = log(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y & x & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{y} & -\\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y\ng = y\nh = log((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{y^3}}$, and $h(x,y,z) = \\frac{x}{y^3}$", - "Output Answer": [ - "$-\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2}-\\frac{3 y^2}{2 \\left(y^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((z/x))\ng = (1/(sqrt(y**3)))\nh = (x/(y**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cosh (z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{-\\sinh (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cosh(z)\nh = cosh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (7 x+8)-\\sin ^{-1}\\left(6 x^2+5\\right)$\n", - "Output Answer": [ - "$-\\frac{12 x}{\\sqrt{1-\\left(6 x^2+5\\right)^2}}-7 \\sin (7 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(7*x+8)-asin(6*x**2+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log \\left(y^4\\right)$, and $h(x,y,z) = \\tan \\left(y^4+z\\right)$", - "Output Answer": [ - "$\\left\\{4 y^3 \\sec ^2\\left(y^4+z\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = log(y**4)\nh = log(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (6 x+3)}{27 x^3}$\n", - "Output Answer": [ - "$-\\frac{\\tan (6 x+3)-2 x \\sec ^2(6 x+3)}{9 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(6*x+3))/(27*x**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = cos(x+y)\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{z}{y^2}+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (z/y)\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (5 x)-\\log \\left(-5 x^3-7\\right)$\n", - "Output Answer": [ - "$-\\frac{5 \\left(-15 x^4+5 \\left(5 x^3+7\\right)^2 \\cos (5 x)+42 x\\right)}{\\left(5 x^3+7\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5*x)-log(-5*x**3-7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(2 x-1)$\n", - "Output Answer": [ - "$\\frac{1-2 x}{2 (-((x-1) x))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{15 x}{2}+7\\right)$\n", - "Output Answer": [ - "$\\frac{225}{4} \\sin \\left(\\frac{15 x}{2}+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(((15*x)/2)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x^5-y\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{375 x^8}{4 \\left(x^5-y\\right)^{7/2}}-\\frac{30 x^3}{\\left(x^5-y\\right)^{5/2}}+\\frac{15}{4 \\left(x^5-y\\right)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**5-y)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{13}{2}-6 x^2\\right)$\n", - "Output Answer": [ - "$12 \\left(1-24 x^2 \\tan \\left(\\frac{13}{2}-6 x^2\\right)\\right) \\sec ^2\\left(\\frac{13}{2}-6 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan((13/2)-6*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5}{y}-z^3$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4}{y},-\\frac{x^5}{y^2},-3 z^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/y)-z**3\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = x+z\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(y^4+z^5\\right)$, $g(x,y,z) = \\tan \\left(\\frac{z^5}{x}\\right)$, and $h(x,y,z) = \\left(x-z^5\\right)^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -4 y^3 \\sin \\left(y^4+z^5\\right) & -5 z^4 \\sin \\left(y^4+z^5\\right) \\\\\n -\\frac{z^5 \\sec ^2\\left(\\frac{z^5}{x}\\right)}{x^2} & 0 & \\frac{5 z^4 \\sec ^2\\left(\\frac{z^5}{x}\\right)}{x} \\\\\n 4 \\left(x-z^5\\right)^3 & 0 & -20 z^4 \\left(x-z^5\\right)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y**4+z**5)\ng = tan(((z**5)/x))\nh = (x-z**5)**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{z^3-y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{1}{2 \\sqrt{z^3-y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(z**3-y)\nh = (1/(sqrt(y)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x^2+y+z\\right)$\n", - "Output Answer": [ - "$\\left\\{2 x \\sec ^2\\left(x^2+y+z\\right),\\sec ^2\\left(x^2+y+z\\right),\\sec ^2\\left(x^2+y+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2+y+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$e^x-\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cos(z)\nh = acos(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{x+y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n \\frac{1}{2 \\sqrt{x+y-z}} & \\frac{1}{2 \\sqrt{x+y-z}} & -\\frac{1}{2 \\sqrt{x+y-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = y**5\nh = sqrt(x+y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y-z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y-z}^2} & -\\frac{1}{3 \\sqrt[3]{y-z}^2} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y-z)\ng = tan(y)\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)} & 0 & \\frac{1}{x \\left(\\frac{z^2}{x^2}+1\\right)} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z/x)\ng = tan(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 0$ on the interval $x = 1$ to $x = 7$\n", - "Output Answer": [ - "$6$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 0\na = 1\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\{0,-\\cos (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cbrt(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2 x+\\frac{4}{5}}+\\cos \\left(\\frac{9 x}{5}+\\frac{17}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{\\left(2 x+\\frac{4}{5}\\right)^{3/2}}-\\frac{81}{25} \\cos \\left(\\frac{1}{5} (9 x+17)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2*x+(4/5))+cos(((9*x)/5)+(17/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x z^4}{y}\\right)$", - "Output Answer": [ - "$-\\frac{x z^{12}}{y^3 \\left(1-\\frac{x^2 z^8}{y^2}\\right)^{3/2}}-\\frac{x^3 z^{12}}{y^5 \\left(1-\\frac{x^2 z^8}{y^2}\\right)^{3/2}}-\\frac{16 x^3 z^{10}}{y^3 \\left(1-\\frac{x^2 z^8}{y^2}\\right)^{3/2}}-\\frac{2 x z^4}{y^3 \\sqrt{1-\\frac{x^2 z^8}{y^2}}}-\\frac{12 x z^2}{y \\sqrt{1-\\frac{x^2 z^8}{y^2}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos((x*z**4)/y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y}-\\frac{1}{x},\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((z/y))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\frac{z^5}{y^5}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{-\\frac{5 z^4}{y^5}-\\sin (y),0,-x \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = ((z**5)/(y**5))\nh = ((z**5)/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{x}-3 y^2 \\sin \\left(y^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cos(y**3)\nh = (z/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\sqrt[3]{z (x+y)}$, and $h(x,y,z) = \\tanh (x+z)$", - "Output Answer": [ - "$\\frac{z}{3 \\sqrt[3]{z (x+y)}^2}+\\text{sech}^2(x+z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = cbrt(z*(x+y))\nh = tanh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = x+z$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\left\\{-1,\\frac{1}{\\sqrt{1-z^2}}-\\frac{3}{2} z \\sqrt{x z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = x+z\nh = x+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{20}{3}-\\frac{11 x^4}{3}}$\n", - "Output Answer": [ - "$\\frac{22 x^2 \\left(60-11 x^4\\right)}{\\sqrt{60-33 x^4} \\left(11 x^4-20\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt((20/3)-((11*x**4)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,-\\frac{1}{x^2}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (1/x)\nh = (1/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = -\\sin ^{-1}(x-y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{1}{\\sqrt{1-(x-y)^2}} & \\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = -asin(x-y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(x^2+1\\right)^5}$\n", - "Output Answer": [ - "$\\frac{10 \\left(11 x^2-1\\right)}{\\left(x^2+1\\right)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((x**2+1)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sin(y)\nh = sin((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left\\{e^{y+z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left\\{-e^z,-\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y},-\\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((z/y))\ng = math.e**z\nh = math.e**z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-z)^2$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\{0,1-2 (y-z),-2 (y-z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-z)**2\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x+y^2\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{0,-1,-\\frac{2 y}{x+y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y**2)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = (x-y)^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-5 (x-y)^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/y))\ng = (x-y)**5\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\sqrt{3-7 x}\\right)$\n", - "Output Answer": [ - "$\\frac{49}{4} \\left(\\frac{\\sin \\left(\\sqrt{3-7 x}\\right)}{(3-7 x)^{3/2}}+\\frac{\\cos \\left(\\sqrt{3-7 x}\\right)}{7 x-3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(sqrt(3-7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-9 x-5)^3}$\n", - "Output Answer": [ - "$-\\frac{972}{(9 x+5)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-9*x-5)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{z}\\right)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y}{z^2 \\left(\\frac{y^2}{z^2}+1\\right)},-\\frac{1}{z \\left(\\frac{y^2}{z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y/z)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x y+z)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{(x+y)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\cos (x y+z) & x \\cos (x y+z) & \\cos (x y+z) \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*y+z)\ng = atanh(y)\nh = (1/((x+y)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$5 x^4 \\sec ^2\\left(x^5\\right)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(z^3 \\left(x^4-y\\right)\\right)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 z^3 \\sin \\left(z^3 \\left(x^4-y\\right)\\right) & z^3 \\sin \\left(z^3 \\left(x^4-y\\right)\\right) & -3 z^2 \\left(x^4-y\\right) \\sin \\left(z^3 \\left(x^4-y\\right)\\right) \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z**3*(x**4-y))\ng = (1/y)\nh = cos(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4-x}-\\tan (2 x+1)$\n", - "Output Answer": [ - "$e^{4-x}-8 \\tan (2 x+1) \\sec ^2(2 x+1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4-x)-tan(2*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = sqrt(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^3-y+z}$", - "Output Answer": [ - "$-\\frac{9 x^4}{4 \\left(x^3-y+z\\right)^{3/2}}+\\frac{3 x}{\\sqrt{x^3-y+z}}-\\frac{1}{2 \\left(x^3-y+z\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**3-y+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{x}{z}\\right)^{3/2}$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 x \\sqrt{\\frac{x}{z}}}{2 z^2},\\frac{1}{2 \\sqrt{x+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)**(3/2)\ng = sqrt(x+y)\nh = sqrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (y+z)^2$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 (y+z) & 2 (y+z) \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y+z)**2\ng = tan(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x^5-\\frac{13}{3}}-\\sin (8-4 x)$\n", - "Output Answer": [ - "$15 e^{3 x^5-\\frac{13}{3}} x^4+4 \\cos (8-4 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x**5-(13/3))-sin(8-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 e^{x^3} x^2 & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x**3)\ng = atan(y)\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = z^6$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{3 \\sqrt[3]{x+y}^2}+6 z^5$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cbrt(x+y)\nh = z**6\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\sqrt{-4 x-2}\\right)+\\tan (5 x+7)$\n", - "Output Answer": [ - "$\\frac{1}{2 x+1}+5 \\sec ^2(5 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(sqrt(-4*x-2))+tan(5*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^5-y\\right)$, $g(x,y,z) = -\\sinh ^{-1}\\left(x^5-z\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\frac{5 x^4}{x^5-y}-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**5-y)\ng = -asinh(x**5-z)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = y\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(x+z)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x^2+1}} & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(x)\ng = asin(x+z)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^2}{z^{10}}$, $g(x,y,z) = y^2$, and $h(x,y,z) = e^{x/y}$", - "Output Answer": [ - "$\\left\\{-\\frac{x e^{x/y}}{y^2},-\\frac{10 x^2}{z^{11}}-\\frac{e^{x/y}}{y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**2)/(z**10))\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{y \\sin \\left(\\frac{y}{z}\\right)}{z^2},-\\text{sech}^2(x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos((y/z))\nh = cos((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x-6} (6 x-7)^4$\n", - "Output Answer": [ - "$e^{7 x-6} (6 x-7)^3 (42 x-25)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x-6)*(6*x-7)**4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-3 (x+3) \\left(3+3 \\cot ^2(3)-2 \\cot (3)\\right)-9 \\cot (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = tan(x)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(z (x-y))$, $g(x,y,z) = \\cos ^{-1}(z-x)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{\\sqrt{1-z^2 (x-y)^2}} & -\\frac{z}{\\sqrt{1-z^2 (x-y)^2}} & \\frac{x-y}{\\sqrt{1-z^2 (x-y)^2}} \\\\\n \\frac{1}{\\sqrt{1-(z-x)^2}} & 0 & -\\frac{1}{\\sqrt{1-(z-x)^2}} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(z*(x-y))\ng = acos(z-x)\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-\\sin (y)-2 z \\sin \\left(z^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = cos(y)\nh = cos(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log \\left(x y^4-z\\right)$, and $h(x,y,z) = \\sqrt{z \\left(x-y^4\\right)}$", - "Output Answer": [ - "$\\frac{4 x y^3}{x y^4-z}+\\frac{x-y^4}{2 \\sqrt{z \\left(x-y^4\\right)}}+\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(x*y**4-z)\nh = sqrt(z*(x-y**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{\\cos \\left(\\frac{y}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((y/x))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = cos((z/x))\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan (x y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n y z \\sec ^2(x y z) & x z \\sec ^2(x y z) & x y \\sec ^2(x y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y*z)\ng = log(y)\nh = tan(x*y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(9 x^5+4\\right)+e^{4 x-2}$\n", - "Output Answer": [ - "$45 x^4 \\cos \\left(9 x^5+4\\right)+4 e^{4 x-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(9*x**5+4)+math.e**(4*x-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\tanh (x-y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\text{sech}^2(x-y)+\\frac{3 \\sqrt{z}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = -tanh(x-y)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh \\left(x^5\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(x^5+z\\right)$, and $h(x,y,z) = \\sqrt[3]{x^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 \\cosh \\left(x^5\\right) & 0 & 0 \\\\\n \\frac{5 x^4}{\\left(x^5+z\\right)^2+1} & 0 & \\frac{1}{\\left(x^5+z\\right)^2+1} \\\\\n \\frac{5 x^4}{3 \\sqrt[3]{x^5}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x**5)\ng = atan(x**5+z)\nh = cbrt(x**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}} & \\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}} & 0 \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y/x)\ng = log(x+y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$(x+3) (27+6 \\sin (9))-27+\\cos (9)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = cos(x**2)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{12}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(x^3 y\\right)$", - "Output Answer": [ - "$12 x^{11}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**12\ng = sqrt(y)\nh = cos(x**3*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x^3$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x**3\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x^4}{y}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((x**4)/y))\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z^5}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-y^2}}-\\frac{1}{y},0,-\\frac{3 \\sqrt{y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = (z/y)\nh = (z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{9 x+8} \\sin \\left(5 x^3\\right)$\n", - "Output Answer": [ - "$-3 e^{9 x+8} \\left(3 \\sin \\left(5 x^3\\right)+5 x^2 \\cos \\left(5 x^3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(9*x+8)*sin(5*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(y^5\\right)$, $g(x,y,z) = \\sqrt[3]{z^5}$, and $h(x,y,z) = \\log \\left(z^5\\right)$", - "Output Answer": [ - "$\\frac{5}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y**5)\ng = cbrt(z**5)\nh = log(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin ^{-1}(y-z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asin(y-z)\ng = sin(y)\nh = x-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^2\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{(y-z)^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{(y-z)^3},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**2)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**(3/2)))\ng = sqrt(y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{x^2-5}$\n", - "Output Answer": [ - "$\\frac{2 \\left(3 x^2+5\\right)}{\\left(x^2-5\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(x**2-5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y^4}$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{2 y^3}{\\sqrt{y^4}} & 0 \\\\\n 0 & 4 y^3 \\sec ^2\\left(y^4\\right) & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y**4)\ng = tan(y**4)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = (x-z)^2$", - "Output Answer": [ - "$\\left\\{0,2 (z-x),-\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = acos(x)\nh = acos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(\\frac{13}{2}-x\\right)$\n", - "Output Answer": [ - "$\\frac{16 (2 x-13)}{\\left(4 x^2-52 x+173\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan((13/2)-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x-y+z)$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\text{sech}^2(x-y+z)+\\sin (x-y)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x-y+z)\ng = cos(x-y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(\\sin \\left(5 x^4+4\\right)\\right)-\\cos (2-3 x)$\n", - "Output Answer": [ - "$-20 x^3 \\cos \\left(5 x^4+4\\right) \\cos \\left(\\sin \\left(5 x^4+4\\right)\\right)-3 \\sin (2-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(sin(5*x**4+4))-cos(2-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = asin(z)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6-4 x)+\\sin (9-3 x)$\n", - "Output Answer": [ - "$-4 \\cos (6-4 x)-3 \\cos (9-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6-4*x)+sin(9-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{0,0,\\frac{4 z^3}{z^8+1}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z**4)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-2 x}+\\cos (7 x+1)$\n", - "Output Answer": [ - "$4 e^{-2 x}-49 \\cos (7 x+1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-2*x)+cos(7*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = y\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^{2 x}$ on the interval $x = 0$ to $x = 8$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(-\\sqrt{5}+\\sqrt{1+4 e^{32}}+\\tanh ^{-1}\\left(\\sqrt{5}\\right)-\\tanh ^{-1}\\left(\\sqrt{1+4 e^{32}}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x)\na = 0\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y+z)\ng = (z/y)\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-3 x-3}$\n", - "Output Answer": [ - "$-3 e^{-3 (x+1)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-3*x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y z}}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\cosh (x)-\\frac{z}{2 (y z)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = (1/(sqrt(y*z)))\nh = cbrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{6 x-2}}{\\left(3-6 x^3\\right)^2}$\n", - "Output Answer": [ - "$\\frac{2 e^{6 x-2} \\left(2 x^3-2 x^2-1\\right)}{3 \\left(2 x^3-1\\right)^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(6*x-2))/((3-6*x**3)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{13 x}{2}+\\frac{7}{2}\\right)+\\cos \\left(\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{13}{2} \\sin \\left(\\frac{1}{2} (13 x+7)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((13*x)/2)+(7/2))+cos((15/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^2$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = \\sinh (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 y & 0 \\\\\n -\\frac{2}{x^3} & 0 & 0 \\\\\n \\cosh (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**2\ng = (1/(x**2))\nh = sinh(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\sin (x z)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n \\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)} & 0 & -\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = sin(x*z)\nh = atan(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(\\frac{15}{2}-\\frac{17 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{1156 (17 x-15)}{\\left(289 x^2-510 x+229\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan((15/2)-((17*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x/z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{e^{x/z}}{z} & 0 & -\\frac{x e^{x/z}}{z^2} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x/z)\ng = sqrt(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = -\\tan ^{-1}(x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{1-x^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z-y}} & \\frac{1}{2 \\sqrt{z-y}} \\\\\n -\\frac{1}{(x-z)^2+1} & 0 & \\frac{1}{(x-z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x)\ng = sqrt(z-y)\nh = -atan(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-4 x^4}+\\cos (4-6 x)$\n", - "Output Answer": [ - "$6 \\sin (4-6 x)-16 e^{1-4 x^4} x^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-4*x**4)+cos(4-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{y^4}{z^4}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{4 y^3}{z^4}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = ((y**4)/(z**4))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{x+z}^2},\\frac{1}{(x+z)^2+1},\\frac{1}{3 \\sqrt[3]{x+z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+z)\ng = cbrt(x+z)\nh = cbrt(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z (x+y))$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{x+y}{z^2 (x+y)^2+1},-\\frac{z}{z^2 (x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z*(x+y))\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(2 x)-\\tan ^{-1}(9 x+1)$\n", - "Output Answer": [ - "$\\frac{2}{\\sqrt{1-4 x^2}}-\\frac{9}{(9 x+1)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(2*x)-atan(9*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^5+7}-\\sqrt{2-5 x}$\n", - "Output Answer": [ - "$\\frac{5}{2} \\left(\\frac{5 x^4}{\\sqrt{5 x^5+7}}+\\frac{1}{\\sqrt{2-5 x}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**5+7)-sqrt(2-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (1-4 x)-\\tan (4-4 x)$\n", - "Output Answer": [ - "$4 \\sec ^2(4-4 x)-4 \\sec ^2(1-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(1-4*x)-tan(4-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(x^2-3\\right) \\tan (3 x+1)$\n", - "Output Answer": [ - "$\\frac{2 x \\tan (3 x+1)}{x^2-3}+3 \\log \\left(x^2-3\\right) \\sec ^2(3 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x**2-3)*tan(3*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = z^4-y$, and $h(x,y,z) = \\cos ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\cos (x)-\\frac{4 z^3}{\\sqrt{1-z^8}}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = z**4-y\nh = acos(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(2-5 x^4\\right)$\n", - "Output Answer": [ - "$20 x^2 \\left(3-40 x^4 \\tan \\left(2-5 x^4\\right)\\right) \\sec ^2\\left(2-5 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2-5*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (x-y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\frac{1}{x}-\\frac{1}{x-y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(x-y)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = -\\tan ^{-1}\\left(y^5-z\\right)$", - "Output Answer": [ - "$\\frac{50 y^8 \\left(y^5-z\\right)}{\\left(\\left(y^5-z\\right)^2+1\\right)^2}-\\frac{20 y^3}{\\left(y^5-z\\right)^2+1}+\\frac{2 \\left(y^5-z\\right)}{\\left(\\left(y^5-z\\right)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atan(y**5-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{16 x}{3}+\\frac{19}{3}}-\\log \\left(-\\frac{20 x}{3}-\\frac{23}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{8}{\\sqrt{48 x+57}}-\\frac{20}{20 x+23}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((16*x)/3)+(19/3))-log(-((20*x)/3)-(23/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-\\frac{3 x}{5}-8\\right)^2+\\sqrt{-\\frac{38 x}{5}-\\frac{28}{5}}$\n", - "Output Answer": [ - "$\\frac{18}{25}-\\frac{361}{25 \\left(-\\frac{38 x}{5}-\\frac{28}{5}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-((3*x)/5)-8)**2+sqrt(-((38*x)/5)-(28/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = asinh(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(4 x^3\\right)$ on the interval $x = 2$ to $x = 8$\n", - "Output Answer": [ - "$-\\sqrt{13}+\\sqrt{73}-\\log (64)-\\frac{3}{2} \\log \\left(11-3 \\sqrt{13}\\right)+\\frac{3}{2} \\log \\left(41-3 \\sqrt{73}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x**3)\na = 2\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -4 x$ on the interval $x = 0$ to $x = 9$\n", - "Output Answer": [ - "$9 \\sqrt{17}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -4*x\na = 0\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{25 x^4}{2 \\sqrt{5 x^5+3}}$\n", - "Output Answer": [ - "$\\sqrt{5 x^5+3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((25*x**4)/(2*sqrt(5*x**5+3)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = x+y\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\sinh \\left(x^3\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x+2) \\left(\\frac{\\sinh (8)}{6 \\sqrt[3]{2}}-6\\ 2^{2/3} \\cosh (8)\\right)+\\frac{\\sinh (8)}{\\sqrt[3]{2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sinh(x**3)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos ^{-1}(4 x)$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(4*x)\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (x-y+z)$", - "Output Answer": [ - "$\\{\\sin (x-y+z),\\sin (x-y+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(z^5-y^3\\right)$", - "Output Answer": [ - "$-\\frac{25 z^8}{\\left(z^5-y^3\\right)^2}+\\frac{20 z^3}{z^5-y^3}-\\frac{6 y}{z^5-y^3}-\\frac{9 y^4}{\\left(z^5-y^3\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z**5-y**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$1-\\sin (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**4\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(8-8 x^4\\right)+e^{5-4 x}$\n", - "Output Answer": [ - "$-32 x^3 \\sec ^2\\left(8-8 x^4\\right)-4 e^{5-4 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(8-8*x**4)+math.e**(5-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-8 x-1)$\n", - "Output Answer": [ - "$-\\frac{64}{(8 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-8*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(2-5 x^5\\right)$\n", - "Output Answer": [ - "$25 x^3 \\left(25 x^5 \\sin \\left(2-5 x^5\\right)+4 \\cos \\left(2-5 x^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(2-5*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\frac{15 x}{2}-8}$\n", - "Output Answer": [ - "$\\frac{225}{4} e^{-\\frac{15 x}{2}-8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-((15*x)/2)-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{3 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{9}{25} \\sin \\left(\\frac{3 x}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((3*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (1/y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = sqrt(y)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\cos (y)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(y)\nh = z-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(2 x+9)$\n", - "Output Answer": [ - "$-\\frac{4 (2 x+9)}{\\left(1-(2 x+9)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(2*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y-z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x}-\\frac{1}{\\sqrt{1-(y-z)^2}},-\\frac{1}{\\sqrt{1-(y-z)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y-z)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-7 x^3-8}+i \\sqrt{5}$\n", - "Output Answer": [ - "$21 e^{-7 x^3-8} x \\left(21 x^3-2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-7*x**3-8)+1j*sqrt(5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\tan (x y z)$", - "Output Answer": [ - "$x y \\sec ^2(x y z)+\\frac{1}{3 \\sqrt[3]{y-x}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y-x)\nh = tan(x*y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y} & e^{x+y} & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n -\\frac{y \\cos \\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\cos \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y)\ng = (1/(y**2))\nh = sin((y/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\sqrt{5-5 x}\\right)$\n", - "Output Answer": [ - "$\\frac{25 \\sin \\left(\\sqrt{5-5 x}\\right)}{4 (5-5 x)^{3/2}}+\\frac{5 \\cos \\left(\\sqrt{5-5 x}\\right)}{4 (x-1)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(sqrt(5-5*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y^3}{z}}$, $g(x,y,z) = \\frac{y^3}{x}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{3 y^2}{x}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((y**3)/z))\ng = ((y**3)/x)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^4\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**4)\ng = sin(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{x^2 z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 1 & 1 & 0 \\\\\n -\\frac{2}{x^3 z^2} & 0 & -\\frac{2}{x^2 z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = x+y\nh = (1/(x**2*z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z (x-y))$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,(x-y) \\sec ^2(z (x-y)),z \\sec ^2(z (x-y))\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z*(x-y))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 z \\sqrt{\\frac{x}{z}}},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\tan \\left(3 x^3\\right)+\\cos (3 x)$\n", - "Output Answer": [ - "$225+3 \\sin (15)+225 \\tan ^2(375)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(tan(3*x**3)+cos(3*x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (7 x+1)$\n", - "Output Answer": [ - "$98 \\tan (7 x+1) \\sec ^2(7 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(7*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{x+z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (y z)$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = \\sqrt{x y z}$", - "Output Answer": [ - "$\\frac{x y}{2 \\sqrt{x y z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y*z)\ng = (1/(z**2))\nh = sqrt(x*y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos \\left(x+y^5\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,-\\sin \\left(x+y^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(x+y**5)\nh = cos(x+y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2 y^8$, $g(x,y,z) = \\sqrt{y^4}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$2 x y^8+\\frac{2 y^3}{\\sqrt{y^4}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2*y**8\ng = sqrt(y**4)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x y z)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x y}{\\sqrt{1-x^2 y^2 z^2}}-\\frac{1}{3 \\sqrt[3]{x}^2},\\frac{x z}{\\sqrt{1-x^2 y^2 z^2}}+y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y*z)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = sin((x/y))\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{y^3}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{y^2}{\\sqrt[3]{y^3}^2}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cbrt(y**3)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (4 x+7)}{(7-5 x)^2}$\n", - "Output Answer": [ - "$\\frac{(20 x-5 \\sin (8 x+14)-28) \\sec ^2(4 x+7)}{(5 x-7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(4*x+7))/((7-5*x)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x z)$, $g(x,y,z) = e^{x/y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{0,-x \\sin (x z),\\frac{e^{x/y}}{y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z)\ng = math.e**(x/y)\nh = math.e**(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\cos (x)-\\frac{1}{y^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{y z}}+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sqrt(y*z)\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{10 x}{3}-\\frac{19}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{100}{(19-10 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((10*x)/3)-(19/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x^{10}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\frac{413343}{2} \\sqrt{3} (x-3)+59049 \\sqrt{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**10\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(5-8 x^4\\right)-\\sin (5 x+5)$\n", - "Output Answer": [ - "$\\frac{32 x^3}{8 x^4-5}-5 \\cos (5 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5-8*x**4)-sin(5*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x^{15}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\frac{7279}{16} (x-1)^3+\\frac{841}{8} (x-1)^2+\\frac{29 (x-1)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**15\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(5 x^2+2\\right) \\left(-\\tan ^{-1}(3-4 x)\\right)$\n", - "Output Answer": [ - "$\\frac{4 \\cos \\left(5 x^2+2\\right)}{(3-4 x)^2+1}+10 x \\sin \\left(5 x^2+2\\right) \\tan ^{-1}(3-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5*x**2+2)*(-atan(3-4*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{-y,0,-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\log (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n \\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (y/x)\nh = log(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{26 x^2}{3}-1$\n", - "Output Answer": [ - "$\\frac{52}{3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((26*x**2)/3)-1\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y^4 z}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{\\sin \\left(\\frac{x}{y^4 z}\\right)}{y^4 z},\\frac{4 x \\sin \\left(\\frac{x}{y^4 z}\\right)}{y^5 z},\\frac{x \\sin \\left(\\frac{x}{y^4 z}\\right)}{y^4 z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/(y**4*z)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-3}+\\log (7 x)$\n", - "Output Answer": [ - "$\\frac{1}{x}-6 e^{-6 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-3)+log(7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$-\\frac{2}{x^3}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y\nh = log(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = cbrt(x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x^3+y^4}{z}\\right)$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = e^{\\frac{x^3}{y^4}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 x^2}{z \\left(\\frac{\\left(x^3+y^4\\right)^2}{z^2}+1\\right)} & \\frac{4 y^3}{z \\left(\\frac{\\left(x^3+y^4\\right)^2}{z^2}+1\\right)} & -\\frac{x^3+y^4}{z^2 \\left(\\frac{\\left(x^3+y^4\\right)^2}{z^2}+1\\right)} \\\\\n 0 & 4 y^3 \\cos \\left(y^4\\right) & 0 \\\\\n \\frac{3 x^2 e^{\\frac{x^3}{y^4}}}{y^4} & -\\frac{4 x^3 e^{\\frac{x^3}{y^4}}}{y^5} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan((x**3+y**4)/z)\ng = sin(y**4)\nh = math.e**((x**3)/(y**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-\\frac{17}{2}}+\\sin (8 x+3)$\n", - "Output Answer": [ - "$4 e^{4 x-\\frac{17}{2}}+8 \\cos (8 x+3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-(17/2))+sin(8*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$e^x+\\sec ^2(y)+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\frac{1}{x^2 y^2}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n -\\frac{2}{x^3 y^2} & -\\frac{2}{x^2 y^3} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((x/z))\ng = (1/(x**2*y**2))\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(2 x^2+5\\right)+\\frac{1}{e}$\n", - "Output Answer": [ - "$4 \\left(8 x^2 \\tan \\left(2 x^2+5\\right)+1\\right) \\sec ^2\\left(2 x^2+5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = tan(2*x**2+5)+(1/math.e)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{x^5}\\right)$, $g(x,y,z) = \\frac{z^2}{y}$, and $h(x,y,z) = \\sqrt[3]{z^2}$", - "Output Answer": [ - "$-\\frac{5 y \\sec ^2\\left(\\frac{y}{x^5}\\right)}{x^6}-\\frac{z^2}{y^2}+\\frac{2 z}{3 \\sqrt[3]{z^2}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/(x**5)))\ng = ((z**2)/y)\nh = cbrt(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cos \\left(\\frac{7 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{49 \\cos (7)}{8}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(((7*x)/2)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x^5-8}+e^{3 x+3}$\n", - "Output Answer": [ - "$\\frac{5 \\left(3 x^5-64\\right) x^3}{4 \\left(x^5-8\\right)^{3/2}}+9 e^{3 x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(x**5-8)+math.e**(3*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y z}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y z}{x^2} & \\frac{z}{x} & \\frac{y}{x} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y*z)/x)\ng = y\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{z^6}$\n", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{6}{z^7}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**6))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = z\nh = tan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y}+z^5\\right)$", - "Output Answer": [ - "$-\\frac{x^2 \\left(\\frac{x}{y}+z^5\\right)}{y^4 \\left(\\left(\\frac{x}{y}+z^5\\right)^2+1\\right)^{3/2}}+\\frac{2 x}{y^3 \\sqrt{\\left(\\frac{x}{y}+z^5\\right)^2+1}}-\\frac{\\frac{x}{y}+z^5}{y^2 \\left(\\left(\\frac{x}{y}+z^5\\right)^2+1\\right)^{3/2}}-\\frac{25 z^8 \\left(\\frac{x}{y}+z^5\\right)}{\\left(\\left(\\frac{x}{y}+z^5\\right)^2+1\\right)^{3/2}}+\\frac{20 z^3}{\\sqrt{\\left(\\frac{x}{y}+z^5\\right)^2+1}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh((x/y)+z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (9-4 x)+\\tan (3)$\n", - "Output Answer": [ - "$-4 \\cos (9-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(9-4*x)+tan(3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(x+y^5\\right)$, $g(x,y,z) = y^5$, and $h(x,y,z) = x+y^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-\\left(x+y^5\\right)^2}} & \\frac{5 y^4}{\\sqrt{1-\\left(x+y^5\\right)^2}} & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 1 & 5 y^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x+y**5)\ng = y**5\nh = x+y**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5 z^5$, $g(x,y,z) = z-y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5*z**5\ng = z-y\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$-\\frac{5}{4} (x-1)^2-\\frac{3 (x-1)}{2}+\\frac{\\pi }{4}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sqrt{2} \\sqrt{-x}$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2)*sqrt(-x)\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z\nh = asinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$z e^{y z}+\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(y*z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x-4}-\\cos ^{-1}(-4 x-7)$\n", - "Output Answer": [ - "$2 e^{2 x-4}-\\frac{4}{\\sqrt{1-(-4 x-7)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x-4)-acos(-4*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{y}}}$", - "Output Answer": [ - "$2-\\frac{1}{2 y \\left(\\frac{z}{y}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = (1/(sqrt((z/y))))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y-x}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}-\\frac{1}{2 \\sqrt{y-x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y-x)\ng = log(z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$125 x^3$\n", - "Output Answer": [ - "$1500$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(125*x**3)\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^{10}$", - "Output Answer": [ - "$-\\frac{361}{8} (x-1)^2-\\frac{19 (x-1)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**10\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$e^{3 x-5} (2 \\cos (8-2 x)-3 \\sin (8-2 x))$\n", - "Output Answer": [ - "$-e^{3 x-5} \\sin (8-2 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x-5)*(2*cos(8-2*x)-3*sin(8-2*x))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{x z}}$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 (x z)^{3/2}}+\\frac{z}{3 \\sqrt[3]{y z}^2},\\frac{1}{x \\sqrt{\\frac{z}{x}-1} \\sqrt{\\frac{z}{x}+1}},-\\frac{z}{2 (x z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(z/x)\ng = (1/(sqrt(x*z)))\nh = (1/(sqrt(x*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x}+\\frac{3 \\sqrt{y+z}}{2},-\\frac{3 \\sqrt{y+z}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**(3/2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin (3 x+7)}{\\sqrt{2-2 x}}$\n", - "Output Answer": [ - "$\\frac{6 (x-1) \\cos (3 x+7)-\\sin (3 x+7)}{(2-2 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(3*x+7))/(sqrt(2-2*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-3}+\\frac{1}{e^3}$\n", - "Output Answer": [ - "$\\frac{4}{\\sqrt{8 x-3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-3)+(1/(math.e**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{25}{3}-\\frac{7 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{9} \\sin \\left(\\frac{1}{3} (25-7 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin((25/3)-((7*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 0$ on the interval $x = 4$ to $x = 12$\n", - "Output Answer": [ - "$8$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 0\na = 4\nb = 12\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\text{sech}^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\text{sech}^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n e^x & 0 & 0 \\\\\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x/y)\ng = math.e**x\nh = cbrt(x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n -\\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = log((y/x))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x-y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan \\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 5 z^4 \\sec ^2\\left(z^5\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x-y)\ng = sqrt(y)\nh = tan(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{\\sqrt{z^2+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = tan(y)\nh = tan(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(z-x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-(z-x)^2}} & 0 & -\\frac{1}{\\sqrt{1-(z-x)^2}} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z-x)\ng = cbrt(y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\frac{1}{\\sqrt{y^4}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\frac{2 y^3}{\\left(y^4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = (1/(sqrt(y**4)))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-7 x}-\\log (-3 x-1)$\n", - "Output Answer": [ - "$-7 e^{2-7 x}-\\frac{3}{3 x+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-7*x)-log(-3*x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,-\\cos (x-z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-z)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x^2-1}+\\tan ^{-1}(8-9 x)$\n", - "Output Answer": [ - "$-12 e^{-6 x^2-1} x-\\frac{9}{(8-9 x)^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x**2-1)+atan(8-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-x},\\frac{1}{y-x},\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log((x/y))\nh = log((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6 x) \\cos \\left(2 x^4+5\\right)$\n", - "Output Answer": [ - "$6 \\cos (6 x) \\cos \\left(2 x^4+5\\right)-8 x^3 \\sin (6 x) \\sin \\left(2 x^4+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x)*cos(2*x**4+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\tan (3 x+1)}$\n", - "Output Answer": [ - "$9 e^{-\\tan (3 x+1)} (\\tan (3 x+1)-1)^2 \\sec ^2(3 x+1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-tan(3*x+1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x-y}{z}\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z \\left(\\frac{(x-y)^2}{z^2}+1\\right)} & -\\frac{1}{z \\left(\\frac{(x-y)^2}{z^2}+1\\right)} & -\\frac{x-y}{z^2 \\left(\\frac{(x-y)^2}{z^2}+1\\right)} \\\\\n 0 & e^y & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan((x-y)/z)\ng = math.e**y\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = cos(x+z)\nh = (x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{5 x} \\tan (2 x+5)$\n", - "Output Answer": [ - "$-e^{5 x} \\left(25 \\tan (2 x+5)+4 (2 \\tan (2 x+5)+5) \\sec ^2(2 x+5)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(5*x)*tan(2*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5-9 x} \\cos \\left(8 x^5+5\\right)$\n", - "Output Answer": [ - "$-e^{5-9 x} \\left(40 x^4 \\sin \\left(8 x^5+5\\right)+9 \\cos \\left(8 x^5+5\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5-9*x)*cos(8*x**5+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-\\frac{5 x^4}{2}-\\frac{13}{2}\\right)+\\frac{1}{\\left(\\frac{13 x}{2}+5\\right)^2}$\n", - "Output Answer": [ - "$\\frac{20 x^3}{5 x^4+13}-\\frac{104}{(13 x+10)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-((5*x**4)/2)-(13/2))+(1/((((13*x)/2)+5)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (1-x)+\\cos (6 x+3)$\n", - "Output Answer": [ - "$-6 \\sin (6 x+3)-\\cos (1-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(1-x)+cos(6*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(7 x^4-8\\right)^5+\\sqrt{3-2 x}$\n", - "Output Answer": [ - "$140 x^3 \\left(8-7 x^4\\right)^4-\\frac{1}{\\sqrt{3-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((7*x**4-8)**5+sqrt(3-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z (x+y)}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{z}{2 \\sqrt{z (x+y)}} & \\frac{z}{2 \\sqrt{z (x+y)}} & \\frac{x+y}{2 \\sqrt{z (x+y)}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = tan(y)\nh = sqrt(z*(x+y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\cos \\left(\\frac{1}{2}-x\\right)}-\\log \\left(\\frac{1}{2}-4 x\\right)$\n", - "Output Answer": [ - "$\\frac{64}{(1-8 x)^2}-e^{\\cos \\left(\\frac{1}{2}-x\\right)} \\cos \\left(\\frac{1}{2}-x\\right)+\\sin ^2\\left(\\frac{1}{2}-x\\right) e^{\\cos \\left(\\frac{1}{2}-x\\right)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(cos((1/2)-x))-log((1/2)-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x^2 y z^4\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^2}-\\frac{1}{y^2}-\\frac{4}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**2*y*z**4)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7} e^{-2 x}$\n", - "Output Answer": [ - "$4 \\sqrt{7} e^{-2 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(7)*math.e**(-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(-7 x^2-1\\right)$\n", - "Output Answer": [ - "$\\frac{14 \\sqrt{7} x^4}{\\left(-x^2 \\left(7 x^2+2\\right)\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-7*x**2-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (4 x)$\n", - "Output Answer": [ - "$-16 \\sin (4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\frac{1}{z^{3/2}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = (1/(z**(3/2)))\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{x z}{y}\\right)^{3/2}$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 z \\sqrt{\\frac{x z}{y}}}{2 y} & -\\frac{3 x z \\sqrt{\\frac{x z}{y}}}{2 y^2} & \\frac{3 x \\sqrt{\\frac{x z}{y}}}{2 y} \\\\\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x*z)/y)**(3/2)\ng = cbrt(x/y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^3 z^3$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\left\\{-3 y^3 z^2-\\sec ^2(y-z),0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y**3*z**3\nh = y**3*z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{4 (x-1)}{3}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{8 x-4} \\tan (9-2 x)$\n", - "Output Answer": [ - "$2 e^{8 x-4} \\left(\\sec ^2(9-2 x)-4 \\tan (9-2 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(8*x-4)*tan(9-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$-\\sin (x)+\\frac{1}{y}+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(y)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(6 x+2)^3}$\n", - "Output Answer": [ - "$\\frac{432}{(6 x+2)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((6*x+2)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(8-8 x^2\\right)^4+\\tan \\left(4 x^3+4\\right)$\n", - "Output Answer": [ - "$4 x \\left(8192 \\left(x^2-1\\right)^3+3 x \\sec ^2\\left(4 \\left(x^3+1\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8-8*x**2)**4+tan(4*x**3+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{-5 x-2}-\\sin \\left(7 x+\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$49 \\sin \\left(7 x+\\frac{3}{2}\\right)-25 e^{-5 x-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(-5*x-2)-sin(7*x+(3/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(7 x+2)^5}-\\sqrt{\\frac{11}{2}-\\frac{5 x}{2}}$\n", - "Output Answer": [ - "$\\frac{5}{2 \\sqrt{22-10 x}}-\\frac{35}{(7 x+2)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((7*x+2)**5))-sqrt((11/2)-((5*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 \\sqrt{y-x}} & \\frac{1}{2 \\sqrt{y-x}} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\cos (x-z) & 0 & -\\cos (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-x)\ng = tan(y)\nh = sin(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y^3$", - "Output Answer": [ - "$\\left\\{3 y^2,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(6 x^4+7\\right)$\n", - "Output Answer": [ - "$-72 x^2 \\left(16 x^4 \\tan \\left(6 x^4+7\\right)+1\\right) \\sec ^2\\left(6 x^4+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(6*x**4+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = (z-x)^2$", - "Output Answer": [ - "$2 (z-x)+\\text{sech}^2(x)+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = sin(y)\nh = (z-x)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cos(z)\nh = log(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n \\frac{3}{2} z \\sqrt{x z} & 0 & \\frac{3}{2} x \\sqrt{x z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4\ng = sqrt(z)\nh = (x*z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(3-\\frac{2 x}{3}\\right)-\\log \\left(\\frac{7 x}{3}-\\frac{7}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{1-x}-\\frac{2}{3} \\sec ^2\\left(3-\\frac{2 x}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(3-((2*x)/3))-log(((7*x)/3)-(7/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x+y}{z^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\left(z^2\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z^2} & \\frac{1}{z^2} & -\\frac{2 (x+y)}{z^3} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 3 z \\sqrt{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x+y)/(z**2))\ng = sqrt(y)\nh = (z**2)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\left(z^3\\right)^{3/2}}$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left\\{\\frac{9 z^2}{2 \\left(z^3\\right)^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((z**3)**(3/2)))\nh = (1/((z**3)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(5 x^2+1\\right)+e$\n", - "Output Answer": [ - "$-10 \\left(\\sin \\left(5 x^2+1\\right)+10 x^2 \\cos \\left(5 x^2+1\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(5*x**2+1)+math.e\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8 x} \\left(\\frac{7}{2}-\\frac{5 x}{2}\\right)^2$\n", - "Output Answer": [ - "$\\frac{1}{2} e^{8 x} \\left(800 x^2-1840 x+1033\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8*x)*((7/2)-((5*x)/2))**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^3\\right)$, $g(x,y,z) = \\tan (y+z)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(y+z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**3)\ng = tan(y+z)\nh = tan(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$8 x \\log (8 x)$\n", - "Output Answer": [ - "$8 (\\log (8 x)+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(8*x*log(8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-2 x)$ on the interval $x = 3$ to $x = 9$\n", - "Output Answer": [ - "$-\\sqrt{10}+\\sqrt{82}+\\tanh ^{-1}\\left(\\sqrt{10}\\right)-\\tanh ^{-1}\\left(\\sqrt{82}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-2*x)\na = 3\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = (x+y+z)^3$", - "Output Answer": [ - "$\\left\\{3 (x+y+z)^2+\\sin (z),-3 (x+y+z)^2,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y z)^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left\\{e^{y+z},\\frac{3}{2} y \\sqrt{y z},-\\frac{3}{2} z \\sqrt{y z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y*z)**(3/2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3-7 x} \\cos \\left(6 x^4+3\\right)$\n", - "Output Answer": [ - "$-e^{3-7 x} \\left(24 x^3 \\sin \\left(6 x^4+3\\right)+7 \\cos \\left(6 x^4+3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3-7*x)*cos(6*x**4+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{2 x^5-9} \\tan ^{-1}(9-7 x)$\n", - "Output Answer": [ - "$e^{2 x^5-9} \\left(\\frac{7}{(9-7 x)^2+1}-10 x^4 \\tan ^{-1}(9-7 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(2*x**5-9)*atan(9-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6} e^{-2 x-2}$\n", - "Output Answer": [ - "$4 \\sqrt{6} e^{-2 (x+1)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(6)*math.e**(-2*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$3 \\sqrt{x^3}+\\sqrt{-8 x-8}$\n", - "Output Answer": [ - "$\\frac{9 x^2}{2 \\sqrt{x^3}}-\\frac{4}{\\sqrt{-8 x-8}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(3*sqrt(x**3)+sqrt(-8*x-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x+y^4+z\\right)$", - "Output Answer": [ - "$-12 y^2 \\sin \\left(x+y^4+z\\right)-16 y^6 \\cos \\left(x+y^4+z\\right)-2 \\cos \\left(x+y^4+z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y**4+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^2\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x-1) \\left(-\\frac{1}{3}-2 \\sin (1)\\right)+(x-1)^2 \\left(\\frac{1}{9}-\\sin (1)-2 \\cos (1)\\right)-1+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**2)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-2 x-2} \\cos (4-x)$\n", - "Output Answer": [ - "$-\\frac{2 (x+1) \\sin (4-x)+\\cos (4-x)}{\\sqrt{2} \\sqrt{-x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-2*x-2)*cos(4-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{49 x^4}{360}+\\frac{x^2}{6}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x^2-\\frac{15}{2}}+\\tan \\left(\\frac{3 x}{2}+3\\right)$\n", - "Output Answer": [ - "$\\frac{3}{2} \\left(8 e^{6 x^2-\\frac{15}{2}} x+\\sec ^2\\left(\\frac{3 (x+2)}{2}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x**2-(15/2))+tan(((3*x)/2)+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-7 x-8)^4 \\cos (\\tan (7 x))$\n", - "Output Answer": [ - "$7 (-7 x-8)^3 \\left((7 x+8) \\sec ^2(7 x) \\sin (\\tan (7 x))-4 \\cos (\\tan (7 x))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-7*x-8)**4*cos(tan(7*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (5) \\cos (1-4 x)$\n", - "Output Answer": [ - "$-16 \\cos (5) \\cos (1-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5)*cos(1-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x-y)$, $g(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{\\frac{\\sin \\left(\\frac{z}{x}\\right)}{x},0,\\frac{z \\sin \\left(\\frac{z}{x}\\right)}{x^2}+\\sec ^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x-y)\ng = cos((z/x))\nh = cos((z/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n y e^{x y} & x e^{x y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = x\nh = math.e**(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x y}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2 y} & -\\frac{1}{x y^2} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x*y))\ng = log(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (3-5 x) \\cos (4 x+9)$\n", - "Output Answer": [ - "$\\frac{1}{2} (-\\cos (12-x)-81 \\cos (9 x+6))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3-5*x)*cos(4*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos (z (x+y))$\n", - "Output Answer": [ - "$\\{-z \\sin (z (x+y)),-z \\sin (z (x+y)),-((x+y) \\sin (z (x+y)))\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z*(x+y))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = x^4 y^4$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,0,4 x^3 y^4-5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = x**4*y**4\nh = x**4*y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-8 x-4) \\log (\\sin (8 x+6))$\n", - "Output Answer": [ - "$\\frac{2 \\log (\\sin (8 x+6))}{2 x+1}+8 \\log (-8 x-4) \\cot (8 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-8*x-4)*log(sin(8*x+6)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\left(\\frac{1}{12}-\\frac{e}{6}\\right) (x-1)^3+\\left(-\\frac{1}{4}-\\frac{e}{2}\\right) (x-1)^2+\\left(\\frac{1}{2}-e\\right) (x-1)+\\frac{\\pi }{4}-e$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^3\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$3 x^2 \\sec ^2\\left(x^3\\right)+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**3)\ng = sqrt(y)\nh = x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$9 e^{9 x+1}$\n", - "Output Answer": [ - "$e^{9 x+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 9*math.e**(9*x+1)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-5 x^2}+\\frac{1}{\\sqrt{\\left(8 x^2+9\\right)^2+1}}$\n", - "Output Answer": [ - "$-\\frac{5 x}{\\sqrt{7-5 x^2}}-\\frac{16 \\left(8 x^2+9\\right) x}{\\left(\\left(8 x^2+9\\right)^2+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-5*x**2)+(1/(sqrt((8*x**2+9)**2+1))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^3+z}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\frac{x^{15}}{z^5}$", - "Output Answer": [ - "$-\\frac{5 x^{15}}{z^6}+3 x^2 e^{x^3+z}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3+z)\ng = (1/(y**(3/2)))\nh = ((x**15)/(z**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**(3/2)\ng = tan(x)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**(3/2)))\ng = sqrt(x)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-4 x-5)^2 \\sqrt{8 x-4}$\n", - "Output Answer": [ - "$\\frac{2 (4 x+5) (20 x-3)}{\\sqrt{2 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-4*x-5)**2*sqrt(8*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (7 x+6) (-\\cos (6 x+1))$\n", - "Output Answer": [ - "$\\frac{1}{2} (\\sin (x+5)+169 \\sin (13 x+7))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x+6)*(-cos(6*x+1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}}$, $g(x,y,z) = \\sqrt[3]{x z^3}$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n \\frac{z^3}{3 \\sqrt[3]{x z^3}^2} & 0 & \\frac{x z^2}{\\sqrt[3]{x z^3}^2} \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y))\ng = cbrt(x*z**3)\nh = cos(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\sec ^2(y)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = tan(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y-z)$, $g(x,y,z) = (y+z)^5$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y-z) & \\sin (y-z) \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y-z)\ng = (y+z)**5\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(2-9 x^5\\right) \\cos (4-7 x)$\n", - "Output Answer": [ - "$\\frac{45 x^4 \\cos (4-7 x)}{9 x^5-2}+7 \\log \\left(2-9 x^5\\right) \\sin (4-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2-9*x**5)*cos(4-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\cos (3-x)}{\\tan ^{-1}(2 x+5)}$\n", - "Output Answer": [ - "$\\frac{\\frac{2 \\cos (3-x)}{(2 x+5)^2+1}-\\sin (3-x) \\tan ^{-1}(2 x+5)}{\\tan ^{-1}(2 x+5)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((cos(3-x))/(atan(2*x+5))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log (3) \\sin (8)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(3)*sin(8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\cos (x)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**y\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{\\left(\\frac{y}{z}\\right)^{3/2}}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\sec ^2(x)-\\frac{3}{2 z \\left(\\frac{y}{z}\\right)^{5/2}}+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/((y/z)**(3/2)))\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{1}{(x+y+z)^2}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{y}}{2}-\\frac{2}{(x+y+z)^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = y**(3/2)\nh = (1/((x+y+z)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}}+\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = asin(y/x)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(z)$, $g(x,y,z) = \\sqrt[3]{x-y^3+z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\frac{y^2}{\\sqrt[3]{x-y^3+z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(z)\ng = cbrt(x-y**3+z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 16 x^2$ on the interval $x = 2$ to $x = 7$\n", - "Output Answer": [ - "$\\frac{1}{64} \\left(-64 \\sqrt{4097}+224 \\sqrt{50177}-\\sinh ^{-1}(64)+\\sinh ^{-1}(224)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 16*x**2\na = 2\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\frac{9 x}{2}-\\frac{1}{2}}$\n", - "Output Answer": [ - "$\\frac{81}{4} e^{-\\frac{9 x}{2}-\\frac{1}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-((9*x)/2)-(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x+6} \\cos (5 x+2)$\n", - "Output Answer": [ - "$e^{3 x+6} (3 \\cos (5 x+2)-5 \\sin (5 x+2))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x+6)*cos(5*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (x+1)-\\sin ^{-1}(2 x+5)$\n", - "Output Answer": [ - "$-\\frac{2}{\\sqrt{1-(2 x+5)^2}}-\\sin (x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(x+1)-asin(2*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$x-\\frac{x^3}{6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\sqrt{x+y-z}$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x+y-z}},1-\\frac{1}{x+z},\\frac{1}{2 \\sqrt{x+y-z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = sqrt(x+y-z)\nh = sqrt(x+y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3 x^3-1}$\n", - "Output Answer": [ - "$\\frac{9 x^2}{2 \\sqrt{3 x^3-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3*x**3-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = x^8 y^4$", - "Output Answer": [ - "$\\left\\{4 x^8 y^3,-8 x^7 y^4,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{z^5}\\right)$, $g(x,y,z) = -\\sin ^{-1}\\left(y-z^5\\right)$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\frac{1}{z^5 \\sqrt{\\frac{x}{z^5}-1} \\sqrt{\\frac{x}{z^5}+1}}-\\frac{1}{\\sqrt{1-\\left(y-z^5\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x/(z**5))\ng = -asin(y-z**5)\nh = y**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos \\left(x^5\\right)$", - "Output Answer": [ - "$\\frac{x^3}{3}+x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x**5)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x+7} \\cos (8-3 x)$\n", - "Output Answer": [ - "$e^{5 x+7} (3 \\sin (8-3 x)+5 \\cos (8-3 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x+7)*cos(8-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^4}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{2 y^3}{\\sqrt{y^4}}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y**4)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = z\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x^2+1}-x \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = atan(x)\nh = atan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sin (2 x)-\\log (-2 x)$\n", - "Output Answer": [ - "$\\frac{1}{18}+2 \\sin (6)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sin(2*x)-log(-2*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cbrt(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y^4-x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 \\sqrt{y^4-x}} & \\frac{2 y^3}{\\sqrt{y^4-x}} & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y**4-x)\ng = y**4\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x-7}-\\sin (6 x+6)$\n", - "Output Answer": [ - "$2 e^{2 x-7}-6 \\cos (6 (x+1))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x-7)-sin(6*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}\\left(x^5\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x**5)\ng = sin(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\sin \\left(8-4 x^2\\right)\\right)$\n", - "Output Answer": [ - "$8 \\left(8 x^2 \\sin \\left(8-4 x^2\\right) \\sin \\left(\\sin \\left(8-4 x^2\\right)\\right)-8 x^2 \\cos ^2\\left(8-4 x^2\\right) \\cos \\left(\\sin \\left(8-4 x^2\\right)\\right)+\\sin \\left(\\sin \\left(8-4 x^2\\right)\\right) \\cos \\left(8-4 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(sin(8-4*x**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tanh (y+z)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\text{sech}^2(y+z) & \\text{sech}^2(y+z) \\\\\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = tanh(y+z)\nh = tan((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 0 \\\\\n 0 & e^y & 0 \\\\\n \\frac{1}{x-z} & 0 & -\\frac{1}{x-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y\ng = math.e**y\nh = log(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = e^x$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = math.e**x\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{y}{x}\\right)^{3/2}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$-\\frac{3 y \\sqrt{\\frac{y}{x}}}{2 x^2}+\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)**(3/2)\ng = (1/(y**(3/2)))\nh = atan(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = e^{y-z}$", - "Output Answer": [ - "$e^x-e^{y-z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan(z)\nh = math.e**(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y+z}^2}-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = cbrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (3 x+1)$\n", - "Output Answer": [ - "$-\\frac{9}{(3 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = y\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8-8 x)^2}$\n", - "Output Answer": [ - "$\\frac{3}{32 (x-1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8-8*x)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$-\\frac{8}{729 x^3}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-(8/(729*x**3)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x-y-z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x-y-z)^2}}+\\cos (x+z)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x-y-z)\ng = math.e**y\nh = sin(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = x y^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & -2 y \\sin \\left(y^2\\right) & 0 \\\\\n y^2 & 2 x y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = cos(y**2)\nh = x*y**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\cos (x+z)+\\frac{1}{3 \\sqrt[3]{y}^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z)\ng = cbrt(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{z^4}\\right)$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = \\frac{1}{z^8}$", - "Output Answer": [ - "$\\frac{1}{z^4 \\left(1-\\frac{x^2}{z^8}\\right)}-e^{x-y}-\\frac{8}{z^9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x/(z**4))\ng = math.e**(x-y)\nh = (1/(z**8))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$9 e^{x-5}$\n", - "Output Answer": [ - "$9 e^{x-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(9*math.e**(x-5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\sin \\left(x^2\\right)$", - "Output Answer": [ - "$(x-5) \\left(\\frac{1}{5}+10 \\cos (25)\\right)+(x-5)^2 \\left(-\\frac{1}{50}-50 \\sin (25)+\\cos (25)\\right)+\\log (5)+\\sin (25)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = sin(x**2)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(8-5 x)^3 (x+7)^3$\n", - "Output Answer": [ - "$-3 (8-5 x)^2 (x+7)^2 (10 x+27)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8-5*x)**3*(x+7)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh (y z)$", - "Output Answer": [ - "$\\{z \\cosh (y z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^2}{z^{10}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 x}{z^{10}},0,-\\frac{10 x^2}{z^{11}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**2)/(z**10))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{9 x}{2}+\\frac{15}{2}}$\n", - "Output Answer": [ - "$-\\frac{9 \\sqrt{\\frac{3}{2}}}{4 (3 x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((9*x)/2)+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = -\\tanh (y-z)$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{y}{z^2 \\sqrt{\\frac{y^2}{z^2}+1}}-\\text{sech}^2(y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = -tanh(y-z)\nh = asinh(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(z^4-y\\right)^5$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = e^{z^4}$", - "Output Answer": [ - "$\\left\\{0,20 z^3 \\left(z^4-y\\right)^4,5 \\left(z^4-y\\right)^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z**4-y)**5\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(z)$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(z)\ng = cos(x+z)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{32} \\left(6 x^2+9\\right)^2$\n", - "Output Answer": [ - "$-\\frac{9}{4} x \\left(2 x^2+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/32)*(6*x**2+9)**2, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{17}{2}-\\frac{7 x}{2}}+\\log \\left(-7 x-\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{14}{14 x+11}-\\frac{7}{2} e^{\\frac{17}{2}-\\frac{7 x}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((17/2)-((7*x)/2))+log(-7*x-(11/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^5}{z^5}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{z^5} & 0 & -\\frac{5 x^5}{z^6} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**5)/(z**5))\ng = math.e**y\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$14 e (x+1)^2+(1-4 e) (x+1)+e-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\cosh ^{-1}(x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\left(\\frac{1}{2 \\sqrt{6}}+e^5\\right) (x-5)+e^5+\\cosh ^{-1}(5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = acosh(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan \\left(y^5+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 5 y^4 \\sec ^2\\left(y^5+z\\right) & \\sec ^2\\left(y^5+z\\right) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(y**5+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{x-y}{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},-\\sec ^2\\left(\\frac{x}{y}-z\\right)-\\frac{1}{z},\\frac{x \\sec ^2\\left(\\frac{x}{y}-z\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y)-z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y*z)\ng = atan(y)\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(3 x^2+2\\right)-\\sin (4-7 x)$\n", - "Output Answer": [ - "$7 \\cos (4-7 x)-6 x \\sin \\left(3 x^2+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3*x**2+2)-sin(4-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{1}{y}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(y)\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\cosh (x+y) & \\cosh (x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y\nh = sinh(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = z\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y^5$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -5 y^4 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y**5\ng = sqrt(x)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(y)))\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = \\frac{1}{z^2-y}$, and $h(x,y,z) = \\tan \\left(z^2\\right)$", - "Output Answer": [ - "$\\frac{1}{\\left(z^2-y\\right)^2}+2 z \\sec ^2\\left(z^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = (1/(z**2-y))\nh = tan(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7-6 x^5}$\n", - "Output Answer": [ - "$\\frac{15 x^3 \\left(9 x^5-28\\right)}{\\left(7-6 x^5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7-6*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-5 x-5)-\\frac{1}{-2 x-8}$\n", - "Output Answer": [ - "$\\frac{1}{x+1}-\\frac{1}{2 (x+4)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-5*x-5)-(1/(-2*x-8)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & 2 z \\cos \\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = tan(y)\nh = sin(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x y+z^4\\right)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = (x-y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{x y+z^4} & \\frac{x}{x y+z^4} & \\frac{4 z^3}{x y+z^4} \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 2 (x-y) & -2 (x-y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*y+z**4)\ng = atanh(y)\nh = (x-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x+z},\\frac{x \\sinh \\left(\\frac{x}{y}\\right)}{y^2}+\\frac{y}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x/y)\ng = sqrt(x*y)\nh = sqrt(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\log \\left(y+z^4\\right)$, and $h(x,y,z) = \\tan \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & \\frac{1}{y+z^4} & \\frac{4 z^3}{y+z^4} \\\\\n 0 & 0 & 4 z^3 \\sec ^2\\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = log(y+z**4)\nh = tan(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y z^3}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}}-\\frac{3 y z^2}{2 \\sqrt{y z^3}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y*z**3)\nh = sqrt(y*z**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(2 x^5+\\frac{3}{5}\\right)^3-\\tan \\left(\\frac{29}{5}-\\frac{7 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{6}{5} \\left(10 x^5+3\\right)^2 x^4+\\frac{7}{5} \\sec ^2\\left(\\frac{1}{5} (29-7 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2*x**5+(3/5))**3-tan((29/5)-((7*x)/5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2-y$, $g(x,y,z) = \\sin ^{-1}\\left(x^2+y\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & -1 & 0 \\\\\n \\frac{2 x}{\\sqrt{1-\\left(x^2+y\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(x^2+y\\right)^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2-y\ng = asin(x**2+y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{\\sin ^{-1}(5-6 x)}$\n", - "Output Answer": [ - "$-\\frac{6}{\\sqrt{1-(5-6 x)^2} \\sin ^{-1}(5-6 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(asin(5-6*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}}-\\frac{1}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(y/z)\nh = acos(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(z (x+y))$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{\\frac{x+y}{\\sqrt{1-z^2 (x+y)^2}},-\\frac{1}{x^2+1},-\\frac{z}{\\sqrt{1-z^2 (x+y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = acos(z*(x+y))\nh = acos(z*(x+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(9-6 x^5\\right)-\\sqrt{6-2 x}$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{6-2 x}}-30 x^4 \\cos \\left(9-6 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(9-6*x**5)-sqrt(6-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(7 x^2+3\\right)$\n", - "Output Answer": [ - "$-14 \\left(28 x^2 \\tan \\left(7 x^2+3\\right)+1\\right) \\sec ^2\\left(7 x^2+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(7*x**2+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\cos (y-z)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = sin(y-z)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x+5} \\tan (6 x+8)$\n", - "Output Answer": [ - "$\\frac{24 (x+5) (12 (x+5) \\tan (6 x+8)+1) \\sec ^2(6 x+8)-\\tan (6 x+8)}{4 (x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x+5)*tan(6*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-3}+\\log (3 x-1)$\n", - "Output Answer": [ - "$\\frac{3}{3 x-1}+\\frac{1}{\\sqrt{2 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-3)+log(3*x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$(x+1)^2 \\left(-\\frac{27}{2} e \\sin (1)-4 e \\cos (1)\\right)+(x+1) (4 e \\sin (1)+e \\cos (1))-e \\sin (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x-z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-(x-z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x-z)^2}} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x-z)\ng = y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt{x^4 z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n \\frac{2 x^3 z}{\\sqrt{x^4 z}} & 0 & \\frac{x^4}{2 \\sqrt{x^4 z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = sqrt(y*z)\nh = sqrt(x**4*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sqrt[3]{x^4}$", - "Output Answer": [ - "$-\\frac{5 (x+3)^2}{9 \\sqrt[3]{3}}+\\frac{5 (x+3)}{\\sqrt[3]{3}}-3\\ 3^{2/3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = cbrt(x**4)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-8 x-\\frac{5}{2}}-\\sqrt{-\\frac{3 x}{2}-\\frac{1}{2}}$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{-6 x-2}}-\\frac{4}{\\sqrt{-8 x-\\frac{5}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-8*x-(5/2))-sqrt(-((3*x)/2)-(1/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{11 x}{2}-8}$\n", - "Output Answer": [ - "$\\frac{121}{4} e^{\\frac{11 x}{2}-8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((11*x)/2)-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{17 x}{2}-6\\right)$\n", - "Output Answer": [ - "$-\\frac{289}{(12-17 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((17*x)/2)-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^3 z^3$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 y^2 z^3 & 3 y^3 z^2 \\\\\n 0 & e^y & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**3*z**3\ng = math.e**y\nh = cos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = (x-y)^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,1,\\frac{3 \\sqrt{x-y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = (x-y)**(3/2)\nh = (x-y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4 x+\\frac{1}{2}\\right)-\\left(\\frac{13}{2}-4 x\\right)^3$\n", - "Output Answer": [ - "$-16 \\left(-24 x+\\cos \\left(4 x+\\frac{1}{2}\\right)+39\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4*x+(1/2))-((13/2)-4*x)**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sqrt(x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x-y^2\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\left(x+y^2\\right)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2\\left(x-y^2\\right) & -2 y \\sec ^2\\left(x-y^2\\right) & 0 \\\\\n 0 & 2 y & 0 \\\\\n 2 \\left(x+y^2\\right) & 4 y \\left(x+y^2\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x-y**2)\ng = y**2\nh = (x+y**2)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sinh ^{-1}(y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & \\frac{z}{\\sqrt{y^2 z^2+1}} & \\frac{y}{\\sqrt{y^2 z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = y**(3/2)\nh = asinh(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$15 e^{\\frac{15 x^2}{2}+6} x$\n", - "Output Answer": [ - "$e^{\\frac{15 x^2}{2}+6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 15*math.e**(((15*x**2)/2)+6)*x\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{-8 x-8} \\tan (1)$\n", - "Output Answer": [ - "$8 e^{-8 (x+1)} \\tan (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(-8*x-8)*tan(1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{x-y}$, and $h(x,y,z) = \\sqrt{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x-y}} & -\\frac{1}{2 \\sqrt{x-y}} & 0 \\\\\n 0 & 0 & \\frac{z}{\\sqrt{z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(x-y)\nh = sqrt(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(y-x)$, $g(x,y,z) = \\left(\\frac{x}{y}-z^4\\right)^4$, and $h(x,y,z) = \\cosh \\left(z^4\\right)$", - "Output Answer": [ - "$-\\frac{4 x \\left(\\frac{x}{y}-z^4\\right)^3}{y^2}-\\frac{1}{\\sqrt{-x+y-1} \\sqrt{-x+y+1}}+4 z^3 \\sinh \\left(z^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(y-x)\ng = ((x/y)-z**4)**4\nh = cosh(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^4$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 4 z^3 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**4\ng = cos(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7 x-9}+e^{-5 x-4}$\n", - "Output Answer": [ - "$25 e^{-5 x-4}-\\frac{49}{4 (7 x-9)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(7*x-9)+math.e**(-5*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{16}{2401 x^4}$\n", - "Output Answer": [ - "$\\frac{320}{2401 x^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (16/(2401*x**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{z^3}{y^3}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 z^3}{y^4},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\cos (x)-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y+z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x y)$, $g(x,y,z) = \\sin ^{-1}(x+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{\\sqrt{x y-1} \\sqrt{x y+1}} & \\frac{x}{\\sqrt{x y-1} \\sqrt{x y+1}} & 0 \\\\\n \\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x*y)\ng = asin(x+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(y^2\\right)$, $g(x,y,z) = \\sqrt{x y^2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{x y}{\\sqrt{x y^2}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y**2)\ng = sqrt(x*y**2)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos \\left(y-z^4\\right)$, and $h(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{-4 z^3 \\sin \\left(y-z^4\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos(y-z**4)\nh = cos(y-z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{x z}}-\\frac{1}{\\sqrt{1-y^2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = acos(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-x^5-1}+\\log \\left(3 x^4-8\\right)$\n", - "Output Answer": [ - "$\\frac{12 x^3}{3 x^4-8}-\\frac{5 x^4}{2 \\sqrt{-x^5-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-x**5-1)+log(3*x**4-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{z-x}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n -\\frac{1}{2 \\sqrt{z-x}} & 0 & \\frac{1}{2 \\sqrt{z-x}} \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = sqrt(z-x)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(y^5\\right)$, $g(x,y,z) = \\frac{1}{x-y^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{5 y^4}{\\left(x-y^5\\right)^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y**5)\ng = (1/(x-y**5))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{11}{2}-\\frac{9 x}{2}\\right)-\\cos ^{-1}(4-8 x)$\n", - "Output Answer": [ - "$\\frac{9}{9 x-11}-\\frac{8}{\\sqrt{1-(4-8 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log((11/2)-((9*x)/2))-acos(4-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x+4) \\left(e^4 \\left(1+\\tan ^2(4)\\right)+e^4 \\tan (4)\\right)-e^4 \\tan (4)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$4 e^{7 x^4+2 x^2+6} x \\left(7 x^2+1\\right)$\n", - "Output Answer": [ - "$e^{7 x^4+2 x^2+6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 4*math.e**(7*x**4+2*x**2+6)*x*(7*x**2+1)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4 x+6)-\\cos ^{-1}(3 x+7)$\n", - "Output Answer": [ - "$\\frac{3}{\\sqrt{1-(3 x+7)^2}}-4 \\sin (4 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x+6)-acos(3*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{5}{2}-\\frac{7 x}{2}\\right)-\\frac{1}{\\left(6 x+\\frac{15}{2}\\right)^5}$\n", - "Output Answer": [ - "$\\frac{30}{\\left(6 x+\\frac{15}{2}\\right)^6}+\\frac{7}{2} \\sin \\left(\\frac{1}{2} (5-7 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((5/2)-((7*x)/2))-(1/((6*x+(15/2))**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (2 x+3)-e^{9 x+9}$\n", - "Output Answer": [ - "$-9 e^{9 x+9}-2 \\sin (2 x+3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(2*x+3)-math.e**(9*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-x^2}}+\\sin (x-z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = cos(y+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{z^2}{y^2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = ((z**2)/(y**2))\nh = ((z**2)/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x^2}{y^4 z}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 x e^{\\frac{x^2}{y^4 z}}}{y^4 z},-\\frac{4 x^2 e^{\\frac{x^2}{y^4 z}}}{y^5 z},-\\frac{x^2 e^{\\frac{x^2}{y^4 z}}}{y^4 z^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x**2)/(y**4*z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin ^{-1}\\left(x^4\\right)$ on the interval $x = 3$ to $x = 3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(x**4)\na = 3\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{14 x}{3}+\\frac{26}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{196}{9} \\sin \\left(\\frac{2}{3} (7 x+13)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((14*x)/3)+(26/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y^2\\right)$, $g(x,y,z) = \\frac{1}{y^4}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-2 y \\cos \\left(y^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**2)\ng = (1/(y**4))\nh = (1/(y**4))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x-8}-\\cos (7 x+4)$\n", - "Output Answer": [ - "$8 e^{8 x-8}+7 \\sin (7 x+4)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x-8)-cos(7*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\sqrt[3]{x y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{3 \\sqrt[3]{x y-z}^2},-\\frac{y}{3 \\sqrt[3]{x y-z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-6 x^2-2\\right)+(7-7 x)^3$\n", - "Output Answer": [ - "$6 \\left(-\\frac{6 x^2}{\\left(3 x^2+1\\right)^2}+\\frac{1}{3 x^2+1}-343 x+343\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-6*x**2-2)+(7-7*x)**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{y^5}$, and $h(x,y,z) = \\sin ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{\\sqrt{1-x^2 z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/(y**5))\nh = (1/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^4\\right)$, $g(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$4 x^3 \\cos \\left(x^4\\right)-\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4)\ng = sin((z/y))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x+9)$\n", - "Output Answer": [ - "$\\frac{4}{4 x+9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (\\log (x-2))$\n", - "Output Answer": [ - "$\\frac{\\sin (\\log (x-2))-\\cos (\\log (x-2))}{(x-2)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(log(x-2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\tan (x+y+z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(x+y+z),-\\sec ^2(x+y+z),\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\cos (x-y)+\\cos (y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-y)\ng = sin(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{y^2-x}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y^2-x}},\\frac{y}{\\sqrt{y^2-x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**2-x)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x+y)^2}$, $g(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{(x+y)^3} & -\\frac{2}{(x+y)^3} & 0 \\\\\n 0 & \\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\sec ^2\\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+y)**2))\ng = tan((y/z))\nh = sin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-\\frac{x^6}{45}-\\frac{x^4}{3}+x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x-6)+\\cos (2 x+5)$\n", - "Output Answer": [ - "$\\frac{2}{2 x-3}-2 \\sin (2 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x-6)+cos(2*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x y)$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$\\frac{y}{\\sqrt{1-x^2 y^2}}+x \\sec ^2(x z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*y)\ng = atan(x)\nh = tan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = e^y$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\frac{5 x^4}{3 \\sqrt[3]{x^5}^2}+\\sec ^2(y-z)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5)\ng = math.e**y\nh = -tan(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{x}{2}+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{4} \\cos \\left(\\frac{x+15}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((x/2)+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sin ^{-1}(x z)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = asin(x*z)\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\frac{x^2}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n 0 & z & y \\\\\n \\frac{2 x}{z^2} & 0 & -\\frac{2 x^2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+z)\ng = y*z\nh = ((x**2)/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{e^{3-7 x}}{x^3}$\n", - "Output Answer": [ - "$\\frac{e^{3-7 x} (7 x+3)}{x^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-((math.e**(3-7*x))/(x**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^3+y\\right)$, $g(x,y,z) = \\sin ^{-1}(y-z)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(y-z)^2}},0,-\\cos \\left(x^3+y\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**3+y)\ng = asin(y-z)\nh = asin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x-\\frac{1}{y^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (7 x+8)+\\tan ^{-1}(7 x+5)$\n", - "Output Answer": [ - "$-\\frac{98 (7 x+5)}{\\left((7 x+5)^2+1\\right)^2}-49 \\sin (7 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x+8)+atan(7*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\frac{386}{375} (x+2)^3-\\frac{148}{25} (x+2)^2+\\frac{61 (x+2)}{5}-8-\\tan ^{-1}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**3\nseries = f.subs(x, g).series(x, -2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\sinh (x-y-z)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n \\cosh (x-y-z) & -\\cosh (x-y-z) & -\\cosh (x-y-z) \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y*z)\ng = sinh(x-y-z)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (4 x+7)-e^{1-\\frac{15 x}{2}}$\n", - "Output Answer": [ - "$\\frac{15}{2} e^{1-\\frac{15 x}{2}}+4 \\cos (4 x+7)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(4*x+7)-math.e**(1-((15*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cosh (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sinh (x),\\frac{3 x}{2 (x y)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y)**(3/2)))\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x z)^{3/2}$, $g(x,y,z) = y+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3}{2} z \\sqrt{x z}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*z)**(3/2)\ng = y+z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$i \\sqrt{2} \\sqrt{x-1} (-1)^{\\left\\lfloor -\\frac{\\arg (x-1)}{2 \\pi }\\right\\rfloor }+(x-1) \\cos (1)+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(1-\\frac{7 x^2}{2}\\right)+\\left(-\\frac{17 x}{2}-\\frac{1}{2}\\right)^4$\n", - "Output Answer": [ - "$\\frac{14 x}{7 x^2-2}+\\frac{17}{4} (17 x+1)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(1-((7*x**2)/2))+(-((17*x)/2)-(1/2))**4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$i \\sqrt{2} \\sqrt{x-1} (-1)^{\\left\\lfloor -\\frac{\\arg (x-1)}{2 \\pi }\\right\\rfloor }$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-\\frac{x^3}{3}+\\log \\left(x^2\\right)-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{x^3}{6}+x^2+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = asinh(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-z^4}$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = \\cos \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-z^4}^2} & 0 & -\\frac{4 z^3}{3 \\sqrt[3]{x-z^4}^2} \\\\\n 0 & -2 y \\sin \\left(y^2\\right) & 0 \\\\\n 0 & 0 & -4 z^3 \\sin \\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-z**4)\ng = cos(y**2)\nh = cos(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2+y$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\left(z^4\\right)^{3/2}}$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2+y\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{z}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = y^3 z^3$", - "Output Answer": [ - "$3 y^3 z^2-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = cos(y)\nh = y**3*z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = -\\sin \\left(y^3-z\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\cos \\left(y^3-z\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = -sin(y**3-z)\nh = -sin(y**3-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**(3/2)\ng = (1/(y**(3/2)))\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = x^2-y+z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{-1,y,2 x-z\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = x**2-y+z\nh = x**2-y+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5 z^5$, $g(x,y,z) = \\frac{x}{y}+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5*z**5\ng = (x/y)+z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{y^4}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n -\\frac{y^4}{x^2} & \\frac{4 y^3}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = x\nh = ((y**4)/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(7 x^4\\right)+\\sqrt{-5 x-8}$\n", - "Output Answer": [ - "$\\frac{28 x^3}{49 x^8+1}-\\frac{5}{2 \\sqrt{-5 x-8}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(7*x**4)+sqrt(-5*x-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{z}{\\sqrt{1-x^2 z^2}}+\\frac{1}{y^2+1}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*z)\ng = atan(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\sqrt[3]{x-z}$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{x-z}^2},1-\\frac{1}{2 \\sqrt{x-z}},\\frac{1}{3 \\sqrt[3]{x-z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = cbrt(x-z)\nh = cbrt(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\frac{3}{2} x \\sqrt{x z}+\\text{sech}^2(y)-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = tanh(y)\nh = (x*z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y$, and $h(x,y,z) = (y+z)^2$", - "Output Answer": [ - "$2 (y+z)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+y\nh = (y+z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^5$", - "Output Answer": [ - "$x^{11/2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**5\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = log(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{2}{5} e^{3/5} x^2 \\left(14 e^{\\frac{16}{5}-\\frac{7 x^4}{5}} x+51 e^{\\frac{34 x^3}{5}}\\right)$\n", - "Output Answer": [ - "$e^{3/5} \\left(e^{\\frac{34 x^3}{5}}-e^{\\frac{16}{5}-\\frac{7 x^4}{5}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = (2/5)*math.e**(3/5)*x**2*(14*math.e**((16/5)-((7*x**4)/5))*x+51*math.e**((34*x**3)/5))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(x+y^2\\right)$, $g(x,y,z) = \\cos \\left(y^2+z\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh \\left(x+y^2\\right) & 2 y \\sinh \\left(x+y^2\\right) & 0 \\\\\n 0 & -2 y \\sin \\left(y^2+z\\right) & -\\sin \\left(y^2+z\\right) \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x+y**2)\ng = cos(y**2+z)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y-z$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,-1,-x\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y-z\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = \\sinh ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{x^2 z^2+1}}+\\frac{1}{2 \\sqrt{x}}+\\frac{5 y^4}{y^{10}+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(y**5)\nh = asinh(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{(3 x-2)^5}{\\sqrt{7-2 x}}$\n", - "Output Answer": [ - "$-\\frac{(2-3 x)^4 (27 x-103)}{(7-2 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((3*x-2)**5)/(sqrt(7-2*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = tan(y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sqrt[3]{x^2}$", - "Output Answer": [ - "$\\frac{11 e^2 (x-2)^2}{36\\ 2^{2/3}}+\\frac{1}{3} \\sqrt[3]{2} e^2 (x-2)+\\frac{e^2}{2^{2/3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = cbrt(x**2)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (2 x)$ on the interval $x = 3$ to $x = 6$\n", - "Output Answer": [ - "$\\int_3^6 \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x)\na = 3\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = \\frac{y^4}{z^4}$", - "Output Answer": [ - "$5 x^4-\\frac{4 y^4}{z^5}-\\frac{1}{y^2 z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = (1/(y*z))\nh = ((y**4)/(z**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^6$", - "Output Answer": [ - "$(x-3) (1458 \\sin (3)+729 \\cos (3))+729 \\sin (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**6\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x z^4}{y}\\right)$", - "Output Answer": [ - "$-\\frac{x^2 z^8 \\cos \\left(\\frac{x z^4}{y}\\right)}{y^4}-\\frac{16 x^2 z^6 \\cos \\left(\\frac{x z^4}{y}\\right)}{y^2}-\\frac{2 x z^4 \\sin \\left(\\frac{x z^4}{y}\\right)}{y^3}-\\frac{z^8 \\cos \\left(\\frac{x z^4}{y}\\right)}{y^2}-\\frac{12 x z^2 \\sin \\left(\\frac{x z^4}{y}\\right)}{y}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((x*z**4)/y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3-7 x^4}+\\log \\left(\\frac{x}{2}-4\\right)$\n", - "Output Answer": [ - "$\\frac{1}{x-8}-\\frac{14 x^3}{\\sqrt{3-7 x^4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3-7*x**4)+log((x/2)-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{y z^5}$", - "Output Answer": [ - "$\\left\\{\\frac{z^5}{3 \\sqrt[3]{y z^5}^2},5 z^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(4-x)$\n", - "Output Answer": [ - "$\\frac{4-x}{\\left(-x^2+8 x-15\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(4-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$e^x-\\frac{1}{y^2}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{x}{z}\\right)^{3/2}$, $g(x,y,z) = \\sqrt{x-y^4}$, and $h(x,y,z) = y^4+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{\\frac{x}{z}}}{2 z} & 0 & -\\frac{3 x \\sqrt{\\frac{x}{z}}}{2 z^2} \\\\\n \\frac{1}{2 \\sqrt{x-y^4}} & -\\frac{2 y^3}{\\sqrt{x-y^4}} & 0 \\\\\n 0 & 4 y^3 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/z)**(3/2)\ng = sqrt(x-y**4)\nh = y**4+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x z}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{(x+y)^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 (x+y)^{5/2}}-\\frac{1}{z},\\frac{3}{2 (x+y)^{5/2}}-\\frac{1}{x z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x*z))\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{z^4-x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -e^{z^4-x} & 0 & 4 z^3 e^{z^4-x} \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z**4-x)\ng = (1/(y**(3/2)))\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y+z)$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y+z)\ng = tan(y*z)\nh = sin((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$\\frac{4 x \\log (x)}{\\pi ^2}+\\frac{2 \\log (x)}{\\pi }$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = acos(x)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left\\{\\cos (y),0,-\\frac{3}{2 (x+y)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/((x+y)**(3/2)))\nh = (1/((x+y)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3 \\sqrt{y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = (x+z)^2$", - "Output Answer": [ - "$\\left\\{0,2 (-x-z),\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n -\\frac{1}{x^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-z)\ng = sin((x/y))\nh = (1/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\cos ^{-1}(z-y)$", - "Output Answer": [ - "$\\cos (x)-\\frac{1}{\\sqrt{1-(z-y)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = x\nh = acos(z-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\{-x \\sin (x y),y \\sin (x y),-x \\cos (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$-\\frac{27}{25} (x-2)^2-\\frac{19 (x-2)}{5}-4+\\tan ^{-1}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**2\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$\\frac{1}{2\\ 2^{2/3}}-\\frac{5 (x-2)}{12\\ 2^{2/3}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\frac{2}{z^3}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^6}$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{6}{z^7},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**6))\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\frac{1}{y^4}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x-z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = (1/(y**4))\nh = (1/(y**4))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z^2+1},-\\text{sech}^2(x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = atan(z)\nh = atan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = (z-y)^4$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-4 (z-y)^3-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = (z-y)**4\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{\\sin (z),0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5+z$, $g(x,y,z) = e^{x^5+z}$, and $h(x,y,z) = \\sqrt{y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-z}}-e^{x^5+z},1,5 x^4 e^{x^5+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5+z\ng = math.e**(x**5+z)\nh = math.e**(x**5+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\cos \\left(\\frac{13 x}{3}\\right)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(((13*x)/3)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (x+8) \\sin (8-7 x)$\n", - "Output Answer": [ - "$-\\frac{14 (x+8) \\cos (8-7 x)+\\left(49 (x+8)^2 \\log (x+8)+1\\right) \\sin (8-7 x)}{(x+8)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x+8)*sin(8-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\tan \\left(\\frac{x}{z^5}\\right)$, and $h(x,y,z) = \\sqrt{\\frac{y}{z^5}}$", - "Output Answer": [ - "$\\left\\{\\frac{5 x \\sec ^2\\left(\\frac{x}{z^5}\\right)}{z^6}+\\frac{1}{2 z^5 \\sqrt{\\frac{y}{z^5}}},0,\\frac{\\sec ^2\\left(\\frac{x}{z^5}\\right)}{z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = tan((x/(z**5)))\nh = tan((x/(z**5)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3-5 x} (8-8 x)^3$\n", - "Output Answer": [ - "$512 e^{3-5 x} (x-1)^2 (5 x-8)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3-5*x)*(8-8*x)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x-1} \\cos ^{-1}\\left(\\frac{1}{2}-3 x\\right)$\n", - "Output Answer": [ - "$e^{3 x-1} \\left(\\frac{2}{\\sqrt{-4 x^2+\\frac{4 x}{3}+\\frac{1}{3}}}+3 \\cos ^{-1}\\left(\\frac{1}{2}-3 x\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x-1)*acos((1/2)-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (x+3)$\n", - "Output Answer": [ - "$-\\frac{1}{(x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{z^2 \\left(\\frac{y^2}{z^2}+1\\right)}-\\sin (y),0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = atan(y/z)\nh = atan(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(z-y)^2}$, $g(x,y,z) = \\cos ^{-1}(x-y)$, and $h(x,y,z) = \\tan ^{-1}(x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{2}{(z-y)^3} & -\\frac{2}{(z-y)^3} \\\\\n -\\frac{1}{\\sqrt{1-(x-y)^2}} & \\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n \\frac{1}{(x-z)^2+1} & 0 & -\\frac{1}{(x-z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((z-y)**2))\ng = acos(x-y)\nh = atan(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}+z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 y \\sqrt{\\frac{x}{y}+z}},-\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}+z}},\\frac{1}{2 \\sqrt{\\frac{x}{y}+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/y)+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y^3}$, $g(x,y,z) = e^z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{y^2}{\\sqrt[3]{y^3}^2} & 0 \\\\\n 0 & 0 & e^z \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y**3)\ng = math.e**z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{x/z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\frac{e^{x/z}}{z} & 0 & -\\frac{x e^{x/z}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+y)\ng = cos(y)\nh = math.e**(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z^3-x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{z^3}{y}$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{z^3-x}}+\\frac{3 z^2}{y}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z**3-x)\ng = tan(y)\nh = ((z**3)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log \\left(x+z^3\\right)$, and $h(x,y,z) = \\sin \\left(z^3\\right)$", - "Output Answer": [ - "$\\frac{1}{x}+3 z^2 \\cos \\left(z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(x+z**3)\nh = sin(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = tan(y)\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2-2 x^5}$\n", - "Output Answer": [ - "$20 e^{2-2 x^5} x^3 \\left(5 x^5-2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2-2*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(5 x^2-2\\right)^5}+\\tan (5 x+9)$\n", - "Output Answer": [ - "$5 \\sec ^2(5 x+9)-\\frac{50 x}{\\left(2-5 x^2\\right)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((5*x**2-2)**5))+tan(5*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+x \\cos (x y)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sin(x*y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{\\frac{1}{e^4}} \\sin ^{-1}(4-4 x)$\n", - "Output Answer": [ - "$\\frac{4 e^{\\frac{1}{e^4}}}{\\sqrt{1-16 (x-1)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(1/(math.e**4))*asin(4-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}\\left(x^3\\right)$ and $g(x) = $e^{x^5}$", - "Output Answer": [ - "$\\frac{\\pi }{2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = acos(x**3)\ng = math.e**(x**5)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x^3-1}-\\cos (2-8 x)$\n", - "Output Answer": [ - "$9 e^{3 x^3-1} x \\left(9 x^3+2\\right)+64 \\cos (2-8 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x**3-1)-cos(2-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+z)^{3/2}$, $g(x,y,z) = \\tan (x z)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x+z}}{2} & 0 & \\frac{3 \\sqrt{x+z}}{2} \\\\\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n \\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}} & 0 & -\\frac{x}{z^2 \\sqrt{1-\\frac{x^2}{z^2}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+z)**(3/2)\ng = tan(x*z)\nh = asin(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(9-3 x^5\\right)$\n", - "Output Answer": [ - "$60 x^3 \\sin \\left(9-3 x^5\\right)-225 x^8 \\cos \\left(9-3 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(9-3*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{\\frac{x}{z}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}},0,\\frac{1}{2 z \\sqrt{\\frac{x}{z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt((x/z))\nh = sqrt((x/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\sinh (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n 0 & \\cosh (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = (y/z)\nh = sinh(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,-x\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x-y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x-y) & -\\cos (x-y) & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x-y)\ng = math.e**y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = y z$, and $h(x,y,z) = \\tan ^{-1}(z (x+y))$", - "Output Answer": [ - "$\\left\\{\\frac{z}{z^2 (x+y)^2+1}-y,1-\\frac{z}{z^2 (x+y)^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$4 x-\\tan (x)$\n", - "Output Answer": [ - "$-\\tan ^3(4)-\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(4*x-tan(x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+3)^2 \\left(1+\\frac{\\sin (3)}{2}\\right)+(x+3) (\\cos (3)-6)+9-\\sin (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = sin(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y z}$, $g(x,y,z) = y^5$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$5 y^4+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y*z)\ng = y**5\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^5$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$5 (x+z)^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**5\ng = sqrt(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\frac{1}{\\sqrt{x}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & 0 \\\\\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4\ng = (1/(sqrt(x)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{y^5-z}}$", - "Output Answer": [ - "$\\frac{75 y^8}{4 \\left(y^5-z\\right)^{5/2}}-\\frac{10 y^3}{\\left(y^5-z\\right)^{3/2}}+\\frac{3}{4 \\left(y^5-z\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y**5-z)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\left(x y^5\\right)^{3/2}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n -\\frac{3 y^5}{2 \\left(x y^5\\right)^{5/2}} & -\\frac{15 x y^4}{2 \\left(x y^5\\right)^{5/2}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = (1/((x*y**5)**(3/2)))\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{y^3}{x^3}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n -\\frac{3 y^3}{x^4} & \\frac{3 y^2}{x^3} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = ((y**3)/(x**3))\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (5-7 x)-\\sin (7 x+7)$\n", - "Output Answer": [ - "$14 \\sin (6) \\sin (7 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(5-7*x)-sin(7*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y**5)\nh = cos(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (x-1)}{\\log \\left(2-x^2\\right)}$\n", - "Output Answer": [ - "$\\frac{\\frac{\\log \\left(2-x^2\\right)}{x-1}-\\frac{2 x \\log (x-1)}{x^2-2}}{\\log ^2\\left(2-x^2\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(x-1))/(log(2-x**2))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{3 \\sqrt[3]{y+z}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = math.e**x\nh = cbrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x^5-y}{z}}}$", - "Output Answer": [ - "$\\frac{75 x^8}{4 z^2 \\left(\\frac{x^5-y}{z}\\right)^{5/2}}+\\frac{3}{4 z^2 \\left(\\frac{x^5-y}{z}\\right)^{5/2}}-\\frac{x^5-y}{z^3 \\left(\\frac{x^5-y}{z}\\right)^{3/2}}+\\frac{3 \\left(x^5-y\\right)^2}{4 z^4 \\left(\\frac{x^5-y}{z}\\right)^{5/2}}-\\frac{10 x^3}{z \\left(\\frac{x^5-y}{z}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(((x**5-y)/z))))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2-4 x^5}-\\sqrt{\\frac{5 x}{2}-\\frac{9}{2}}$\n", - "Output Answer": [ - "$-\\frac{10 x^4}{\\sqrt{2-4 x^5}}-\\frac{5}{4 \\sqrt{\\frac{5 x}{2}-\\frac{9}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2-4*x**5)-sqrt(((5*x)/2)-(9/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(7 x+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$98 \\tan \\left(7 x+\\frac{11}{2}\\right) \\sec ^2\\left(7 x+\\frac{11}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(7*x+(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$-\\frac{2 x^7}{45}-\\frac{x^5}{12}-2 x+\\frac{\\pi }{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n -1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = z-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(y+z^5\\right)^{3/2}}$, $g(x,y,z) = \\sin ^{-1}\\left(y+z^5\\right)$, and $h(x,y,z) = \\cos \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{5 z^4}{\\sqrt{1-\\left(y+z^5\\right)^2}},-\\frac{15 z^4}{2 \\left(y+z^5\\right)^{5/2}},\\frac{3}{2 \\left(y+z^5\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y+z**5)**(3/2)))\ng = asin(y+z**5)\nh = asin(y+z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = sqrt(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cbrt(z/x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\frac{x^2}{\\sqrt[3]{x^3}^2}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**3)\ng = cos(y)\nh = (1/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-5} \\cos \\left(9 x^5\\right)$\n", - "Output Answer": [ - "$e^{4 x-5} \\left(4 \\cos \\left(9 x^5\\right)-45 x^4 \\sin \\left(9 x^5\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-5)*cos(9*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y^3 z$, $g(x,y,z) = \\sin ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = x y^3$", - "Output Answer": [ - "$\\left\\{3 x y^2,x y^3-y^3,-3 x y^2 z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y**3*z\ng = asin(y**3)\nh = asin(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+z}$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}-\\frac{1}{(x+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+z))\ng = (1/(x**(3/2)))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$x \\sec ^2(x y)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = tan(x*y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = x^5 z^5$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = x**5*z**5\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-9 x-4)^2+e^{5-7 x}$\n", - "Output Answer": [ - "$162 x-7 e^{5-7 x}+72$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((-9*x-4)**2+math.e**(5-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x^5}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{3 \\sqrt[3]{x^5}^2} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n -\\frac{5 z \\cos \\left(\\frac{z}{x^5}\\right)}{x^6} & 0 & \\frac{\\cos \\left(\\frac{z}{x^5}\\right)}{x^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**5)\ng = cos(y)\nh = sin((z/(x**5)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x^2}+e^{7 x-4}$\n", - "Output Answer": [ - "$12 e^{6 x^2} x+7 e^{7 x-4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x**2)+math.e**(7*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x-y^2}{z^4}$", - "Output Answer": [ - "$\\frac{20 \\left(x-y^2\\right)}{z^6}-\\frac{2}{z^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x-y**2)/(z**4))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = log(y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{31}{5}-\\frac{17 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{578}{25} \\tan \\left(\\frac{1}{5} (31-17 x)\\right) \\sec ^2\\left(\\frac{1}{5} (31-17 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan((31/5)-((17*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{z}{y}\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{3 z}{2 y^2 \\left(\\frac{z}{y}\\right)^{5/2}} & -\\frac{3}{2 y \\left(\\frac{z}{y}\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = tan(x)\nh = (1/((z/y)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (x+8)}{(4 x+7)^5}$\n", - "Output Answer": [ - "$\\frac{(-4 x+10 \\sin (2 (x+8))-7) \\sec ^2(x+8)}{(4 x+7)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(x+8))/((4*x+7)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cosh (4 x)$\n", - "Output Answer": [ - "$8 \\cosh (12)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cosh(4*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\{-z \\sin (y z),0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-12 x^3 \\left(\\left(x^4-6\\right)^2+e^{3 x^4}\\right)$\n", - "Output Answer": [ - "$-\\left(x^4-6\\right)^3-e^{3 x^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -12*x**3*((x**4-6)**2+math.e**(3*x**4))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x-1) \\left(\\cos (1)-\\frac{\\sin (1)}{3}\\right)+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sinh \\left(x-y^5\\right)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,x,\\cosh \\left(x-y^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = sinh(x-y**5)\nh = sinh(x-y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$4 z^3-\\frac{z}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = cos(z)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(9 x+7)+\\sin (6 x+5)$\n", - "Output Answer": [ - "$\\frac{81 (9 x+7)}{\\left(1-(9 x+7)^2\\right)^{3/2}}-36 \\sin (6 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(9*x+7)+sin(6*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x-2} \\log (-5 x-7)$\n", - "Output Answer": [ - "$\\frac{\\frac{10 (x-2)}{5 x+7}+\\log (-5 x-7)}{2 \\sqrt{x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x-2)*log(-5*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y z)$, and $h(x,y,z) = (z-y)^4$", - "Output Answer": [ - "$\\frac{z}{y^2 z^2+1}+4 (z-y)^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(y*z)\nh = (z-y)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y-z^5}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y-z^5}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y-z**5)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = y^9$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 9 y^8 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = y**9\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\log \\left(x^4+z\\right)$", - "Output Answer": [ - "$\\frac{1}{x^4+z}+2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((y/z))\ng = y**2\nh = log(x**4+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x+y^3}{z}\\right)$", - "Output Answer": [ - "$-\\frac{9 y^4 \\left(x+y^3\\right)}{z^3 \\left(\\frac{\\left(x+y^3\\right)^2}{z^2}+1\\right)^{3/2}}+\\frac{6 y}{z \\sqrt{\\frac{\\left(x+y^3\\right)^2}{z^2}+1}}+\\frac{2 \\left(x+y^3\\right)}{z^3 \\sqrt{\\frac{\\left(x+y^3\\right)^2}{z^2}+1}}-\\frac{x+y^3}{z^3 \\left(\\frac{\\left(x+y^3\\right)^2}{z^2}+1\\right)^{3/2}}-\\frac{\\left(x+y^3\\right)^3}{z^5 \\left(\\frac{\\left(x+y^3\\right)^2}{z^2}+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh((x+y**3)/z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{z}{y}\\right)^{3/2}$, $g(x,y,z) = \\cos \\left(\\frac{x^3}{z}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3 z \\sqrt{\\frac{z}{y}}}{2 y^2} & \\frac{3 \\sqrt{\\frac{z}{y}}}{2 y} \\\\\n -\\frac{3 x^2 \\sin \\left(\\frac{x^3}{z}\\right)}{z} & 0 & \\frac{x^3 \\sin \\left(\\frac{x^3}{z}\\right)}{z^2} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/y)**(3/2)\ng = cos(((x**3)/z))\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{\\sin \\left(\\frac{x}{y}\\right)}{y} & \\frac{x \\sin \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n y \\sec ^2(x y) & x \\sec ^2(x y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((x/y))\ng = tan(x*y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{29 x}{5}+\\frac{44}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{841}{25} \\sin \\left(\\frac{1}{5} (29 x+44)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(((29*x)/5)+(44/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$x+\\sqrt{e^{5 x-9}}+5$\n", - "Output Answer": [ - "$\\frac{25}{4} \\sqrt{e^{5 x-9}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = x+sqrt(math.e**(5*x-9))+5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-x-5} \\sin (6-4 x)$\n", - "Output Answer": [ - "$\\frac{8 (x+5) \\cos (6-4 x)-\\sin (6-4 x)}{2 \\sqrt{-x-5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-x-5)*sin(6-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & e^{y+z} & e^{y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y+z)\ng = cbrt(y)\nh = math.e**(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^4\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{4}{x}+\\sec ^2(y)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**4)\ng = tan(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = z^4$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = z**4\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{23}{3}-7 x\\right)+\\cos ^{-1}\\left(-\\frac{8 x}{3}-\\frac{16}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{8}{\\sqrt{-64 x^2-256 x-247}}-7 \\cos \\left(\\frac{23}{3}-7 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin((23/3)-7*x)+acos(-((8*x)/3)-(16/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y z}\\right)$, $g(x,y,z) = \\cos \\left(\\frac{x+y}{z}\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}+z}}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 y^2 \\left(\\frac{x}{y}+z\\right)^{3/2}}-\\frac{(x+y) \\sin \\left(\\frac{x+y}{z}\\right)}{z^2},\\frac{1}{2 y \\left(\\frac{x}{y}+z\\right)^{3/2}}-\\frac{x}{y z^2 \\sqrt{\\frac{x^2}{y^2 z^2}+1}},\\frac{x}{y^2 z \\sqrt{\\frac{x^2}{y^2 z^2}+1}}-\\frac{\\sin \\left(\\frac{x+y}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x/(y*z))\ng = cos(((x+y)/z))\nh = cos(((x+y)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = math.e**y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{7 x^2}-\\log (-3 x-7)$\n", - "Output Answer": [ - "$\\frac{2}{7 x^3}-\\frac{3}{3 x+7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(7*x**2))-log(-3*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x$, and $h(x,y,z) = \\cosh ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n \\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}} & 0 & \\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x\nh = acosh(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{8}{3}-\\frac{17 x^4}{3}}+\\log \\left(\\frac{10}{3}-\\frac{7 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{7}{7 x-10}-\\frac{68}{3} e^{\\frac{8}{3}-\\frac{17 x^4}{3}} x^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((8/3)-((17*x**4)/3))+log((10/3)-((7*x)/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^{3 x} \\cos ^{-1}(4 x)$ on the interval $x = 0$ to $x = 0$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x)*acos(4*x)\na = 0\nb = 0\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-e^{y-x}+e^{y+z}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = math.e**(y+z)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(y-z^4\\right)$", - "Output Answer": [ - "$-16 z^6 \\sin \\left(y-z^4\\right)-\\sin \\left(y-z^4\\right)-12 z^2 \\cos \\left(y-z^4\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y-z**4)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = y**5\nh = (1/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(4-3 x^3\\right) \\tan (1-5 x)$\n", - "Output Answer": [ - "$5 \\cos \\left(4-3 x^3\\right) \\sec ^2(1-5 x)-9 x^2 \\sin \\left(4-3 x^3\\right) \\tan (1-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(4-3*x**3)*tan(1-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\cos ^{-1}\\left(\\frac{17 x}{2}+8\\right)-\\tan \\left(7 x+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{289 \\left(\\frac{17 x}{2}+8\\right)}{4 \\left(1-\\left(\\frac{17 x}{2}+8\\right)^2\\right)^{3/2}}-98 \\tan \\left(7 x+\\frac{7}{2}\\right) \\sec ^2\\left(7 x+\\frac{7}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -acos(((17*x)/2)+8)-tan(7*x+(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^4$, and $h(x,y,z) = -\\tan (x-z)$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(x-z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = \\sin \\left(\\frac{x^2}{z}\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{x^2 \\cos \\left(\\frac{x^2}{z}\\right)}{z^2},0,\\frac{2 x \\cos \\left(\\frac{x^2}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = sin(((x**2)/z))\nh = sin(((x**2)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-x^4-\\frac{16}{3}\\right)^4-\\cos \\left(4-\\frac{14 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{2}{27} \\left(8 x^3 \\left(3 x^4+16\\right)^3-63 \\sin \\left(4-\\frac{14 x}{3}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-x**4-(16/3))**4-cos(4-((14*x)/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{6} e^{\\cos (3-6 x)}$\n", - "Output Answer": [ - "$\\sin (3-6 x) \\left(-e^{\\cos (3-6 x)}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-(1/6)*math.e**(cos(3-6*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{1}{x^2 y} & -\\frac{1}{x y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*y)\ng = sqrt(y)\nh = (1/(x*y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x**5)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\cos (x+y)-\\sin (x)-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(x+y)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{4 x^3}{\\sqrt{2 x^4-\\frac{15}{2}}}$\n", - "Output Answer": [ - "$\\sqrt{2 x^4-\\frac{15}{2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((4*x**3)/(sqrt(2*x**4-(15/2))))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(x+z^3\\right)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{3 z^2}{\\left(x+z^3\\right)^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = atan(x+z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^4\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-\\frac{1}{45} x^3 \\log \\left(x^4\\right)-\\frac{1}{3} x \\log \\left(x^4\\right)+\\frac{\\log \\left(x^4\\right)}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**4)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cosh \\left(\\cos \\left(3 x^3+9\\right)\\right)$\n", - "Output Answer": [ - "$81 x^4 \\sin ^2\\left(3 \\left(x^3+3\\right)\\right) \\cosh \\left(\\cos \\left(3 \\left(x^3+3\\right)\\right)\\right)-9 x \\left(2 \\sin \\left(3 \\left(x^3+3\\right)\\right)+9 x^3 \\cos \\left(3 \\left(x^3+3\\right)\\right)\\right) \\sinh \\left(\\cos \\left(3 \\left(x^3+3\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cosh(cos(3*x**3+9))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$0$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(0)\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(7 x+\\frac{3}{2}\\right)^3}$\n", - "Output Answer": [ - "$\\frac{588}{\\left(7 x+\\frac{3}{2}\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x+(3/2))**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = (x+y)^4$", - "Output Answer": [ - "$\\left\\{4 (x+y)^3,-4 (x+y)^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = y**3\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = x+y\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^{16}$", - "Output Answer": [ - "$(x+4) \\left(17179869185+\\tan ^2(4)\\right)-4294967296-\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**16\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(4 x^2+3\\right)$\n", - "Output Answer": [ - "$-\\frac{2 \\sqrt{2} \\left(2 x^4-1\\right)}{\\left(-2 x^4-3 x^2-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(4*x**2+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = sqrt(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 z^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan ^{-1}(x-y)$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z^5}}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x-y)^2+1} & \\frac{1}{(x-y)^2+1} & 0 \\\\\n 1 & -1 & 0 \\\\\n -\\frac{1}{2 z^5 \\left(\\frac{x}{z^5}\\right)^{3/2}} & 0 & \\frac{5 x}{2 z^6 \\left(\\frac{x}{z^5}\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -atan(x-y)\ng = x-y\nh = (1/(sqrt((x/(z**5)))))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(y z^2\\right)$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{z^2}{y^2 z^4+1},\\frac{2 y z}{y^2 z^4+1}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y*z**2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{z^2}$\n", - "Output Answer": [ - "$\\left\\{0,0,2 e^{z^2} z\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z**2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = (1/(sqrt(y)))\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 z^8}$, $g(x,y,z) = z^4-y$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\left\\{-4 z^3,-\\frac{8}{x^2 z^9},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*z**8))\ng = z**4-y\nh = z**4-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+z}}+\\frac{3 \\sqrt{z}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = y\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y^2}{z}}$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y^2}{2 z^2 \\sqrt{\\frac{y^2}{z}}},-\\frac{y}{z \\sqrt{\\frac{y^2}{z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((y**2)/z))\ng = cos(y**2)\nh = cos(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan (y-z)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n 0 & 0 & e^z \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = -tan(y-z)\ng = math.e**z\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(x-z)^{3/2}}$", - "Output Answer": [ - "$\\frac{3}{2 (x-z)^{5/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3\ng = y\nh = (1/((x-z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\frac{1}{1-y^2}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = atanh(y)\nh = asin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^2+y}}$", - "Output Answer": [ - "$\\frac{3 x^2}{\\left(x^2+y\\right)^{5/2}}-\\frac{1}{\\left(x^2+y\\right)^{3/2}}+\\frac{3}{4 \\left(x^2+y\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**2+y)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,-e^{x-z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-z)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = cbrt(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (8)-\\cos (x+2)$\n", - "Output Answer": [ - "$\\cos (x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8)-cos(x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\sin (y+z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = y**(3/2)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (8-6 x) \\tan (7-6 x)$\n", - "Output Answer": [ - "$6 \\left(\\cos (8-6 x) \\tan (7-6 x)+\\sin (8-6 x) \\sec ^2(7-6 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(8-6*x)*tan(7-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{-x-5}-\\cos (4-8 x)$\n", - "Output Answer": [ - "$\\frac{1}{(x+5)^2}-8 \\sin (4-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(-x-5))-cos(4-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(x^5\\right)$, $g(x,y,z) = z^5$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left\\{z-5 z^4,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x**5)\ng = z**5\nh = z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{15 x^4}{2 \\sqrt{-3 x^5-\\frac{17}{5}}}$\n", - "Output Answer": [ - "$\\sqrt{-3 x^5-\\frac{17}{5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((15*x**4)/(2*sqrt(-3*x**5-(17/5))))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin \\left(7 x^2+1\\right)}{(9-9 x)^3}$\n", - "Output Answer": [ - "$\\frac{3 \\sin \\left(7 x^2+1\\right)-14 (x-1) x \\cos \\left(7 x^2+1\\right)}{729 (x-1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(7*x**2+1))/((9-9*x)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+5}-\\sqrt{2-6 x}$\n", - "Output Answer": [ - "$e^{x+5}+\\frac{3}{\\sqrt{2-6 x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+5)-sqrt(2-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\frac{y^4}{z}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{y^4}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = math.e**z\nh = ((y**4)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y z)$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = (y z)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2} z \\sqrt{y z}-y \\cos (y z),-\\frac{y}{\\sqrt{1-y^2 z^2}},\\frac{z}{\\sqrt{1-y^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y*z)\ng = sin(y*z)\nh = sin(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{y^5}-z}$, $g(x,y,z) = \\frac{y^{20}}{x^4}$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\frac{20 y^{19}}{x^4}+\\frac{1}{3 y^5 \\sqrt[3]{\\frac{x}{y^5}-z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt((x/(y**5))-z)\ng = ((y**20)/(x**4))\nh = (1/(sqrt(x)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x^2+3 x-\\frac{5}{2}}$\n", - "Output Answer": [ - "$e^{-6 x^2+3 x-\\frac{5}{2}} (3-12 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x**2+3*x-(5/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**y\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^3\\right)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{3 x^2}{\\sqrt{1-x^6}}+5 y^4+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**3)\ng = y**5\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = log(x)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4-8 x^2}-\\cos (2 x+3)$\n", - "Output Answer": [ - "$4 \\cos (2 x+3)-\\frac{4}{\\left(1-2 x^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4-8*x**2)-cos(2*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x^3+4} \\cos \\left(6 x^5+8\\right)$\n", - "Output Answer": [ - "$-3 e^{x^3+4} x^2 \\left(10 x^2 \\sin \\left(6 x^5+8\\right)-\\cos \\left(6 x^5+8\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x**3+4)*cos(6*x**5+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{9 x}-\\log \\left(-5 x^2-6\\right)$\n", - "Output Answer": [ - "$9 e^{9 x}-\\frac{10 x}{5 x^2+6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(9*x)-log(-5*x**2-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{x-4} (-2 x-4)^3$\n", - "Output Answer": [ - "$-8 e^{x-4} \\left(x^3+12 x^2+42 x+44\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x-4)*(-2*x-4)**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (3-3 x)-\\frac{1}{(8-2 x)^5}$\n", - "Output Answer": [ - "$\\frac{15}{16 (x-4)^7}+18 \\tan (3-3 x) \\sec ^2(3-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(3-3*x)-(1/((8-2*x)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+z^4}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan \\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 z^3}{\\left(x+z^4\\right)^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+z**4))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(9 x^3+9\\right)^5$\n", - "Output Answer": [ - "$270 x \\left(9 x^3+9\\right)^3 \\left(63 x^3+9\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (9*x**3+9)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\cos (9-8 x)}$\n", - "Output Answer": [ - "$-\\frac{8 (\\cos (18-16 x)+3)}{\\cos ^{\\frac{3}{2}}(9-8 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(cos(9-8*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-z)^2$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,2 (z-y),\\frac{1}{3 \\sqrt[3]{x+y}^2}-2 (y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-z)**2\ng = cbrt(x+y)\nh = cbrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{65}{2} x^4 \\cos \\left(\\frac{13 x^5}{2}+7\\right)$\n", - "Output Answer": [ - "$\\sin \\left(\\frac{13 x^5}{2}+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (65/2)*x**4*cos(((13*x**5)/2)+7)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{x^2}-1,-\\frac{1}{2 (x+y)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = (1/(sqrt(x+y)))\nh = (1/(sqrt(x+y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$-65 \\sqrt[3]{3} (x+3)^2+117 \\sqrt[3]{3} (x+3)-81 \\sqrt[3]{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan ^{-1}\\left(y^4+z\\right)$, and $h(x,y,z) = y^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & \\frac{4 y^3}{\\left(y^4+z\\right)^2+1} & \\frac{1}{\\left(y^4+z\\right)^2+1} \\\\\n 0 & 4 y^3 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = atan(y**4+z)\nh = y**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{1-y^2}+\\cos (z)-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = atanh(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**4)\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-8 x-2)-\\tan (3-x)$\n", - "Output Answer": [ - "$\\frac{4}{4 x+1}+\\sec ^2(3-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-8*x-2)-tan(3-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^{3/2}}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\cosh (z)-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**(3/2)))\ng = acos(y)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(z \\left(x^5-y\\right)\\right)$", - "Output Answer": [ - "$-\\frac{25 x^8}{\\left(x^5-y\\right)^2}+\\frac{20 x^3}{x^5-y}-\\frac{1}{\\left(x^5-y\\right)^2}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z*(x**5-y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{x^7}{7}+\\frac{x^5}{5}+\\frac{2 x^3}{3}+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (1/y)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(y-z)^{3/2}}$, and $h(x,y,z) = (z-x)^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{3}{2 (y-z)^{5/2}} & \\frac{3}{2 (y-z)^{5/2}} \\\\\n -4 (z-x)^3 & 0 & 4 (z-x)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((y-z)**(3/2)))\nh = (z-x)**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-z)\ng = (1/(sqrt(y)))\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(5 x^4-6\\right)$\n", - "Output Answer": [ - "$-\\frac{4 \\sqrt{5} x^2 \\left(5 x^8+12 x^4-21\\right)}{\\left(-5 x^8+12 x^4-7\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(5*x**4-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (2 x+9)$\n", - "Output Answer": [ - "$-8 \\tan (2 x+9) \\sec ^2(2 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y+z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z^2}\\right)$", - "Output Answer": [ - "$-\\frac{2 x}{z^3 \\left(\\frac{x^2}{z^4}+1\\right)}+y e^{x y+z^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y+z**2)\ng = y\nh = atan(x/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{x}{y^3}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = (x/(y**3))\nh = (x/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(4 x^3\\right)-\\sin (7 x+6)$\n", - "Output Answer": [ - "$-12 x^2 \\cos \\left(4 x^3\\right)-7 \\cos (7 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(4*x**3)-sin(7*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{1,-1,\\frac{1}{2 y^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(8 x^2+7\\right)+\\cos ^{-1}(1-7 x)$\n", - "Output Answer": [ - "$\\frac{16 x}{8 x^2+7}+\\frac{\\sqrt{7}}{\\sqrt{(2-7 x) x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8*x**2+7)+acos(1-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tanh ^{-1}\\left(x^4\\right)$ and $g(x) = $\\sqrt{x^5}$", - "Output Answer": [ - "$\\frac{x^4}{\\sqrt{x^5}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atanh(x**4)\ng = sqrt(x**5)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (5 x)$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5*x)\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-6 x-6}-e^{2 x-6}$\n", - "Output Answer": [ - "$-4 e^{2 x-6}-\\frac{9}{(-6 x-6)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(-6*x-6)-math.e**(2*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{x}{2}-9} \\log \\left(\\frac{17}{2}-5 x\\right)$\n", - "Output Answer": [ - "$\\frac{e^{\\frac{x}{2}-9} \\left((10 x-17) \\log \\left(\\frac{17}{2}-5 x\\right)+20\\right)}{2 (10 x-17)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((x/2)-9)*log((17/2)-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & 4 z^3 \\cos \\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = atan(y)\nh = sin(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & e^y & 0 \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = math.e**y\nh = cbrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x+y-z^5\\right)$", - "Output Answer": [ - "$-\\frac{25 z^8 \\left(x+y-z^5\\right)}{\\left(1-\\left(x+y-z^5\\right)^2\\right)^{3/2}}+\\frac{20 z^3}{\\sqrt{1-\\left(x+y-z^5\\right)^2}}-\\frac{2 \\left(x+y-z^5\\right)}{\\left(1-\\left(x+y-z^5\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+y-z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (1)-\\tan (5-8 x)$\n", - "Output Answer": [ - "$8 \\sec ^2(5-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(1)-tan(5-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 y^2}$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{2}{x^3 y^2}-\\cos (y-z)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*y**2))\ng = -sin(y-z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = x+z\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-6 x^2}+e^{-5 x-7}$\n", - "Output Answer": [ - "$-\\frac{6 x}{\\sqrt{1-6 x^2}}-5 e^{-5 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-6*x**2)+math.e**(-5*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+z)^2}}-\\frac{1}{2 z^{3/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+z)\ng = y\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$e^{x-z}+\\frac{3 \\sqrt{y}}{2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-z)\ng = y**(3/2)\nh = x-y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-\\frac{17 x}{2}-\\frac{13}{2}\\right)^5}+\\sin \\left(\\frac{7 x}{2}+3\\right)$\n", - "Output Answer": [ - "$-\\frac{277440}{(17 x+13)^7}-\\frac{49}{4} \\sin \\left(\\frac{7 x}{2}+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-((17*x)/2)-(13/2))**5))+sin(((7*x)/2)+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan ^{-1}\\left(x^4\\right)$", - "Output Answer": [ - "$\\left(e^2-\\frac{32}{257}\\right) (x-2)+e^2-\\tan ^{-1}(16)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = atan(x**4)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{15}$, $g(x,y,z) = \\tan ^{-1}(y z)$, and $h(x,y,z) = \\cos ^{-1}\\left(x^3+y\\right)$", - "Output Answer": [ - "$15 x^{14}+\\frac{z}{y^2 z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**15\ng = atan(y*z)\nh = acos(x**3+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/z)\ng = (1/y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x-2) (4+\\sinh (2))+4+\\cosh (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = cosh(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (4-x)+\\tan ^{-1}(5-9 x)$\n", - "Output Answer": [ - "$-\\frac{162 (5-9 x)}{\\left((5-9 x)^2+1\\right)^2}-\\cos (4-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-x)+atan(5-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(2 x^3\\right)-(8 x+8)^4$\n", - "Output Answer": [ - "$-\\frac{3}{x^2}-49152 (x+1)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x**3)-(8*x+8)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = sin(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(x y^4+z^5\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{4 x y^3}{\\sqrt{1-\\left(x y^4+z^5\\right)^2}},\\frac{y^4}{\\sqrt{1-\\left(x y^4+z^5\\right)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(y**4)\nh = sin(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2 x-\\frac{7}{2}}$\n", - "Output Answer": [ - "$-\\frac{1}{\\left(2 x-\\frac{7}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2*x-(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (1-5 x)+\\tan (6 x+5)$\n", - "Output Answer": [ - "$6 \\sec ^2(6 x+5)-5 \\cos (1-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(1-5*x)+tan(6*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4}{y^4}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,\\frac{4 x^4}{y^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(y**4))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y z^2}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt{z^2-y}$", - "Output Answer": [ - "$\\frac{y z^2}{2 \\sqrt{x y z^2}}-\\frac{2}{y^3}+\\frac{z}{\\sqrt{z^2-y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y*z**2)\ng = (1/(y**2))\nh = sqrt(z**2-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x-z)$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{x+y}^2}-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},-\\frac{1}{3 \\sqrt[3]{x+y}^2}-\\frac{1}{1-(x-z)^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x-z)\ng = acos(y/z)\nh = acos(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$2 x+\\sec ^2(y)+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = tan(y)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{3}{2}-\\frac{7 x}{2}\\right)^3$\n", - "Output Answer": [ - "$-\\frac{147}{4} (7 x-3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((3/2)-((7*x)/2))**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{z^8}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{8}{z^9} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = math.e**y\nh = (1/(z**8))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-8 x-3}-\\log (5 x+4)$\n", - "Output Answer": [ - "$-\\frac{5}{5 x+4}-\\frac{4}{\\sqrt{-8 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-8*x-3)-log(5*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{47}{2} e^5 (x-5)^2+35 e^5 (x-5)+25 e^5$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = math.e**x\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x+y+z^3\\right)^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2}{\\left(x+y+z^3\\right)^3},-\\frac{2}{\\left(x+y+z^3\\right)^3},-\\frac{6 z^2}{\\left(x+y+z^3\\right)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y+z**3)**2))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\cos (8 x+7)}{2^{2/3}}$\n", - "Output Answer": [ - "$4 \\sqrt[3]{2} \\sin (8 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((cos(8*x+7))/(2**(2/3))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y z^3}$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z^3 e^{y z^3} & 3 y z^2 e^{y z^3} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y*z**3)\ng = math.e**y\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = (1/(sqrt(y)))\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^5}{z^5}$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5 y^5}{z^6},\\frac{1}{x+y}-\\frac{5 y^4}{z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**5)/(z**5))\ng = log(x+y)\nh = log(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y-z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{5}{2} x \\cos (9 x+5)$\n", - "Output Answer": [ - "$-\\frac{45}{2} (2 \\sin (9 x+5)+9 x \\cos (9 x+5))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5/2)*x*cos(9*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}\\left(x^4\\right)$ and $g(x) = $\\sqrt[3]{x^2}$", - "Output Answer": [ - "$(x-1) \\left(2 \\sqrt{2}+\\frac{2}{3} \\sinh ^{-1}(1)\\right)+\\sinh ^{-1}(1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x**4)\ng = cbrt(x**2)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\{0,\\sin (x-z),-x\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(7-5 x)$\n", - "Output Answer": [ - "$\\frac{25 (7-5 x)}{\\left(1-(7-5 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(7-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-9} \\sqrt{9 x-1}$\n", - "Output Answer": [ - "$\\frac{36 x-83}{2 \\sqrt{2 x-9} \\sqrt{9 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-9)*sqrt(9*x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\sin ^{-1}(8 x+3)}+1$\n", - "Output Answer": [ - "$\\frac{8 e^{\\sin ^{-1}(8 x+3)}}{\\sqrt{1-(8 x+3)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(asin(8*x+3))+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos ^{-1}(x-y)$, and $h(x,y,z) = (z-y)^4$", - "Output Answer": [ - "$\\left\\{-4 (z-y)^3,0,-\\frac{1}{\\sqrt{1-(x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = acos(x-y)\nh = acos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-4 x-\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{64}{(8 x+11)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x-(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{15}{2}-\\frac{3 x}{2}}+\\log \\left(-\\frac{17 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{4} e^{-\\frac{3}{2} (x-5)}-\\frac{1}{x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**((15/2)-((3*x)/2))+log(-((17*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,\\cos (y+z),-\\cos (y+z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y+z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7 x+\\frac{9}{2}\\right)-\\tan ^{-1}(1-2 x)$\n", - "Output Answer": [ - "$\\frac{1}{2 x^2-2 x+1}+\\frac{14}{14 x+9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x+(9/2))-atan(1-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7-3 x}+e^{6 x-1}$\n", - "Output Answer": [ - "$9 e^{-3 x-1} \\left(4 e^{9 x}+e^8\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7-3*x)+math.e**(6*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2}-\\frac{\\cos \\left(\\frac{x}{z}\\right)}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x^5$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,5 x^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x**5\nh = x**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = y z^4$, and $h(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\sec ^2(x+y)+z^4+\\frac{4 z^3}{z^8+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = y*z**4\nh = atan(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-4 x-1)^3-\\log (8 x)$\n", - "Output Answer": [ - "$\\frac{1}{x^2}-384 x-96$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-4*x-1)**3-log(8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(9 x+8)^5}$\n", - "Output Answer": [ - "$\\frac{2430}{(9 x+8)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((9*x+8)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y\ng = (1/(y**2))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (6-8 x) \\sin (8-4 x)$\n", - "Output Answer": [ - "$\\frac{8 \\sin (8-4 x)}{6-8 x}+4 \\log (6-8 x) \\cos (8-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(6-8*x)*sin(8-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y+z}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tanh ^{-1}(x+z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{1-(x+z)^2}-\\frac{1}{2 (y+z)^{3/2}},\\frac{1}{2 (y+z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y+z)))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (\\log (2 x-3))$\n", - "Output Answer": [ - "$-\\frac{4 (\\cos (\\log (2 x-3))-\\sin (\\log (2 x-3)))}{(3-2 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(log(2*x-3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan \\left(\\frac{x+y}{z}\\right)$, and $h(x,y,z) = \\cos (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n \\frac{\\sec ^2\\left(\\frac{x+y}{z}\\right)}{z} & \\frac{\\sec ^2\\left(\\frac{x+y}{z}\\right)}{z} & -\\frac{(x+y) \\sec ^2\\left(\\frac{x+y}{z}\\right)}{z^2} \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = tan(((x+y)/z))\nh = cos(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x-7}-\\sqrt{-x^2}$\n", - "Output Answer": [ - "$36 e^{6 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x-7)-sqrt(-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x z)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$z \\text{sech}^2(x z)+\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*z)\ng = acosh(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+y)\ng = asin(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2-6 x)-e^{-2 x-4}$\n", - "Output Answer": [ - "$2 e^{-2 (x+2)}+\\frac{3}{3 x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(log(2-6*x)-math.e**(-2*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z^3}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos \\left(x-z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z^2}{2 \\sqrt{x+z^3}}+\\sin \\left(x-z^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z**3)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(6 x+6)+\\tan (x+2)$\n", - "Output Answer": [ - "$\\frac{216 (x+1)}{\\left(1-36 (x+1)^2\\right)^{3/2}}+2 \\tan (x+2) \\sec ^2(x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(6*x+6)+tan(x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cbrt(x+y)\nh = log((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(-3 x^4\\right)$ on the interval $x = 2$ to $x = 11$\n", - "Output Answer": [ - "$-2 \\sqrt{5}+\\sqrt{137}-2 \\log \\left(9-4 \\sqrt{5}\\right)-2 \\log \\left(\\frac{1}{121} \\left(153+8 \\sqrt{137}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x**4)\na = 2\nb = 11\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = (1/(y**(3/2)))\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2},-\\frac{1}{y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-9 x^3+5 x-6}$\n", - "Output Answer": [ - "$e^{-9 x^3+5 x-6} \\left(729 x^4-270 x^2-54 x+25\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-9*x**3+5*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{1}{2 x}+\\tan (x)$ on the interval $x = 1$ to $x = 1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(2*x))+tan(x)\na = 1\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$125 \\sqrt[3]{5}-\\frac{250}{3} \\sqrt[3]{5} (x+5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $\\sin ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = asin(x)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (y)$, $g(x,y,z) = \\sqrt{y-z^2}$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{y}{x}\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sinh (y) & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y-z^2}} & -\\frac{z}{\\sqrt{y-z^2}} \\\\\n \\frac{3 y}{2 x^2 \\left(\\frac{y}{x}\\right)^{5/2}} & -\\frac{3}{2 x \\left(\\frac{y}{x}\\right)^{5/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(y)\ng = sqrt(y-z**2)\nh = (1/((y/x)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (2) \\tan (2-3 x)$\n", - "Output Answer": [ - "$-3 \\sin (2) \\sec ^2(2-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(2)*tan(2-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^4\\right)$ and $g(x) = $x^4$", - "Output Answer": [ - "$\\frac{\\tan (625)}{625}-\\frac{4 (x+5) \\left(625+625 \\tan ^2(625)-\\tan (625)\\right)}{3125}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**4)\ng = x**4\nseries = f.subs(x, g).series(x, -5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin \\left(y^3+z\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+3 y^2 \\cos \\left(y^3+z\\right)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sin(y**3+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(8-\\frac{17 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{289 (17 x-16)}{\\left(-289 x^2+544 x-252\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(8-((17*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-z)^{3/2}$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{3 \\sqrt{x-z}}{2},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-z)**(3/2)\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}\\left(x^3\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x+1) \\left(1+\\frac{3}{\\sqrt{2}}+\\tan ^2(1)\\right)-\\tan (1)-\\sinh ^{-1}(1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x**3)\ng = tan(x)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cosh (y+z)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\sinh (y+z) & \\sinh (y+z) \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = cosh(y+z)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x+6}-512 x^9$\n", - "Output Answer": [ - "$\\frac{7}{2 \\sqrt{7 x+6}}-4608 x^8$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x+6)-512*x**9, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^8}{z^4}$\n", - "Output Answer": [ - "$\\left\\{\\frac{8 x^7}{z^4},0,-\\frac{4 x^8}{z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**8)/(z**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2-3 x) \\sin \\left(2-3 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{3 \\sin \\left(2-3 x^3\\right)}{3 x-2}-9 x^2 \\log (2-3 x) \\cos \\left(2-3 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2-3*x)*sin(2-3*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x^2}{z}\\right)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y},\\frac{x^2 \\sin \\left(\\frac{x^2}{z}\\right)}{z^2}-2 x,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((x**2)/z))\ng = (z/y)\nh = (z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-3 x-\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{36}{(6 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x-(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (2-7 x) \\tan ^{-1}(3-2 x)$\n", - "Output Answer": [ - "$-\\frac{2 \\sin (2-7 x)}{(3-2 x)^2+1}-7 \\cos (2-7 x) \\tan ^{-1}(3-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(2-7*x)*atan(3-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(x^4-z\\right)$", - "Output Answer": [ - "$-\\frac{32 x^6 \\left(x^4-z\\right)}{\\left(\\left(x^4-z\\right)^2+1\\right)^2}+\\frac{12 x^2}{\\left(x^4-z\\right)^2+1}-\\frac{2 \\left(x^4-z\\right)}{\\left(\\left(x^4-z\\right)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**4-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(6-6 x)^3}-\\sqrt{4 x^2-7}$\n", - "Output Answer": [ - "$\\frac{1}{72 (x-1)^4}-\\frac{4 x}{\\sqrt{4 x^2-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((6-6*x)**3))-sqrt(4*x**2-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7-3 x^5\\right)-\\tan (4 x+5)$\n", - "Output Answer": [ - "$-225 x^8 \\sin \\left(7-3 x^5\\right)-60 x^3 \\cos \\left(7-3 x^5\\right)-32 \\tan (4 x+5) \\sec ^2(4 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7-3*x**5)-tan(4*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}-z^4$, $g(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,-4 z^3,\\frac{1}{y \\left(1-\\frac{x^2}{y^2}\\right)}+\\frac{x}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)-z**4\ng = atanh(x/y)\nh = atanh(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = \\tan \\left(\\frac{x}{y}-z\\right)$", - "Output Answer": [ - "$\\frac{z}{3 \\sqrt[3]{y z}^2}-\\sec ^2\\left(\\frac{x}{y}-z\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = cbrt(y*z)\nh = tan((x/y)-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$-\\frac{1}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = math.e**z\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-z^2}},1-\\cos (x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = acos(z)\nh = acos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x+y}{z^2}}$, $g(x,y,z) = \\log \\left(z^2\\right)$, and $h(x,y,z) = \\sin \\left(y+z^2\\right)$", - "Output Answer": [ - "$\\frac{1}{3 z^2 \\sqrt[3]{\\frac{x+y}{z^2}}^2}+2 z \\cos \\left(y+z^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt((x+y)/(z**2))\ng = log(z**2)\nh = sin(y+z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{\\frac{y}{z}}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{2 z \\sqrt{\\frac{y}{z}}} & -\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}} \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt((y/z))\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = log(y)\nh = log(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = atan(y)\nh = cos(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^5$", - "Output Answer": [ - "$80 (x-2)^3+160 (x-2)^2+160 (x-2)+64$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**5\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-3}+\\sin (9 x)$\n", - "Output Answer": [ - "$\\frac{4}{\\sqrt{8 x-3}}+9 \\cos (9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-3)+sin(9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\sin (z),0,-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z-x)$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{\\frac{2}{z^3},\\frac{1}{z-x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z-x)\ng = (1/(z**2))\nh = (1/(z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x^2-3}-\\log \\left(2 x^3+4\\right)$\n", - "Output Answer": [ - "$2 x \\left(\\frac{1}{\\sqrt{2 x^2-3}}-\\frac{3 x}{2 x^3+4}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x**2-3)-log(2*x**3+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{y^3+z}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{y^3}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y^3+z}}-\\frac{3 z \\cos \\left(\\frac{z}{y^3}\\right)}{y^4},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(y**3+z)\nh = sqrt(y**3+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x y}}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(x*y)\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(e^{3 x-6}\\right)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = log(math.e**(3*x-6))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y \\sin \\left(\\frac{y}{x}\\right)}{x^2} & -\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((y/x))\ng = atan(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}-x \\cos (x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(y^3+z\\right)$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = -\\tan (x-z)$", - "Output Answer": [ - "$\\sec ^2(x-z)+\\frac{3 y^2}{2 \\sqrt{y^3}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y**3+z)\ng = sqrt(y**3)\nh = -tan(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}} & \\frac{1}{2 x \\sqrt{\\frac{y}{x}}} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((y/x))\ng = acosh(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(x^2\\right)$, $g(x,y,z) = \\sqrt{x^2 y}$, and $h(x,y,z) = \\left(x^2-z\\right)^3$", - "Output Answer": [ - "$\\frac{x^2}{2 \\sqrt{x^2 y}}-3 \\left(x^2-z\\right)^2+2 x \\cosh \\left(x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x**2)\ng = sqrt(x**2*y)\nh = (x**2-z)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{7 x+\\frac{5}{2}}+\\frac{1}{8}$\n", - "Output Answer": [ - "$-\\frac{28}{(14 x+5)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(7*x+(5/2)))+(1/8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan \\left(4 x^4\\right)$ on the interval $x = 5$ to $x = 5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4*x**4)\na = 5\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-z)$, $g(x,y,z) = \\cos ^{-1}(x+y)$, and $h(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y},-\\frac{1}{x}-\\frac{1}{y-z},-\\frac{1}{\\sqrt{1-(x+y)^2}}-\\frac{1}{y-z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-z)\ng = acos(x+y)\nh = acos(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4-y$, $g(x,y,z) = \\sqrt[3]{x^4+z}$, and $h(x,y,z) = \\sinh (y+z)$", - "Output Answer": [ - "$\\left\\{\\cosh (y+z)-\\frac{1}{3 \\sqrt[3]{x^4+z}^2},0,\\frac{4 x^3}{3 \\sqrt[3]{x^4+z}^2}+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4-y\ng = cbrt(x**4+z)\nh = cbrt(x**4+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 x+\\log (-8 x-4)-5$\n", - "Output Answer": [ - "$\\frac{4 (x+1)}{2 x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2*x+log(-8*x-4)-5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(9 x-1) \\cos (3 x+3)$\n", - "Output Answer": [ - "$3 \\left(-\\frac{\\cos (3 (x+1))}{\\sqrt{-x (9 x-2)}}-\\sin (3 (x+1)) \\cos ^{-1}(9 x-1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(9*x-1)*cos(3*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = -\\sinh (x-z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\cosh (x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cos(x)\nh = -sinh(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\sqrt{\\frac{x^5}{y}-z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 x^4}{\\sqrt{1-x^{10}}} & 0 & 0 \\\\\n \\frac{5 x^4}{2 y \\sqrt{\\frac{x^5}{y}-z}} & -\\frac{x^5}{2 y^2 \\sqrt{\\frac{x^5}{y}-z}} & -\\frac{1}{2 \\sqrt{\\frac{x^5}{y}-z}} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x**5)\ng = sqrt(((x**5)/y)-z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan ^{-1}(y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(y-z)^2+1},\\cos (x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-y$, $g(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-y\ng = log((z/x))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (5 x+5) \\cos (5 x+4)$\n", - "Output Answer": [ - "$-50 \\sin (10 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(5*x+5)*cos(5*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^2-z\\right)$, $g(x,y,z) = \\sin \\left(x^2 z\\right)$, and $h(x,y,z) = y^4 z^4$", - "Output Answer": [ - "$\\frac{2 x}{\\sqrt{\\left(x^2-z\\right)^2+1}}+4 y^4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x**2-z)\ng = sin(x**2*z)\nh = y**4*z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sin ^{-1}\\left(x^3\\right)$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = asin(x**3)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x^3}{y}-z\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\frac{x^3}{y}-z},\\frac{x^3}{y^2 \\left(\\frac{x^3}{y}-z\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((x**3)/y)-z)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = (1/(y**(3/2)))\nh = cbrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (x-8) \\log (8 x+5)$\n", - "Output Answer": [ - "$\\frac{8 \\log (x-8)}{8 x+5}+\\frac{\\log (8 x+5)}{x-8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x-8)*log(8*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{z^2}{\\left(x^4+y\\right)^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n -\\frac{8 x^3 z^2}{\\left(x^4+y\\right)^3} & -\\frac{2 z^2}{\\left(x^4+y\\right)^3} & \\frac{2 z}{\\left(x^4+y\\right)^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = ((z**2)/((x**4+y)**2))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^3}{z^3}$, $g(x,y,z) = (x+y)^2$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{0,\\sin (x)-\\frac{3 y^3}{z^4},2 (x+y)-\\frac{3 y^2}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**3)/(z**3))\ng = (x+y)**2\nh = (x+y)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^3+z}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 x^2}{\\left(x^3+z\\right)^2} & 0 & -\\frac{1}{\\left(x^3+z\\right)^2} \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**3+z))\ng = (1/y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x}}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 x^2 \\left(\\frac{z}{x}\\right)^{3/2}},0,-\\frac{1}{2 x \\left(\\frac{z}{x}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((z/x))))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{x z}{y}$", - "Output Answer": [ - "$\\frac{x}{y}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/y)\ng = tan(y)\nh = ((x*z)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\frac{15 x}{2}-\\frac{13}{2}}-\\tan (4-7 x)$\n", - "Output Answer": [ - "$\\frac{900}{(15 x-13)^3}-98 \\tan (4-7 x) \\sec ^2(4-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(((15*x)/2)-(13/2)))-tan(4-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = asin(x)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (4) \\sin (8-5 x)$\n", - "Output Answer": [ - "$-25 \\cos (4) \\sin (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4)*sin(8-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2},0,-1\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = (1/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(z-x)$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-(z-x)^2}} & 0 & -\\frac{1}{\\sqrt{1-(z-x)^2}} \\\\\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z-x)\ng = log(x+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $x^5$", - "Output Answer": [ - "$-270 (x-3)^2-404 (x-3)-240$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = x**5\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^3+z}$, $g(x,y,z) = \\log \\left(y^3\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{3}{y}+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**3+z)\ng = log(y**3)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n y & x & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = cos(y)\nh = x*y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\frac{x+2}{3\\ 2^{2/3}}+\\frac{1}{4\\ 2^{2/3}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = x**3\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{z}{3 y^2 \\sqrt[3]{\\frac{z}{y}}^2} & \\frac{1}{3 y \\sqrt[3]{\\frac{z}{y}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = sqrt(y)\nh = cbrt(z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(6-7 x)^{3/2}$\n", - "Output Answer": [ - "$-\\frac{21}{2} \\sqrt{6-7 x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6-7*x)**(3/2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(5 x-6)^3}$\n", - "Output Answer": [ - "$\\frac{300}{(5 x-6)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((5*x-6)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y-z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y-z)\ng = sqrt(y)\nh = cos((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-3) \\left(1+e^3+\\tan ^2(3)\\right)+e^3+\\tan (3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = tan(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{44 x}{5}+1}-\\cos \\left(\\frac{17 x}{5}+8\\right)$\n", - "Output Answer": [ - "$\\frac{289}{25} \\cos \\left(\\frac{17 x}{5}+8\\right)-\\frac{484}{25 \\left(\\frac{44 x}{5}+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((44*x)/5)+1)-cos(((17*x)/5)+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{9 x-\\frac{15}{2}}-\\sin \\left(\\frac{9}{2}\\right)$\n", - "Output Answer": [ - "$9 e^{9 x-\\frac{15}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(9*x-(15/2))-sin((9/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^3+y\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{\\left(x^3+y\\right)^2+1}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**3+y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^5\\right)$, $g(x,y,z) = z^4 \\left(x^5+y\\right)$, and $h(x,y,z) = y^3$", - "Output Answer": [ - "$\\frac{5 x^4}{x^{10}+1}+z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**5)\ng = z**4*(x**5+y)\nh = y**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x y)^{3/2}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3}{2} y \\sqrt{x y} & \\frac{3}{2} x \\sqrt{x y} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & e^{y+z} & e^{y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x*y)**(3/2)\ng = tan(y)\nh = math.e**(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = sin(x)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (4 x)$ on the interval $x = 0$ to $x = 1$\n", - "Output Answer": [ - "$\\int_0^1 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x)\na = 0\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x^4+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 & 0 \\\\\n 0 & 1 & 0 \\\\\n 4 x^3 e^{x^4+z} & 0 & e^{x^4+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5\ng = y\nh = math.e**(x**4+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z^5-x}$, $g(x,y,z) = \\cos \\left(x z^5\\right)$, and $h(x,y,z) = \\cos \\left(x+z^5\\right)$", - "Output Answer": [ - "$\\left\\{5 x z^4 \\sin \\left(x z^5\\right),\\frac{5 z^4}{2 \\sqrt{z^5-x}}+\\sin \\left(x+z^5\\right),-z^5 \\sin \\left(x z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z**5-x)\ng = cos(x*z**5)\nh = cos(x*z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z-x}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,e^{z-x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z-x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{11 x^2}{2}+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$-11 \\left(22 x^2 \\tan \\left(\\frac{1}{2} \\left(11 x^2+7\\right)\\right)+1\\right) \\sec ^2\\left(\\frac{1}{2} \\left(11 x^2+7\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(((11*x**2)/2)+(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (x-y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-y}}$", - "Output Answer": [ - "$-\\cos (x-y)+\\frac{1}{2 \\sqrt{x}}-\\frac{1}{2 (z-y)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(x-y)\nh = (1/(sqrt(z-y)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(x+y^3+z\\right)$", - "Output Answer": [ - "$-\\frac{18 y^4 \\left(x+y^3+z\\right)}{\\left(\\left(x+y^3+z\\right)^2+1\\right)^2}+\\frac{6 y}{\\left(x+y^3+z\\right)^2+1}-\\frac{4 \\left(x+y^3+z\\right)}{\\left(\\left(x+y^3+z\\right)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y**3+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan \\left(\\frac{x}{y z}\\right)$", - "Output Answer": [ - "$3 x^2-\\frac{x \\sec ^2\\left(\\frac{x}{y z}\\right)}{y z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = y\nh = tan((x/(y*z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{x^2}{2}+\\cos \\left(\\frac{11}{2}-\\frac{3 x}{2}\\right)+\\frac{1}{2}$\n", - "Output Answer": [ - "$\\frac{3}{2} \\sin \\left(\\frac{1}{2} (11-3 x)\\right)-x$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((x**2)/2)+cos((11/2)-((3*x)/2))+(1/2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{\\sqrt{y z}}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$3 x^2-\\frac{z}{2 (y z)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/(sqrt(y*z)))\nh = cbrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\tan \\left(\\frac{x z}{y}\\right)$, and $h(x,y,z) = \\sinh (y)$", - "Output Answer": [ - "$-\\frac{x z \\sec ^2\\left(\\frac{x z}{y}\\right)}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = tan(((x*z)/y))\nh = sinh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = x^2+z$, and $h(x,y,z) = \\left(y-x^2\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 2 x & 0 & 1 \\\\\n -3 x \\sqrt{y-x^2} & \\frac{3 \\sqrt{y-x^2}}{2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y)\ng = x**2+z\nh = (y-x**2)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\cosh ^{-1}(z)$, and $h(x,y,z) = \\sqrt[3]{\\frac{x-y}{z}}$", - "Output Answer": [ - "$-\\frac{x-y}{3 z^2 \\sqrt[3]{\\frac{x-y}{z}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = acosh(z)\nh = cbrt((x-y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sinh \\left(x^2\\right)$", - "Output Answer": [ - "$\\frac{1}{x^2}-\\frac{1}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sinh(x**2)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tanh ^{-1}(y)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{y}{x}\\right)}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = tan((y/x))\nh = atanh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y}-z\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\frac{y}{x^2}-\\frac{x}{y^2 \\sqrt{\\left(\\frac{x}{y}-z\\right)^2+1}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = asinh((x/y)-z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(x-6)^4 \\log (-4 x-4)$\n", - "Output Answer": [ - "$\\frac{(x-6)^2 \\left(7 \\left(x^2-4 x-12\\right)+12 (x+1)^2 \\log (-4 (x+1))\\right)}{(x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (x-6)**4*log(-4*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/z)\ng = y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(7-6 x) \\cos (7 x+3)$\n", - "Output Answer": [ - "$7 \\sin ^{-1}(7-6 x) \\sin (7 x+3)+\\frac{6 \\cos (7 x+3)}{\\sqrt{1-(7-6 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(7-6*x)*cos(7*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = x^5$", - "Output Answer": [ - "$\\left\\{0,-5 x^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-e^z,0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**z\nh = math.e**z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\tan ^{-1}(x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n \\frac{1}{(x+y)^2+1} & \\frac{1}{(x+y)^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-x\ng = acos(z)\nh = atan(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y}}{2},-\\sin (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = z**2\nh = cbrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}(x z)$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{x^2 z^2+1}-\\frac{2}{y^3},0,\\frac{z}{x^2 z^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(x*z)\nh = atan(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x+z}}$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{1}{2 (x+z)^{3/2}} & 0 & -\\frac{1}{2 (x+z)^{3/2}} \\\\\n 0 & 2 y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(x+z)))\nh = y**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y^3}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{x}{y^3}\\right)}{y^3},-\\frac{3 x \\sec ^2\\left(\\frac{x}{y^3}\\right)}{y^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/(y**3)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z^5}$, $g(x,y,z) = \\sinh \\left(x z^5\\right)$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z**5)\ng = sinh(x*z**5)\nh = asin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = x+y$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$\\left\\{0,-e^{x+z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = cos(y)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x-y}{z}\\right)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x-y}{z^2 \\sqrt{\\frac{x-y}{z}-1} \\sqrt{\\frac{x-y}{z}+1}},\\frac{1}{z \\sqrt{\\frac{x-y}{z}-1} \\sqrt{\\frac{x-y}{z}+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh((x-y)/z)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+y)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{\\sqrt{1-(x+y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+y)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y z}$, $g(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{x y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 0 & \\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\sec ^2\\left(\\frac{y}{z}\\right)}{z^2} \\\\\n \\frac{y}{3 \\sqrt[3]{x y+z}^2} & \\frac{x}{3 \\sqrt[3]{x y+z}^2} & \\frac{1}{3 \\sqrt[3]{x y+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y*z))\ng = tan((y/z))\nh = cbrt(x*y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(y)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = -\\sin \\left(y-z^5\\right)$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{1-y^2}+5 z^4 \\cos \\left(y-z^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = atanh(y)\nh = -sin(y-z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$-\\frac{5}{9} (x+1)^2+\\frac{5 (x+1)}{3}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 0 & 1 \\\\\n -\\frac{y \\sec ^2\\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\sec ^2\\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n \\frac{1}{2 (z-x)^{3/2}} & 0 & -\\frac{1}{2 (z-x)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z-x\ng = tan((y/x))\nh = (1/(sqrt(z-x)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}},\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}},\\frac{1}{x+y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = log(x+y)\nh = log(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (x+1)$\n", - "Output Answer": [ - "$\\sin (x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{e^4 \\sin ^{-1}(2 x)}$\n", - "Output Answer": [ - "$\\frac{2}{e^4 \\sqrt{1-4 x^2} \\sin ^{-1}(2 x)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(math.e**4*asin(2*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{42}{5}-\\frac{6 x}{5}}-\\sin \\left(\\frac{21}{5}-\\frac{8 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{4}{25} \\left(9 e^{-\\frac{6}{5} (x-7)}+16 \\sin \\left(\\frac{1}{5} (21-8 x)\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**((42/5)-((6*x)/5))-sin((21/5)-((8*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^2\\right)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{2 x}{x^4+1}-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**2)\ng = acos(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{\\frac{y}{x}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n -\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}} & \\frac{1}{2 x \\sqrt{\\frac{y}{x}}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt((y/x))\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$6 x-5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 6*x-5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (2-3 x)+\\sin (3)$\n", - "Output Answer": [ - "$-3 \\cos (2-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(2-3*x)+sin(3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (2 x+6)}{\\sqrt{7}}$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{7} (x+3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(2*x+6))/(sqrt(7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = x y+z^2$", - "Output Answer": [ - "$\\frac{z^2}{3 \\sqrt[3]{x z^2}^2}+2 z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z**2)\ng = y\nh = x*y+z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x-6} \\cos (7 x+6)$\n", - "Output Answer": [ - "$-e^{-4 x-6} (7 \\sin (7 x+6)+4 \\cos (7 x+6))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x-6)*cos(7*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6} \\sqrt{-x^4}+\\tan (4-9 x)$\n", - "Output Answer": [ - "$\\frac{2 \\sqrt{6} \\sqrt{-x^4}}{x}-9 \\sec ^2(4-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6)*sqrt(-x**4)+tan(4-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x+y-z^5\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2 \\sqrt{\\frac{x}{y}-1} \\sqrt{\\frac{x}{y}+1}},-5 z^4 \\sec ^2\\left(x+y-z^5\\right)-\\frac{1}{y \\sqrt{\\frac{x}{y}-1} \\sqrt{\\frac{x}{y}+1}},-\\sec ^2\\left(x+y-z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y-z**5)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (2)}{\\left(-3 x^5-4\\right)^4}$\n", - "Output Answer": [ - "$-\\frac{60 x^4 \\sin (2)}{\\left(3 x^5+4\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(2))/((-3*x**5-4)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{x y+z^3}$", - "Output Answer": [ - "$x^2 e^{x y+z^3}+y^2 e^{x y+z^3}+9 z^4 e^{x y+z^3}+6 z e^{x y+z^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y+z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5 z^5$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5*z**5\ng = y**5\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{e^{-7 x-\\frac{6}{5}}}-e^{-\\frac{4 x}{5}-\\frac{44}{5}}$\n", - "Output Answer": [ - "$\\frac{4}{5} e^{-\\frac{4}{5} (x+11)}-\\frac{7}{2} \\sqrt{e^{-7 x-\\frac{6}{5}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(math.e**(-7*x-(6/5)))-math.e**(-((4*x)/5)-(44/5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{5 x}{3}-3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((5*x)/3)-3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tanh (x)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{1,0,\\text{sech}^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = tanh(x)\nh = tanh(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x-y^4}{z^4}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{z^4},-\\frac{4 y^3}{z^4},-\\frac{4 \\left(x-y^4\\right)}{z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x-y**4)/(z**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$y e^{y z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z)\nh = math.e**(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (x z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}-x \\sin (x z)+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = log(y)\nh = cos(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z}-2 z,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = z**2\nh = z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(4 x^5+2\\right)-e^{2 x+8}$\n", - "Output Answer": [ - "$20 x^4 \\cos \\left(4 x^5+2\\right)-2 e^{2 x+8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(4*x**5+2)-math.e**(2*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin ^{-1}\\left(x-z^2\\right)$, $g(x,y,z) = x-y^5-z^2$, and $h(x,y,z) = \\cos ^{-1}\\left(x-z^2\\right)$", - "Output Answer": [ - "$\\left\\{2 z,\\frac{2 z}{\\sqrt{1-\\left(x-z^2\\right)^2}}+\\frac{1}{\\sqrt{1-\\left(x-z^2\\right)^2}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asin(x-z**2)\ng = x-y**5-z**2\nh = x-y**5-z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-x}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z-x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-x)\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\cos (x)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y+z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{z}{y}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\sec ^2(y)-\\frac{1}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z/y)\ng = tan(y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^2 y^3\\right)$, $g(x,y,z) = \\log \\left(x^2\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2 x y^3}{\\sqrt{1-x^4 y^6}} & -\\frac{3 x^2 y^2}{\\sqrt{1-x^4 y^6}} & 0 \\\\\n \\frac{2}{x} & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x**2*y**3)\ng = log(x**2)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^3$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$1-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**3\ng = (1/(sqrt(y)))\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^5}{x^{25}}$, $g(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-\\frac{25 z^5}{x^{26}}-\\frac{\\sin \\left(\\frac{y}{z}\\right)}{z}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**5)/(x**25))\ng = cos((y/z))\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{4 x-2}}{\\sqrt{5-7 x}}$\n", - "Output Answer": [ - "$\\frac{e^{4 x-2} (47-56 x)}{2 (5-7 x)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(4*x-2))/(sqrt(5-7*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan \\left(x^5\\right)$", - "Output Answer": [ - "$x^3-x^5$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = tan(x**5)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{6 x+9}}{\\sqrt{-8 x-3}}$\n", - "Output Answer": [ - "$-\\frac{2 e^{6 x+9} (24 x+7)}{(-8 x-3)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(6*x+9))/(sqrt(-8*x-3))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^5}$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$(x-2) \\left(\\frac{5}{3} 2^{2/3} \\text{csch}(2)-2\\ 2^{2/3} \\coth (2) \\text{csch}(2)\\right)+2\\ 2^{2/3} \\text{csch}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**5)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin \\left(x-y+z^3\\right)$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\cos \\left(x-y+z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sin(x-y+z**3)\nh = log(y-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (9 x+4)$\n", - "Output Answer": [ - "$81 \\sin (9 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(9*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y \\left(\\frac{x}{y}-z\\right)} & -\\frac{x}{y^2 \\left(\\frac{x}{y}-z\\right)} & -\\frac{1}{\\frac{x}{y}-z} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((x/y)-z)\ng = tan(z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\frac{1}{(y-z)^2}$", - "Output Answer": [ - "$e^{y+z}+\\frac{2}{(y-z)^3}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(y+z)\nh = (1/((y-z)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (3 x+5)-\\tan (4 x+6)$\n", - "Output Answer": [ - "$-\\frac{9}{(3 x+5)^2}-32 \\tan (4 x+6) \\sec ^2(4 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x+5)-tan(4*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{z-y^4}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\left(z-y^4\\right)^{3/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = (1/(sqrt(z-y**4)))\nh = (1/(sqrt(z-y**4)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = tan(y)\nh = sqrt(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\log (x-z)$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{1}{x-z}-\\sin (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{x y^4}{z^4}$, and $h(x,y,z) = z^{20}$", - "Output Answer": [ - "$\\left\\{\\frac{4 x y^4}{z^5},0,\\frac{y^4}{z^4}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = ((x*y**4)/(z**4))\nh = ((x*y**4)/(z**4))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (9 x+4)-\\cos ^{-1}\\left(9 x^5-2\\right)$\n", - "Output Answer": [ - "$\\frac{45 x^4}{\\sqrt{1-\\left(2-9 x^5\\right)^2}}-9 \\sin (9 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(9*x+4)-acos(9*x**5-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sin \\left(x^5\\right)$", - "Output Answer": [ - "$\\frac{x^7}{6}+\\frac{1}{x^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = sin(x**5)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{3}{5 x}$ on the interval $x = 5$ to $x = 5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (3/(5*x))\na = 5\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (6 x) (-\\cos (5-x))$\n", - "Output Answer": [ - "$\\frac{1}{2} (25 \\sin (5 (x+1))-49 \\sin (5-7 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6*x)*(-cos(5-x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^5$, $g(x,y,z) = \\sinh (x z)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{1-x \\cosh (x z),0,z \\cosh (x z)-5 (x+y)^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**5\ng = sinh(x*z)\nh = sinh(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{1,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = x-z\nh = x-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\tan ^{-1}(x y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{x}{x^2 y^2+1}+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = atan(x*y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin ^{-1}(x+z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+z)^2}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cos(y)\nh = asin(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\sinh \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\left\\{0,1,\\frac{\\cosh \\left(\\frac{x}{y}\\right)}{y}+\\sin (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = sinh(x/y)\nh = sinh(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = y^4$, and $h(x,y,z) = x^{3/2}$", - "Output Answer": [ - "$4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = y**4\nh = x**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x y)$, $g(x,y,z) = \\sin (x+y-z)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\cos (x+y-z)+\\frac{y}{\\sqrt{x y-1} \\sqrt{x y+1}}+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x*y)\ng = sin(x+y-z)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}} & 0 & \\frac{1}{2 x \\sqrt{\\frac{z}{x}}} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((z/x))\ng = math.e**y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sinh \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{x \\cosh \\left(\\frac{x}{z}\\right)}{z^2},0,\\frac{\\cosh \\left(\\frac{x}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sinh(x/z)\nh = sinh(x/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(y)\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\cos \\left(\\frac{9}{2}\\right)\\right)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(cos((9/2)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(\\sqrt{7} \\sqrt{-x}\\right)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{7} (1-21 x)}{4 (1-7 x)^2 (-x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(sqrt(7)*sqrt(-x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(z^4 (x-y)\\right)$", - "Output Answer": [ - "$12 z^2 (x-y) \\sec ^2\\left(z^4 (x-y)\\right)+4 z^8 \\tan \\left(z^4 (x-y)\\right) \\sec ^2\\left(z^4 (x-y)\\right)+32 z^6 (x-y)^2 \\tan \\left(z^4 (x-y)\\right) \\sec ^2\\left(z^4 (x-y)\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z**4*(x-y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-4 x^4-9\\right)-\\sin \\left(4-9 x^4\\right)$\n", - "Output Answer": [ - "$4 x^3 \\left(\\frac{4}{4 x^4+9}+9 \\cos \\left(4-9 x^4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-4*x**4-9)-sin(4-9*x**4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(4-2 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{-48 x^4+64 x^2+68}{\\left(4 x^4-16 x^2+17\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(4-2*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-2 x} \\sqrt{-6 x-7}$\n", - "Output Answer": [ - "$\\frac{e^{8-2 x} (12 x+11)}{\\sqrt{-6 x-7}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-2*x)*sqrt(-6*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (y-z)^{3/2}$", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{y-z}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-z)**(3/2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{4 x}{\\sqrt{4 x^2-\\frac{25}{3}}}$\n", - "Output Answer": [ - "$\\sqrt{4 x^2-\\frac{25}{3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((4*x)/(sqrt(4*x**2-(25/3))))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x^4+4}-\\log (6 x+2)$\n", - "Output Answer": [ - "$8 e^{2 x^4+4} \\left(8 x^4+3\\right) x^2+\\frac{9}{(3 x+1)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x**4+4)-log(6*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (8 x-1) \\tan (7 x+6)$\n", - "Output Answer": [ - "$-\\frac{8 \\tan (7 x+6)}{8 x-1}-7 \\log (8 x-1) \\sec ^2(7 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(8*x-1)*tan(7*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$4 x^3+5 y^4+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y**5\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3-3 x) \\tan (4-5 x)$\n", - "Output Answer": [ - "$3 \\sin (3-3 x) \\tan (4-5 x)-5 \\cos (3-3 x) \\sec ^2(4-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3-3*x)*tan(4-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 y}{2 (x y)^{5/2}} & -\\frac{3 x}{2 (x y)^{5/2}} & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x*y)**(3/2)))\ng = atanh(y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = (1/y)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (x z)$, and $h(x,y,z) = \\frac{y^4}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & \\frac{4 y^3}{z^4} & -\\frac{4 y^4}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = log(x*z)\nh = ((y**4)/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3-7 x^3} \\log \\left(9-9 x^5\\right)$\n", - "Output Answer": [ - "$-\\frac{e^{3-7 x^3} x^2 \\left(21 \\left(x^5-1\\right) \\log \\left(9-9 x^5\\right)-5 x^2\\right)}{x^5-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3-7*x**3)*log(9-9*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-8 x-5)^5}$\n", - "Output Answer": [ - "$-\\frac{1920}{(8 x+5)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-8*x-5)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = \\cos \\left(x^5+y\\right)$, and $h(x,y,z) = e^{\\frac{x^5}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n -5 x^4 \\sin \\left(x^5+y\\right) & -\\sin \\left(x^5+y\\right) & 0 \\\\\n \\frac{5 x^4 e^{\\frac{x^5}{y}}}{y} & -\\frac{x^5 e^{\\frac{x^5}{y}}}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**5)\ng = cos(x**5+y)\nh = math.e**((x**5)/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^2}$, $g(x,y,z) = x^6$, and $h(x,y,z) = \\frac{1}{y^2 z^2}$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{x^2}}-\\frac{2}{y^2 z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2)\ng = x**6\nh = (1/(y**2*z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-z^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = acos(z)\nh = acos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+z)$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-(x+z)^2}},\\cos (x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+z)\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{z^2}{x}}}$", - "Output Answer": [ - "$\\frac{3 z^4}{4 x^4 \\left(\\frac{z^2}{x}\\right)^{5/2}}-\\frac{z^2}{x^3 \\left(\\frac{z^2}{x}\\right)^{3/2}}+\\frac{3 z^2}{x^2 \\left(\\frac{z^2}{x}\\right)^{5/2}}-\\frac{1}{x \\left(\\frac{z^2}{x}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(((z**2)/x))))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y z}$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y*z)\ng = x-z\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(z)\ng = cbrt(y)\nh = (1/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n x^{5/3} & x>0 \\\\\n -\\sqrt[3]{-1} x^{5/3} & x<0 \\\\\n \\text{Indeterminate} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cosh (x-y)$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left\\{0,-e^x,\\sinh (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cosh(x-y)\nh = cosh(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{9 x^2-4}+\\log (-5 x-1)$\n", - "Output Answer": [ - "$18 e^{9 x^2-4} \\left(18 x^2+1\\right)-\\frac{25}{(5 x+1)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(9*x**2-4)+log(-5*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-\\frac{13}{2}}-e^7$\n", - "Output Answer": [ - "$-6 e^{-6 x-\\frac{13}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-(13/2))-math.e**7, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^4\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\left(z^5\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4}{x} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{15}{2} z^4 \\sqrt{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**4)\ng = math.e**y\nh = (z**5)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y+z},0,x \\sin (x y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (7 x+5)$\n", - "Output Answer": [ - "$49 \\sin (7 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(9-6 x^5\\right)$\n", - "Output Answer": [ - "$-\\frac{30 x^3 \\left(54 x^{10}-27 x^5-82\\right)}{\\left(18 x^{10}-54 x^5+41\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(9-6*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x+3) \\left(\\frac{\\text{sech}(3)}{3\\ 3^{2/3}}-\\sqrt[3]{3} \\tanh (3) \\text{sech}(3)\\right)-\\sqrt[3]{3} \\text{sech}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cosh(x)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{2 \\sqrt{x z}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\sinh ^{-1}(x-y)$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z-x}},-\\frac{1}{\\sqrt{(x-y)^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = -asinh(x-y)\nh = -asinh(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\sec ^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x y^2\\right)^{3/2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{3}{2} y^2 \\sqrt{x y^2},3 x y \\sqrt{x y^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y**2)**(3/2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{6 x+2} \\tan ^{-1}(5 x+6)$\n", - "Output Answer": [ - "$-\\frac{5 \\sqrt{6 x+2}}{(5 x+6)^2+1}-\\frac{3 \\tan ^{-1}(5 x+6)}{\\sqrt{6 x+2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(6*x+2)*atan(5*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y+z$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$-\\sin (y)+3 z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y+z\ng = cos(y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (x y+z)^{3/2}$", - "Output Answer": [ - "$\\frac{3 x^2}{4 \\sqrt{x y+z}}+\\frac{3 y^2}{4 \\sqrt{x y+z}}+\\frac{3}{4 \\sqrt{x y+z}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y+z)**(3/2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-y}$, $g(x,y,z) = \\sin \\left(y z^2\\right)$, and $h(x,y,z) = \\sqrt{x-z^2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-y}}-\\frac{z}{\\sqrt{x-z^2}}+z^2 \\cos \\left(y z^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y)\ng = sin(y*z**2)\nh = sqrt(x-z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = -\\tan ^{-1}(x-y)$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}},-\\frac{1}{(x-y)^2+1}-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = -atan(x-y)\nh = -atan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(5 x-\\frac{11}{2}\\right)+\\cosh \\left(5-\\frac{5 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{10}{10 x-11}-\\frac{5}{2} \\sinh \\left(5-\\frac{5 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x-(11/2))+cosh(5-((5*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{y^4}{z^4}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\frac{4 y^3}{z^4}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = ((y**4)/(z**4))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^y & 0 \\\\\n 0 & -\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}} & \\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}} \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**y\ng = asin(z/y)\nh = log(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^2}{z^2}$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**2)/(z**2))\ng = cbrt(z)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\log \\left(x^3\\right)$", - "Output Answer": [ - "$1-\\frac{5 (x-1)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = log(x**3)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\tan (y+z)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\sec ^2(y+z)+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = tan(y+z)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x^3}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = x^{12} z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 y}{x^4 \\left(\\frac{y^2}{x^6}+1\\right)} & \\frac{1}{x^3 \\left(\\frac{y^2}{x^6}+1\\right)} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 12 x^{11} z^4 & 0 & 4 x^{12} z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y/(x**3))\ng = cbrt(y)\nh = x**12*z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-18 e^{-6 x^3} x^2$\n", - "Output Answer": [ - "$e^{-6 x^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -18*math.e**(-6*x**3)*x**2\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-y}$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$-e^{x-y}+\\frac{1}{2 \\sqrt{x-y}}+x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y)\ng = math.e**(x-y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y^5$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\sqrt[3]{x-y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-z^2}}-\\frac{1}{3 \\sqrt[3]{x-y}^2},-\\frac{1}{3 \\sqrt[3]{x-y}^2},-5 x^5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y**5\ng = acos(z)\nh = acos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 \\sqrt{x z}},0,\\frac{x}{2 \\sqrt{x z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+2)^2 \\left(-80-\\tan ^3(2)-\\tan (2)\\right)+(x+2) \\left(81+\\tan ^2(2)\\right)-32-\\tan (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**5\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n -y \\sin (x y-z) & -x \\sin (x y-z) & \\sin (x y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = y\nh = cos(x*y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = log(y)\nh = y**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\sqrt{z-x}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2))\ng = sqrt(z-x)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = atan(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4-2 x)+\\sin ^{-1}(2-4 x)$\n", - "Output Answer": [ - "$\\frac{1}{x-2}-\\frac{4}{\\sqrt{1-4 (1-2 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4-2*x)+asin(2-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x y^2-z\\right)$\n", - "Output Answer": [ - "$\\left\\{y^2 \\cos \\left(x y^2-z\\right),2 x y \\cos \\left(x y^2-z\\right),-\\cos \\left(x y^2-z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y**2-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tanh ^{-1}\\left(x y^2\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{y^2}{1-x^2 y^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atanh(x*y**2)\nh = atanh(x*y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x} \\cos (6 x+3)$\n", - "Output Answer": [ - "$-2 e^{-2 x} (3 \\sin (6 x+3)+\\cos (6 x+3))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x)*cos(6*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{2} \\tan \\left(4 x^5+7\\right)$\n", - "Output Answer": [ - "$-20 \\sqrt{2} x^4 \\sec ^2\\left(4 x^5+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(2)*tan(4*x**5+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(y+z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{0,-\\sin \\left(y+z^4\\right),-4 z^3 \\sin \\left(y+z^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y+z**4)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x z)$, $g(x,y,z) = \\frac{x}{y^2}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{2 x}{y^3}+z \\cosh (x z)+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x*z)\ng = (x/(y**2))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^4$, $g(x,y,z) = \\tan (x y-z)$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$x \\sec ^2(x y-z)+4 (x-y)^3+\\frac{y}{2 \\sqrt{y z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**4\ng = tan(x*y-z)\nh = sqrt(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}},-\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z/y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,e^z,\\sec ^2(x+y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = tan(x+y)\nh = tan(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$(x-5) (10 \\cos (5)-25 \\sin (5))+25 \\cos (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n \\frac{1}{2 z \\sqrt{\\frac{x}{z}}} & 0 & -\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y)\ng = y**5\nh = sqrt((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\sec ^2(x+y)-\\sin (x)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(x+y)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x y}{z^5}\\right)^{3/2}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}},\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}}+\\frac{15 x y}{2 z^6 \\left(\\frac{x y}{z^5}\\right)^{5/2}},\\frac{3 x}{2 z^5 \\left(\\frac{x y}{z^5}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x*y)/(z**5))**(3/2)))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(x^3-y-z\\right)$", - "Output Answer": [ - "$-\\frac{18 x^4 \\left(x^3-y-z\\right)}{\\left(\\left(x^3-y-z\\right)^2+1\\right)^2}+\\frac{6 x}{\\left(x^3-y-z\\right)^2+1}-\\frac{4 \\left(x^3-y-z\\right)}{\\left(\\left(x^3-y-z\\right)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**3-y-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = z^6$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 6 z^5 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y\nh = z**6\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\log (x-y)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}-z\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2 \\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}},-\\frac{1}{y \\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}},\\frac{1}{x-y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = log(x-y)\nh = log(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = (z-x)^{3/2}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{z-x}}{2}+\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = (z-x)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{y^4}{x}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{4 y^3}{x \\sqrt{1-\\frac{y^8}{x^2}}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**4\ng = asin((y**4)/x)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = e^{y-z}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = math.e**(y-z)\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = x+z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (8 x+3)$\n", - "Output Answer": [ - "$-128 \\tan (8 x+3) \\sec ^2(8 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(8*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (2 x+5)-\\log (5-x)$\n", - "Output Answer": [ - "$\\frac{1}{5-x}+2 \\sec ^2(2 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(2*x+5)-log(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (9-2 x)-\\tan \\left(7-7 x^4\\right)$\n", - "Output Answer": [ - "$8 \\tan (9-2 x) \\sec ^2(9-2 x)-28 x^2 \\left(56 x^4 \\tan \\left(7-7 x^4\\right)-3\\right) \\sec ^2\\left(7-7 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(9-2*x)-tan(7-7*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7-8 x^3}$\n", - "Output Answer": [ - "$\\frac{24 x \\left(2 x^3-7\\right)}{\\left(7-8 x^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7-8*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = (z-x)^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n -4 (z-x)^3 & 0 & 4 (z-x)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y)\ng = asinh(y)\nh = (z-x)**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y-z$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tanh ^{-1}(x-y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & -1 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{1}{1-(x-y+z)^2} & -\\frac{1}{1-(x-y+z)^2} & \\frac{1}{1-(x-y+z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-z\ng = acos(y)\nh = atanh(x-y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{x y^4-z}$", - "Output Answer": [ - "$16 x^2 y^6 e^{x y^4-z}+y^8 e^{x y^4-z}+12 x y^2 e^{x y^4-z}+e^{x y^4-z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y**4-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{\\frac{x z}{y}}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$e^x-\\frac{x z e^{\\frac{x z}{y}}}{y^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = math.e**((x*z)/y)\nh = log(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,3 x^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = x**3\nh = x**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tanh ^{-1}(y+z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{1-(y+z)^2} & \\frac{1}{1-(y+z)^2} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = atanh(y+z)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(y+z)^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{2}{(y+z)^3},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((y+z)**2))\nh = (1/((y+z)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(6 x^2+3\\right)+\\cos (7)$\n", - "Output Answer": [ - "$12 x \\cos \\left(6 x^2+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x**2+3)+cos(7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin (3 x)$ on the interval $x = 0$ to $x = 7$\n", - "Output Answer": [ - "$\\frac{1}{3} \\sqrt{10} \\left(12 E\\left(\\frac{9}{10}\\right)+E\\left(21-6 \\pi \\left|\\frac{9}{10}\\right.\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(3*x)\na = 0\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = acos(x)\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{2 \\sqrt{y z}},-\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x/z)\ng = sqrt(y*z)\nh = sqrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-40 e^{8 x^5-6} x^4-\\frac{15 x^4}{\\sqrt{1-9 \\left(x^5+2\\right)^2}}$\n", - "Output Answer": [ - "$-e^{8 x^5-6}-\\sin ^{-1}\\left(3 \\left(x^5+2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -40*math.e**(8*x**5-6)*x**4-((15*x**4)/(sqrt(1-9*(x**5+2)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin (2 x)-9 x^8$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2*x)-9*x**8\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+z)\ng = atan(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = (x-y)^4$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(y+z)^2+1},0,4 (x-y)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = (x-y)**4\nh = (x-y)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = -\\sin (x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n -\\cos (x-y) & \\cos (x-y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = -sin(x-y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x+y^4+z^5\\right)$", - "Output Answer": [ - "$-\\frac{25 z^8}{\\left(x+y^4+z^5\\right)^2}+\\frac{20 z^3}{x+y^4+z^5}+\\frac{12 y^2}{x+y^4+z^5}-\\frac{16 y^6}{\\left(x+y^4+z^5\\right)^2}-\\frac{1}{\\left(x+y^4+z^5\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y**4+z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$14 x \\sin \\left(\\frac{5}{2}-7 x^2\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{5}{2}-7 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 14*x*sin((5/2)-7*x**2)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{15 x^2}{5 x^3-4}$\n", - "Output Answer": [ - "$\\log \\left(5 x^3-4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((15*x**2)/(5*x**3-4))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & \\cos (y) & 0 \\\\\n -\\frac{1}{2 \\sqrt{z-x}} & 0 & \\frac{1}{2 \\sqrt{z-x}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y*z)\ng = sin(y)\nh = sqrt(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z-y^3}$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{y^2}{\\sqrt[3]{z-y^3}^2} & \\frac{1}{3 \\sqrt[3]{z-y^3}^2} \\\\\n 0 & 3 y^2 & 0 \\\\\n -e^{z-x} & 0 & e^{z-x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z-y**3)\ng = y**3\nh = math.e**(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{y^5}{z}$, and $h(x,y,z) = \\sqrt{z \\left(x-y^5\\right)}$", - "Output Answer": [ - "$\\frac{x-y^5}{2 \\sqrt{z \\left(x-y^5\\right)}}+\\frac{1}{2 \\sqrt{x}}+\\frac{5 y^4}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = ((y**5)/z)\nh = sqrt(z*(x-y**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y-z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{(y+z)^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 (y+z)^{5/2}},-\\frac{1}{3 \\sqrt[3]{x+y-z}^2},-\\frac{1}{3 \\sqrt[3]{x+y-z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y-z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(x-1)^3+\\sin (8-5 x)$\n", - "Output Answer": [ - "$3 (x-1)^2-5 \\cos (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((x-1)**3+sin(8-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{z}{\\sqrt{1-x^2 z^2}}+\\sec ^2(y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*z)\ng = tan(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = cbrt(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (9-3 x) \\left(-\\tan ^{-1}(3-x)\\right)$\n", - "Output Answer": [ - "$\\frac{\\sin (9-3 x)}{x^2-6 x+10}+3 \\cos (9-3 x) \\tan ^{-1}(3-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(9-3*x)*(-atan(3-x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x}{\\sqrt{1-x^2 y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^6$, $g(x,y,z) = \\cos \\left(x+z^3\\right)$, and $h(x,y,z) = \\sqrt[3]{y-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 6 z^5 \\\\\n -\\sin \\left(x+z^3\\right) & 0 & -3 z^2 \\sin \\left(x+z^3\\right) \\\\\n -\\frac{1}{3 \\sqrt[3]{y-x}^2} & \\frac{1}{3 \\sqrt[3]{y-x}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**6\ng = cos(x+z**3)\nh = cbrt(y-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3-\\frac{11 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{121}{(6-11 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3-((11*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(2 x^3+6\\right)+i \\pi +\\frac{\\log (5)}{3}$\n", - "Output Answer": [ - "$12 x \\left(6 x^3 \\tan \\left(2 \\left(x^3+3\\right)\\right)+1\\right) \\sec ^2\\left(2 \\left(x^3+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(2*x**3+6)+1j*pi+((log(5))/3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^{x-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n e^{x-y} & -e^{x-y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**y\nh = math.e**(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y^5}}$, and $h(x,y,z) = \\cos ^{-1}\\left(y^5\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{5 y^4}{\\sqrt{1-y^{10}}},0,\\frac{1}{3 y^5 \\sqrt[3]{\\frac{x}{y^5}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(x/(y**5))\nh = cbrt(x/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y^5}-z\\right)^4$\n", - "Output Answer": [ - "$\\left\\{\\frac{4 \\left(\\frac{x}{y^5}-z\\right)^3}{y^5},-\\frac{20 x \\left(\\frac{x}{y^5}-z\\right)^3}{y^6},-4 \\left(\\frac{x}{y^5}-z\\right)^3\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/(y**5))-z)**4\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x+y^4}{z^4}\\right)$", - "Output Answer": [ - "$\\frac{12 y^2 \\sec ^2\\left(\\frac{x+y^4}{z^4}\\right)}{z^4}+\\frac{20 \\left(x+y^4\\right) \\sec ^2\\left(\\frac{x+y^4}{z^4}\\right)}{z^6}+\\frac{32 y^6 \\tan \\left(\\frac{x+y^4}{z^4}\\right) \\sec ^2\\left(\\frac{x+y^4}{z^4}\\right)}{z^8}+\\frac{2 \\tan \\left(\\frac{x+y^4}{z^4}\\right) \\sec ^2\\left(\\frac{x+y^4}{z^4}\\right)}{z^8}+\\frac{32 \\left(x+y^4\\right)^2 \\tan \\left(\\frac{x+y^4}{z^4}\\right) \\sec ^2\\left(\\frac{x+y^4}{z^4}\\right)}{z^{10}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((x+y**4)/(z**4)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}(x+6)$\n", - "Output Answer": [ - "$\\frac{2 (x+6)}{\\left((x+6)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = asin(y**4)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\frac{1}{y^2+1}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = atan(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$x \\sec ^2(x z)+\\sec ^2(x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = tan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = x+y-z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(y)\nh = x+y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z^4$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 4 z^3 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z**4\ng = tan(y)\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y-z}$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\sin (x-z)+\\frac{1}{2 \\sqrt{y-z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y-z)\nh = cos(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+z}$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\frac{1}{y+z}-\\frac{1}{(x+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+z))\ng = log(y+z)\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = y z^2$, and $h(x,y,z) = \\frac{x^5 z^{10}}{y^5}$", - "Output Answer": [ - "$\\frac{10 x^5 z^9}{y^5}+z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = y*z**2\nh = ((x**5*z**10)/(y**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y z^5}\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\left(z^5\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y z^5 \\sqrt{1-\\frac{x^2}{y^2 z^{10}}}} & -\\frac{x}{y^2 z^5 \\sqrt{1-\\frac{x^2}{y^2 z^{10}}}} & -\\frac{5 x}{y z^6 \\sqrt{1-\\frac{x^2}{y^2 z^{10}}}} \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & -\\frac{15 z^4}{2 \\left(z^5\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x/(y*z**5))\ng = x\nh = (1/((z**5)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\frac{x-y}{z}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$y+\\frac{1}{z^2+1}-\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = ((x-y)/z)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = acos(y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$e^{4 x} \\sin (x)$\n", - "Output Answer": [ - "$\\frac{1121 \\cos (4)}{120 e^{16}}-\\frac{101 \\sin (4)}{30 e^{16}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(4*x)*sin(x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-y$, $g(x,y,z) = (x+y)^4$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\left\\{0,1-\\frac{3}{2} z \\sqrt{x z},4 (x+y)^3+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-y\ng = (x+y)**4\nh = (x+y)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x+\\sqrt{5 x+6}-2}$\n", - "Output Answer": [ - "$e^{-x+\\sqrt{5 x+6}-2} \\left(\\frac{5}{2 \\sqrt{5 x+6}}-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x+sqrt(5*x+6)-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-\\frac{x}{2}-6\\right)^2$\n", - "Output Answer": [ - "$\\frac{1}{2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-(x/2)-6)**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin \\left(\\frac{x}{y z}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x \\cos \\left(\\frac{x}{y z}\\right)}{y^2 z},-\\frac{\\cos \\left(\\frac{x}{y z}\\right)}{y z}-\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2},-\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y/z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x+y)^2}$, $g(x,y,z) = y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{(x+y)^3} & -\\frac{2}{(x+y)^3} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+y)**2))\ng = y\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y^3}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y^3}\\right)$", - "Output Answer": [ - "$y^3 e^{x y^3}+\\frac{1}{y^3 \\left(\\frac{z^2}{y^6}+1\\right)}+3 y^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y**3)\ng = y**3\nh = atan(z/(y**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\cos ^{-1}(z-y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(z-y)^2}}-\\frac{1}{y},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (z/y)\nh = (z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{-8 x^5-6}-\\tan \\left(2-4 x^2\\right)$\n", - "Output Answer": [ - "$\\left(8-128 x^2 \\tan \\left(2-4 x^2\\right)\\right) \\sec ^2\\left(2-4 x^2\\right)-160 e^{-8 x^5-6} x^3 \\left(10 x^5-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(-8*x**5-6)-tan(2-4*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = y\nh = cbrt(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\frac{x^3+y}{z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{\\frac{x^3+y}{z^2},-y \\sin (y z),\\frac{3 x^2}{z}+z \\sin (y z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = ((x**3+y)/z)\nh = ((x**3+y)/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos (4 x)$ on the interval $x = 4$ to $x = 8$\n", - "Output Answer": [ - "$\\frac{1}{4} (10 E(-16)+E(32-10 \\pi |-16)-E(16-5 \\pi |-16))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4*x)\na = 4\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x-z^2\\right)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt[3]{\\frac{z^2}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin \\left(x-z^2\\right) & 0 & 2 z \\sin \\left(x-z^2\\right) \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n -\\frac{z^2}{3 x^2 \\sqrt[3]{\\frac{z^2}{x}}^2} & 0 & \\frac{2 z}{3 x \\sqrt[3]{\\frac{z^2}{x}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-z**2)\ng = (1/y)\nh = cbrt((z**2)/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(7 x^2+2\\right)-\\sqrt{9 x+3}$\n", - "Output Answer": [ - "$-14 \\sin \\left(7 x^2+2\\right)-196 x^2 \\cos \\left(7 x^2+2\\right)+\\frac{81}{4 (9 x+3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7*x**2+2)-sqrt(9*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x-y^5-z^2\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\sin \\left(x-y^5-z^2\\right),5 y^4 \\sin \\left(x-y^5-z^2\\right),2 z \\sin \\left(x-y^5-z^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y**5-z**2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{y}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = log(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sinh (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{-\\cosh (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sinh(z)\nh = sinh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = \\frac{1}{z^{3/2}}$, and $h(x,y,z) = \\frac{z^5}{y^5}$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2 z^{5/2}}-\\frac{5 z^5}{y^6},0,-\\frac{1}{(x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y)\ng = (1/(z**(3/2)))\nh = (1/(z**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y^3}}$, $g(x,y,z) = y^{15}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3 y^2}{2 \\left(y^3\\right)^{3/2}} & 0 \\\\\n 0 & 15 y^{14} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y**3)))\ng = y**15\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin \\left(y^5\\right)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 5 y^4 \\cos \\left(y^5\\right) & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sin(y**5)\nh = asinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x^4$", - "Output Answer": [ - "$(x+2) (32+\\sin (2))-16+\\cos (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x**4\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{x}{y}+z\\right)^2$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z-x)$", - "Output Answer": [ - "$\\frac{2 \\left(\\frac{x}{y}+z\\right)}{y}+\\frac{1}{z-x}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/y)+z)**2\ng = log(y)\nh = log(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\tanh ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{x^5}{5}-\\frac{x^3}{3}-x+\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = atanh(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{z^{3/2}}$, and $h(x,y,z) = \\log (x-y)$", - "Output Answer": [ - "$3 x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/(z**(3/2)))\nh = log(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}+z}$, $g(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\frac{x^4}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}+z}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}+z}} & \\frac{1}{2 \\sqrt{\\frac{x}{y}+z}} \\\\\n 0 & \\frac{1}{y} & -\\frac{1}{z} \\\\\n \\frac{4 x^3}{z^4} & 0 & -\\frac{4 x^4}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y)+z)\ng = log((y/z))\nh = ((x**4)/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(x+5) \\sin \\left(4-5 x^4\\right)$\n", - "Output Answer": [ - "$\\sin \\left(4-5 x^4\\right)-20 x^3 (x+5) \\cos \\left(4-5 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((x+5)*sin(4-5*x**4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{x-y}{z^2}\\right)$", - "Output Answer": [ - "$\\frac{8 (x-y)^3}{z^8 \\left(1-\\frac{(x-y)^2}{z^4}\\right)^2}+\\frac{6 (x-y)}{z^4 \\left(1-\\frac{(x-y)^2}{z^4}\\right)}+\\frac{4 (x-y)}{z^6 \\left(1-\\frac{(x-y)^2}{z^4}\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh((x-y)/(z**2))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z}},0,-3 (x+y)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**3\ng = sqrt(z)\nh = sqrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\tanh ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{4 x^{7/2}}{45}-\\frac{x^{3/2}}{3}+\\frac{1}{\\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = atanh(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & -\\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = sqrt(y)\nh = acos(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y z}}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{2 (y z)^{3/2}}-y \\sec ^2(y z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y*z)\nh = tan(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+z)^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{3}{2 (x+z)^{5/2}}-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+z)**(3/2)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{32 x^3}{\\sqrt{1-\\left(8 x^4+\\frac{17}{2}\\right)^2}}-\\cos \\left(x+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$-\\sin ^{-1}\\left(8 x^4+\\frac{17}{2}\\right)-\\sin \\left(x+\\frac{5}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((32*x**3)/(sqrt(1-(8*x**4+(17/2))**2)))-cos(x+(5/2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^5}$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{x z}{y^5}\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{5 x z}{y^6 \\sqrt{\\frac{x z}{y^5}-1} \\sqrt{\\frac{x z}{y^5}+1}}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**5)\ng = acosh((x*z)/(y**5))\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y^5}\\right)$", - "Output Answer": [ - "$-\\frac{50 z^3}{y^{17} \\left(\\frac{z^2}{y^{10}}+1\\right)^2}+\\frac{30 z}{y^7 \\left(\\frac{z^2}{y^{10}}+1\\right)}-\\frac{2 z}{y^{15} \\left(\\frac{z^2}{y^{10}}+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z/(y**5))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y-z^3$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{3 z^2,0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+y-z**3\nh = x+y-z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 x^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-7 x^5-4}$\n", - "Output Answer": [ - "$35 e^{-7 x^5-4} x^3 \\left(35 x^5-4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-7*x**5-4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (6-2 x)+\\cos (\\tan (4-x))$\n", - "Output Answer": [ - "$-4 \\sin (6-2 x)+\\sec ^4(4-x) (-\\cos (\\tan (4-x)))-2 \\tan (4-x) \\sec ^2(4-x) \\sin (\\tan (4-x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6-2*x)+cos(tan(4-x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**y\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(1-5 x)^2-\\tan ^{-1}(8 x+5)$\n", - "Output Answer": [ - "$\\frac{128 (8 x+5)}{\\left((8 x+5)^2+1\\right)^2}+50$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1-5*x)**2-atan(8*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{y^5}{x^5}$", - "Output Answer": [ - "$1-\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y/x)\ng = y\nh = ((y**5)/(x**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = e^{\\frac{y}{x}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{e^{\\frac{y}{x}}}{x}+\\sec ^2(x)+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = math.e**(y/x)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tanh ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = e^{x y^3 z}$", - "Output Answer": [ - "$x y^3 e^{x y^3 z}-\\sin (x)+\\frac{3 y^2}{1-y^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = atanh(y**3)\nh = math.e**(x*y**3*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\cosh ^{-1}(x+z)$, and $h(x,y,z) = (z-y)^2$", - "Output Answer": [ - "$2 (z-y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = acosh(x+z)\nh = (z-y)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$2 e^{-3 x} \\sqrt{-x}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(2*math.e**(-3*x)*sqrt(-x))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},\\cos (z),\\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = tan((x/y))\nh = tan((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = (z-y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y} & e^{x+y} & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & -2 (z-y) & 2 (z-y) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y)\ng = (1/y)\nh = (z-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x-3) (-6-\\sin (3))+(x-3)^2 \\left(-1-\\frac{\\cos (3)}{2}\\right)-9+\\cos (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x**2\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = x-y$, and $h(x,y,z) = (z-y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n 1 & -1 & 0 \\\\\n 0 & -2 (z-y) & 2 (z-y) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z)\ng = x-y\nh = (z-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-4 x^2-4}-\\sin (7-3 x)$\n", - "Output Answer": [ - "$\\frac{2}{\\left(-x^2-1\\right)^{3/2}}+9 \\sin (7-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-4*x**2-4)-sin(7-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan ^{-1}(x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\frac{1}{(x+y)^2+1} & \\frac{1}{(x+y)^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = cos(y)\nh = atan(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x}{y}-z^5}$", - "Output Answer": [ - "$\\frac{x^2 e^{\\frac{x}{y}-z^5}}{y^4}+\\frac{e^{\\frac{x}{y}-z^5}}{y^2}+\\frac{2 x e^{\\frac{x}{y}-z^5}}{y^3}+25 z^8 e^{\\frac{x}{y}-z^5}-20 z^3 e^{\\frac{x}{y}-z^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x/y)-z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x}-\\cos \\left(8-7 x^2\\right)$\n", - "Output Answer": [ - "$8 e^{8 x}-14 x \\sin \\left(8-7 x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x)-cos(8-7*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{e^{-5 x-9}}-\\frac{1}{(-3 x-6)^5}$\n", - "Output Answer": [ - "$25 e^{-10 x+e^{-5 x-9}-18} \\left(e^{5 x+9}+1\\right)+\\frac{10}{81 (x+2)^7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(math.e**(-5*x-9))-(1/((-3*x-6)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(2-3 x^2\\right)-2 x+3$\n", - "Output Answer": [ - "$-6 x \\cos \\left(2-3 x^2\\right)-2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(2-3*x**2)-2*x+3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z^2$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 2 z \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & -2 z \\sin \\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z**2\ng = (1/(y**2))\nh = cos(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$-\\frac{14}{9} \\sqrt[3]{2} (x+2)^2+\\frac{14}{3} \\sqrt[3]{2} (x+2)-4 \\sqrt[3]{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\frac{1}{x}+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sin(y)\nh = sqrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+z} & 0 & e^{x+z} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+z)\ng = log(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = -\\sin (x-z)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{-\\cos (x-z),0,-\\cos (x-z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = -sin(x-z)\nh = -sin(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2 x+1)-\\sin (4)$\n", - "Output Answer": [ - "$\\frac{2}{2 x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2*x+1)-sin(4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{(x y-z)^{3/2}}$", - "Output Answer": [ - "$\\frac{15 x^2}{4 (x y-z)^{7/2}}+\\frac{15 y^2}{4 (x y-z)^{7/2}}+\\frac{15}{4 (x y-z)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y-z)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y-z}$, $g(x,y,z) = \\cos ^{-1}(y z)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{\\sqrt{1-y^2 z^2}},-e^{x y-z},x \\left(-e^{x y-z}\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y-z)\ng = acos(y*z)\nh = acos(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{12 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{144}{25} \\sin \\left(\\frac{12 x}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(((12*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{13 (x-1)^3}{48 e}-\\frac{(x-1)^2}{8 e}-\\frac{x-1}{2 e}+\\frac{1}{e}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{1,0,y e^{x y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = math.e**(x*y)\nh = math.e**(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cosh ^{-1}(x)$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$e^{x+z}-\\sin (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = acosh(x)\nh = math.e**(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x^4+y+z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{4 x^3 \\cos \\left(x^4+y+z^4\\right),\\cos \\left(x^4+y+z^4\\right),4 z^3 \\cos \\left(x^4+y+z^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4+y+z**4)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\sec ^2(y-z) & -\\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y\ng = cos(y)\nh = tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{\\frac{x}{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}},-\\frac{1}{2 y \\sqrt{\\frac{x}{y}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^3-z$, $g(x,y,z) = y^3$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,-1,-3 y^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**3-z\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}\\left(\\frac{19}{3}\\right) \\tan \\left(\\frac{2}{3}-\\frac{22 x^5}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{110}{3} x^4 \\sin ^{-1}\\left(\\frac{19}{3}\\right) \\sec ^2\\left(\\frac{2}{3}-\\frac{22 x^5}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(19/3)*tan((2/3)-((22*x**5)/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^5+z}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x^5 z$", - "Output Answer": [ - "$\\left\\{0,-5 x^4 z-\\frac{1}{2 \\left(x^5+z\\right)^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**5+z)))\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan \\left(x^5\\right)$", - "Output Answer": [ - "$\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = tan(x**5)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(5-\\frac{11 x}{2}\\right)-\\tan \\left(\\frac{7}{2}-x\\right)$\n", - "Output Answer": [ - "$\\frac{121 (11 x-10)}{\\left(-121 x^2+220 x-96\\right)^{3/2}}-2 \\tan \\left(\\frac{7}{2}-x\\right) \\sec ^2\\left(\\frac{7}{2}-x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(5-((11*x)/2))-tan((7/2)-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = (x-y)^3$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,3 (x-y)^2-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (x-y)**3\nh = (x-y)**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\sqrt{x+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(x^3 y\\right)$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = x^3 y$", - "Output Answer": [ - "$\\left\\{x^3+\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2},-3 x^2 y,-x^3 \\cosh \\left(x^3 y\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x**3*y)\ng = sin((y/z))\nh = sin((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\sqrt{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 x \\sqrt{\\frac{y}{x}}},\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}},\\frac{1}{x^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = atan(x)\nh = atan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x-y)^2$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 (x-y) & -2 (x-y) & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x-y)**2\ng = (1/(sqrt(y)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^x$ on the interval $x = 4$ to $x = 5$\n", - "Output Answer": [ - "$-\\sqrt{1+e^8}+\\sqrt{1+e^{10}}+\\tanh ^{-1}\\left(\\sqrt{1+e^8}\\right)-\\tanh ^{-1}\\left(\\sqrt{1+e^{10}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**x\na = 4\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^3}$, $g(x,y,z) = \\log \\left(y^3-x\\right)$, and $h(x,y,z) = \\sinh ^{-1}\\left(y^3+z\\right)$", - "Output Answer": [ - "$\\frac{3 y^2}{y^3-x}+\\frac{1}{\\sqrt{\\left(y^3+z\\right)^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**3)\ng = log(y**3-x)\nh = asinh(y**3+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{3}{2} z \\sqrt{x z} & 0 & \\frac{3}{2} x \\sqrt{x z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = sin(y)\nh = (x*z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4 z}$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x^4}}$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\frac{1}{3 x^4 \\sqrt[3]{\\frac{y}{x^4}}^2}+4 x^3 z e^{x^4 z}-\\sec ^2(y-z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4*z)\ng = cbrt(y/(x**4))\nh = tan(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-7 x-1)+\\log (4 x-2)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+1)^2}-\\frac{4}{(1-2 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-7*x-1)+log(4*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\cos (x)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**y\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(e^{-7 x-1}\\right)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = log(math.e**(-7*x-1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y^4}-z\\right)$", - "Output Answer": [ - "$-\\frac{16 x^2 \\left(\\frac{x}{y^4}-z\\right)}{y^{10} \\left(\\left(\\frac{x}{y^4}-z\\right)^2+1\\right)^{3/2}}+\\frac{20 x}{y^6 \\sqrt{\\left(\\frac{x}{y^4}-z\\right)^2+1}}-\\frac{\\frac{x}{y^4}-z}{y^8 \\left(\\left(\\frac{x}{y^4}-z\\right)^2+1\\right)^{3/2}}-\\frac{\\frac{x}{y^4}-z}{\\left(\\left(\\frac{x}{y^4}-z\\right)^2+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh((x/(y**4))-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x z}{y^2}$", - "Output Answer": [ - "$\\frac{6 x z}{y^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x*z)/(y**2))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-7 x-5}+\\sin ^{-1}\\left(e^{8 x-5}\\right)$\n", - "Output Answer": [ - "$\\frac{8 e^{8 x}}{\\sqrt{e^{10}-e^{16 x}}}-\\frac{7}{2 \\sqrt{-7 x-5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-7*x-5)+asin(math.e**(8*x-5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(4-\\frac{x}{2}\\right)+\\cosh \\left(\\frac{17 x}{2}+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{4} \\left(289 \\cosh \\left(\\frac{1}{2} (17 x+7)\\right)-\\sin \\left(4-\\frac{x}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(4-(x/2))+cosh(((17*x)/2)+(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\frac{7 x}{2}-\\frac{1}{2}}-\\tan \\left(\\frac{11 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{7}{2} e^{-\\frac{7 x}{2}-\\frac{1}{2}}-\\frac{11}{2} \\sec ^2\\left(\\frac{11 x}{2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-((7*x)/2)-(1/2))-tan(((11*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$(x+5) (10+\\sin (5))+(x+5)^2 \\left(-1-\\frac{\\cos (5)}{2}\\right)-25+\\cos (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (2-x)}{\\log (-8 x)}$\n", - "Output Answer": [ - "$\\frac{x \\log (-8 x) \\sin (2-x)-\\cos (2-x)}{x \\log ^2(-8 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(2-x))/(log(-8*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = (x+y)^2$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y),0,-2 (-x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (x+y)**2\nh = (x+y)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = -\\tan (y-z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$-\\sec ^2(y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = -tan(y-z)\nh = (1/(sqrt(x)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sqrt{y-x}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},1,-\\frac{1}{2 \\sqrt{y-x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = sqrt(y-x)\nh = sqrt(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = \\sqrt{y^5}$, and $h(x,y,z) = y^{10}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x \\sec ^2\\left(x^2\\right) & 0 & 0 \\\\\n 0 & \\frac{5 y^4}{2 \\sqrt{y^5}} & 0 \\\\\n 0 & 10 y^9 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x**2)\ng = sqrt(y**5)\nh = y**10\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\tan ^{-1}(x-y)$, and $h(x,y,z) = \\frac{1}{y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n \\frac{1}{(x-y)^2+1} & -\\frac{1}{(x-y)^2+1} & 0 \\\\\n 0 & -\\frac{1}{(y-z)^2} & \\frac{1}{(y-z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = atan(x-y)\nh = (1/(y-z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\frac{11}{4} (x-1)^2+\\frac{7 (x-1)}{2}+\\frac{\\pi }{4}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**3\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(2 x-3)^5}+\\log (-3 x-2)$\n", - "Output Answer": [ - "$\\frac{3}{3 x+2}-\\frac{10}{(3-2 x)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((2*x-3)**5))+log(-3*x-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\sqrt[3]{x z^5}$, and $h(x,y,z) = \\frac{1}{z^{10}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & 0 \\\\\n \\frac{z^5}{3 \\sqrt[3]{x z^5}^2} & 0 & \\frac{5 x z^4}{3 \\sqrt[3]{x z^5}^2} \\\\\n 0 & 0 & -\\frac{10}{z^{11}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4\ng = cbrt(x*z**5)\nh = (1/(z**10))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{(x-4)^3}{3 e^4}+\\frac{(x-4)^2}{e^4}-\\frac{8 (x-4)}{e^4}+\\frac{16}{e^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = math.e**x\nseries = f.subs(x, g).series(x, 4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3} \\sqrt{x^5}+\\tan (5-7 x)$\n", - "Output Answer": [ - "$\\frac{15 \\sqrt{3} \\sqrt{x^5}}{4 x^2}+98 \\tan (5-7 x) \\sec ^2(5-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3)*sqrt(x**5)+tan(5-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{3 x^2}{\\sqrt{1-x^6}}+3 y^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**3)\ng = y**3\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (3 x+8)-\\tan ^{-1}(7-x)$\n", - "Output Answer": [ - "$9 \\sin (3 x+8)-\\frac{2 (x-7)}{\\left(x^2-14 x+50\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3*x+8)-atan(7-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^3$", - "Output Answer": [ - "$-14 (x+5)^2+65 (x+5)-100$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**3\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{24 x^2}{\\sqrt{\\left(\\frac{5}{2}-8 x^3\\right)^2+1}}$\n", - "Output Answer": [ - "$-\\sinh ^{-1}\\left(\\frac{5}{2}-8 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((24*x**2)/(sqrt(((5/2)-8*x**3)**2+1)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(e^{-6 x-\\frac{3}{2}}\\right) \\tan (1-9 x)$\n", - "Output Answer": [ - "$9 \\cos \\left(e^{-6 x-\\frac{3}{2}}\\right) \\sec ^2(1-9 x)-6 e^{-6 x-\\frac{3}{2}} \\sin \\left(e^{-6 x-\\frac{3}{2}}\\right) \\tan (1-9 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-cos(math.e**(-6*x-(3/2)))*tan(1-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{e^{-2 x}}-\\frac{1}{3 x-6}$\n", - "Output Answer": [ - "$\\frac{1}{3 (x-2)^2}-\\sqrt{e^{-2 x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(math.e**(-2*x))-(1/(3*x-6)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x y)$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{y}{1-x^2 y^2}+e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x*y)\ng = y\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sin ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 0 & \\frac{3 y^2}{\\sqrt{1-y^6}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = asin(y**3)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\log (y-x)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{2}{z^3} \\\\\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**2))\ng = log(y-x)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y z}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{2 (y z)^{3/2}} & -\\frac{y}{2 (y z)^{3/2}} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y*z)))\ng = cos(y)\nh = tan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z^3$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = x^4+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z^3 & 3 y z^2 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 4 x^3 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z**3\ng = acos(y)\nh = x**4+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x y^4}{z}\\right)$", - "Output Answer": [ - "$\\frac{x y^{12}}{z^3 \\left(1-\\frac{x^2 y^8}{z^2}\\right)^{3/2}}+\\frac{x^3 y^{12}}{z^5 \\left(1-\\frac{x^2 y^8}{z^2}\\right)^{3/2}}+\\frac{16 x^3 y^{10}}{z^3 \\left(1-\\frac{x^2 y^8}{z^2}\\right)^{3/2}}+\\frac{2 x y^4}{z^3 \\sqrt{1-\\frac{x^2 y^8}{z^2}}}+\\frac{12 x y^2}{z \\sqrt{1-\\frac{x^2 y^8}{z^2}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x*y**4)/z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z^3}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z^2}{2 \\sqrt{z^3}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z**3)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x^2-7}+\\cos \\left(1-5 x^3\\right)$\n", - "Output Answer": [ - "$3 x \\left(5 x \\sin \\left(1-5 x^3\\right)-6 e^{-9 x^2-7}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x**2-7)+cos(1-5*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (6 x)$\n", - "Output Answer": [ - "$72 \\tan (6 x) \\sec ^2(6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = (x+y)^5$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 5 (x+y)^4 & 5 (x+y)^4 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = (x+y)**5\nh = asin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\cosh (x+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n \\sinh (x+z) & 0 & \\sinh (x+z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = cosh(x+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{1}{y} & -\\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cos(y)\nh = log((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^4\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\log \\left(\\frac{x^4}{z}\\right)$", - "Output Answer": [ - "$\\frac{4}{x}-\\frac{1}{2 y^{3/2}}-\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**4)\ng = (1/(sqrt(y)))\nh = log(((x**4)/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{x^2}-\\sin (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = (1/x)\nh = (1/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{7}{2}-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{9}{4} \\sin \\left(\\frac{1}{2} (7-3 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin((7/2)-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\sqrt[3]{x^2}$", - "Output Answer": [ - "$\\frac{7 (x-3)^2}{72\\ 3^{5/6}}+\\frac{7 (x-3)}{2\\ 3^{5/6}}+3 \\sqrt[6]{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = cbrt(x**2)\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\cos (x-y) & \\cos (x-y) & 0 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -sin(x-y)\ng = (z/x)\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cos(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^5\\right)$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$\\frac{x^2}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**5)\ng = cosh(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{1,0,-\\frac{1}{y-x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-x)\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cosh (x)$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\frac{2 z^3}{\\sqrt{z^4}}-\\frac{1}{2 x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = cosh(x)\nh = sqrt(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$e^{x+z}+e^x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = math.e**(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (x-y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\cos (x-y)+\\frac{1}{2 \\sqrt{x}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(x-y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7 x-5}+\\cos (5-4 x)$\n", - "Output Answer": [ - "$-\\frac{49}{4 (7 x-5)^{3/2}}-16 \\cos (5-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7*x-5)+cos(5-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan \\left(x^3-z^4\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cosh \\left(x^3\\right)$", - "Output Answer": [ - "$\\left\\{0,4 z^3 \\sec ^2\\left(x^3-z^4\\right)-3 x^2 \\sinh \\left(x^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x**3-z**4)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x^4}{y}\\right)$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x^4}{y z}}}$", - "Output Answer": [ - "$\\frac{x^4}{2 y z^2 \\left(\\frac{x^4}{y z}\\right)^{3/2}}+\\frac{4}{x}+z \\cos (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((x**4)/y))\ng = sin(y*z)\nh = (1/(sqrt(((x**4)/(y*z)))))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x z)$, $g(x,y,z) = \\cos \\left(\\frac{x y}{z}\\right)$, and $h(x,y,z) = e^{x y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -z \\sin (x z) & 0 & -x \\sin (x z) \\\\\n -\\frac{y \\sin \\left(\\frac{x y}{z}\\right)}{z} & -\\frac{x \\sin \\left(\\frac{x y}{z}\\right)}{z} & \\frac{x y \\sin \\left(\\frac{x y}{z}\\right)}{z^2} \\\\\n y z e^{x y z} & x z e^{x y z} & x y e^{x y z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*z)\ng = cos(((x*y)/z))\nh = math.e**(x*y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tanh ^{-1}(x)$", - "Output Answer": [ - "$\\sec ^2(x)+3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y**3\nh = atanh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{x^2},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y^5}+z\\right)$", - "Output Answer": [ - "$\\frac{50 x^2 \\tan \\left(\\frac{x}{y^5}+z\\right) \\sec ^2\\left(\\frac{x}{y^5}+z\\right)}{y^{12}}+\\frac{30 x \\sec ^2\\left(\\frac{x}{y^5}+z\\right)}{y^7}+\\frac{2 \\tan \\left(\\frac{x}{y^5}+z\\right) \\sec ^2\\left(\\frac{x}{y^5}+z\\right)}{y^{10}}+2 \\tan \\left(\\frac{x}{y^5}+z\\right) \\sec ^2\\left(\\frac{x}{y^5}+z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/(y**5))+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x+y)^2}$, and $h(x,y,z) = \\sinh (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{2}{(x+y)^3} & -\\frac{2}{(x+y)^3} & 0 \\\\\n 0 & z \\cosh (y z) & y \\cosh (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((x+y)**2))\nh = sinh(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin ^{-1}(2 x)$ on the interval $x = 5$ to $x = 15$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{5} \\left(2 i \\sqrt{19}-E\\left(\\sin ^{-1}(10)|\\frac{1}{5}\\right)+E\\left(\\sin ^{-1}(30)|\\frac{1}{5}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(2*x)\na = 5\nb = 15\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}} & \\frac{1}{2 x \\sqrt{\\frac{y}{x}}} & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((y/x))\ng = math.e**y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = log(y)\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sqrt[3]{z-x}$, and $h(x,y,z) = e^{y^4-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n -e^{y^4-x} & 4 y^3 e^{y^4-x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = cbrt(z-x)\nh = math.e**(y**4-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$3 x^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = cbrt(x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tanh (x y z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n y z \\text{sech}^2(x y z) & x z \\text{sech}^2(x y z) & x y \\text{sech}^2(x y z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = tanh(x*y*z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\text{sech}^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tanh(y)\nh = asin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^2+7}+\\cos (2-2 x)$\n", - "Output Answer": [ - "$\\frac{5 x}{\\sqrt{5 x^2+7}}+2 \\sin (2-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**2+7)+cos(2-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^5\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x-4) \\left(-\\frac{1}{6 \\sqrt[3]{2}}-1280 \\sin (1024)\\right)-2^{2/3}+\\cos (1024)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**5)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-8 x-9}-\\sin \\left(8 x^2+4\\right)$\n", - "Output Answer": [ - "$-16 x \\cos \\left(8 x^2+4\\right)-8 e^{-8 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-8*x-9)-sin(8*x**2+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{z}{3 \\sqrt[3]{x z}^2}+\\frac{1}{2 \\sqrt{y}}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z)\ng = sqrt(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x y}{z^3}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{y}{2 z^3 \\sqrt{\\frac{x y}{z^3}}},\\frac{x}{2 z^3 \\sqrt{\\frac{x y}{z^3}}},-\\frac{3 x y}{2 z^4 \\sqrt{\\frac{x y}{z^3}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x*y)/(z**3)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{z}{y}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{x z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}} & \\frac{1}{2 y \\sqrt{\\frac{z}{y}}} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{z}{2 (x z)^{3/2}} & 0 & -\\frac{x}{2 (x z)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((z/y))\ng = sqrt(y)\nh = (1/(sqrt(x*z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$4 x \\left(\\left(7 e^{7 x^4+8}+16\\right) x^2-6\\right)$\n", - "Output Answer": [ - "$4 \\left(4 x^4-3 x^2+\\frac{1}{4} e^{7 x^4+8}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 4*x*((7*math.e**(7*x**4+8)+16)*x**2-6)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+z)$, $g(x,y,z) = \\log \\left(y^4+z\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+z)^2}}+\\frac{4 y^3}{y^4+z}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+z)\ng = log(y**4+z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2 x^5+\\frac{20}{3}\\right)-e^{\\frac{2 x}{3}-2}$\n", - "Output Answer": [ - "$-10 x^4 \\sin \\left(2 x^5+\\frac{20}{3}\\right)-\\frac{2}{3} e^{\\frac{2 x}{3}-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(2*x**5+(20/3))-math.e**(((2*x)/3)-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = asin(x)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+y-z)^{3/2}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tanh ^{-1}(y+z)$", - "Output Answer": [ - "$-\\frac{3}{2 (x+y-z)^{5/2}}+\\frac{1}{1-(y+z)^2}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y-z)**(3/2)))\ng = log(y)\nh = atanh(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y-z$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\{z+1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{x y z}$", - "Output Answer": [ - "$\\left\\{\\frac{x z}{3 \\sqrt[3]{x y z}^2},x-\\frac{y z}{3 \\sqrt[3]{x y z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{1}{x^2}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-x)$ on the interval $x = 5$ to $x = 7$\n", - "Output Answer": [ - "$5 \\sqrt{2}-\\sqrt{26}-\\tanh ^{-1}\\left(5 \\sqrt{2}\\right)+\\tanh ^{-1}\\left(\\sqrt{26}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-x)\na = 5\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(y**2))\nh = tan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{5-3 x} \\sin (x+2)$\n", - "Output Answer": [ - "$2 e^{5-3 x} (3 \\cos (x+2)-4 \\sin (x+2))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(5-3*x)*sin(x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(2-4 x)$\n", - "Output Answer": [ - "$-\\frac{32 (2-4 x)}{\\left((2-4 x)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(2-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = z^{12}$", - "Output Answer": [ - "$4 x^3+12 z^{11}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = z**12\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{z^3}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = -\\tan \\left(x-z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2\\left(x-z^3\\right)-\\frac{3 x \\sec ^2\\left(\\frac{x}{z^3}\\right)}{z^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/(z**3)))\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x+y^2+z\\right)^2}$", - "Output Answer": [ - "$\\frac{24 y^2}{\\left(x+y^2+z\\right)^4}-\\frac{4}{\\left(x+y^2+z\\right)^3}+\\frac{12}{\\left(x+y^2+z\\right)^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y**2+z)**2))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{5}{(5 x+9)^2+1}-\\frac{5 x^4}{\\sqrt{2 x^5-5}}$\n", - "Output Answer": [ - "$\\tan ^{-1}(5 x+9)-\\sqrt{2 x^5-5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5/((5*x+9)**2+1))-((5*x**4)/(sqrt(2*x**5-5)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\tan ^{-1}\\left(y^2\\right)$", - "Output Answer": [ - "$\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = log(z)\nh = atan(y**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}(3-3 x)$\n", - "Output Answer": [ - "$\\frac{18 (3-3 x)}{\\left(9 (x-1)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(3-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = sqrt(y)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(8 x^5+9\\right)$\n", - "Output Answer": [ - "$\\frac{80 x^3 \\left(48 x^{10}+18 x^5-41\\right)}{\\left(32 x^{10}+72 x^5+41\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(8*x**5+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{15 x}{2}+7\\right)$\n", - "Output Answer": [ - "$-\\frac{225}{2} \\tan \\left(\\frac{15 x}{2}+7\\right) \\sec ^2\\left(\\frac{15 x}{2}+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(((15*x)/2)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{3 x+7}$\n", - "Output Answer": [ - "$\\frac{18}{(3 x+7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(3*x+7))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -3, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = x^2$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$-2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = x**2\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(7 x-7)^3}-\\log (x-8)$\n", - "Output Answer": [ - "$\\frac{588}{(7 x-7)^5}+\\frac{1}{(x-8)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x-7)**3))-log(x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (y+z)^5$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y+z)**5\ng = atan(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = log((z/y))\nh = log((z/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 z^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = tan(y**5)\nh = tan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\left(x^3+y\\right)^3$, and $h(x,y,z) = \\frac{x^3}{y}+z$", - "Output Answer": [ - "$\\left\\{-\\frac{x^3}{y^2},-\\frac{3 x^2}{y},9 x^2 \\left(x^3+y\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (x**3+y)**3\nh = (x**3+y)**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x-3}-e^{-8 x^3}$\n", - "Output Answer": [ - "$24 e^{-8 x^3} x^2+\\frac{7}{2 \\sqrt{7 x-3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x-3)-math.e**(-8*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (4-7 x)-\\cosh \\left(5 x^5+7\\right)$\n", - "Output Answer": [ - "$-100 x^3 \\sinh \\left(5 x^5+7\\right)-625 x^8 \\cosh \\left(5 x^5+7\\right)+98 \\tan (4-7 x) \\sec ^2(4-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4-7*x)-cosh(5*x**5+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2 x-9) \\cos \\left(6 x+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{2 \\cos \\left(6 x+\\frac{7}{2}\\right)}{2 x-9}-6 \\log (2 x-9) \\sin \\left(6 x+\\frac{7}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2*x-9)*cos(6*x+(7/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = \\sqrt{\\frac{x z}{y}}$, and $h(x,y,z) = \\frac{x}{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n \\frac{z}{2 y \\sqrt{\\frac{x z}{y}}} & -\\frac{x z}{2 y^2 \\sqrt{\\frac{x z}{y}}} & \\frac{x}{2 y \\sqrt{\\frac{x z}{y}}} \\\\\n \\frac{1}{y z} & -\\frac{x}{y^2 z} & -\\frac{x}{y z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/x)\ng = sqrt(((x*z)/y))\nh = (x/(y*z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y+z$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = y+z\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+e^{y+z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = y\nh = math.e**(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(-\\frac{1}{12}-\\frac{\\pi }{36}\\right) (x+1)^2+\\left(-\\frac{1}{2}-\\frac{\\pi }{12}\\right) (x+1)+\\frac{\\pi }{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (5 x+5)}{\\log (5 x-3)}$\n", - "Output Answer": [ - "$\\frac{5 \\left(-\\frac{\\cos (5 (x+1))}{5 x-3}-\\log (5 x-3) \\sin (5 (x+1))\\right)}{\\log ^2(5 x-3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(5*x+5))/(log(5*x-3))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x y)^{3/2}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3}{2} y \\sqrt{x y} & \\frac{3}{2} x \\sqrt{x y} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x*y)**(3/2)\ng = tan(y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y+z}}+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = cbrt(y)\nh = sqrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5} \\sqrt{x}-\\tan (7-3 x)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{5}}{4 x^{3/2}}-18 \\tan (7-3 x) \\sec ^2(7-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5)*sqrt(x)-tan(7-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\left\\{x-\\frac{1}{\\sqrt{1-(y+z)^2}},-y,-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = asin(y+z)\nh = asin(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x-6}-\\cos ^{-1}(5 x+3)$\n", - "Output Answer": [ - "$\\frac{5}{\\sqrt{1-(5 x+3)^2}}-e^{-x-6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x-6)-acos(5*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,1,-\\frac{2}{x^3}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = (1/(x**2))\nh = (1/(x**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x+y)\nh = sin((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\{-\\sin (y+z)-\\cos (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = sin(z)\nh = sin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$\\frac{x^3}{6}+x-\\frac{\\pi }{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = acos(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4-7 x^4\\right)$\n", - "Output Answer": [ - "$84 x^2 \\sin \\left(4-7 x^4\\right)-784 x^6 \\cos \\left(4-7 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-7*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n 1 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*z)\ng = x+y\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (x y-z)$, and $h(x,y,z) = z^3 (x+y)^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n -y \\sin (x y-z) & -x \\sin (x y-z) & \\sin (x y-z) \\\\\n 3 z^3 (x+y)^2 & 3 z^3 (x+y)^2 & 3 z^2 (x+y)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cos(x*y-z)\nh = z**3*(x+y)**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = x^3+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 3 z^2 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 3 x^2 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**3\ng = (1/(y**(3/2)))\nh = x**3+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^2}$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{5}{e^5}-\\frac{4 (x-5)}{e^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**2)\ng = math.e**x\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = \\sqrt{y^3-z}$", - "Output Answer": [ - "$\\cos (x)-\\frac{1}{2 \\sqrt{y^3-z}}+\\frac{3 y^2}{2 \\sqrt{y^3}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(y**3)\nh = sqrt(y**3-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y^3}-z^2\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{\\cos \\left(\\frac{x}{y^3}-z^2\\right)}{y^3},-\\frac{3 x \\cos \\left(\\frac{x}{y^3}-z^2\\right)}{y^4},-2 z \\cos \\left(\\frac{x}{y^3}-z^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/(y**3))-z**2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = cos(x**2)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{(x+y)^5}{z^5}$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 (x+y)^4}{z^5} & \\frac{5 (x+y)^4}{z^5} & -\\frac{5 (x+y)^5}{z^6} \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n 0 & 2 y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (((x+y)**5)/(z**5))\ng = cos(x+y)\nh = y**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{6 x-1} \\tan (7 x+6)$\n", - "Output Answer": [ - "$-e^{6 x-1} \\left(6 \\tan (7 x+6)+7 \\sec ^2(7 x+6)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(6*x-1)*tan(7*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fourth term in the series expansion of the following function around 4:\n\n$\\cos \\left(\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{2187 \\cos (18)}{128}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(((9*x)/2)))\nseries = f.series(x, 4, None)\nfor i, term in enumerate(series):\n if i == 4: print(term)\n elif i > 4: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos \\left(y^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -5 y^4 \\sin \\left(y^5\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sqrt(x)\nh = cos(y**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x-5} \\cos (7 x+3)$\n", - "Output Answer": [ - "$-98 e^{7 x-5} \\sin (7 x+3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x-5)*cos(7*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$y-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = cos(y)\nh = acos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y+z}$, $g(x,y,z) = \\tanh (y+z)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y+z}} & \\frac{1}{2 \\sqrt{x+y+z}} & \\frac{1}{2 \\sqrt{x+y+z}} \\\\\n 0 & \\text{sech}^2(y+z) & \\text{sech}^2(y+z) \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y+z)\ng = tanh(y+z)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos (1-8 x) \\tan (2 x+3)$\n", - "Output Answer": [ - "$-2 \\left(4 \\sin (1-8 x) \\tan (2 x+3)+\\cos (1-8 x) \\sec ^2(2 x+3)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(1-8*x)*tan(2*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,-\\sin (z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x+3} \\tan (8-7 x)$\n", - "Output Answer": [ - "$\\frac{2 \\left(7 (4 x+3) (7 (4 x+3) \\tan (8-7 x)-2) \\sec ^2(8-7 x)-2 \\tan (8-7 x)\\right)}{(4 x+3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x+3)*tan(8-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sqrt(y)\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-8 x-6)$\n", - "Output Answer": [ - "$-\\frac{16}{(4 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-8*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan ^{-1}\\left(3 x^5+6\\right)-e^{5-8 x}$\n", - "Output Answer": [ - "$8 e^{5-8 x}-\\frac{15 x^4}{9 \\left(x^5+2\\right)^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-atan(3*x**5+6)-math.e**(5-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (y-z)$, $g(x,y,z) = z-y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-1,\\sec ^2(y-z),\\sec ^2(y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(y-z)\ng = z-y\nh = z-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (9 x+6)}{\\log \\left(8 x^3+7\\right)}$\n", - "Output Answer": [ - "$\\frac{3 \\left(3 \\log \\left(8 x^3+7\\right) \\sec ^2(9 x+6)-\\frac{8 x^2 \\tan (9 x+6)}{8 x^3+7}\\right)}{\\log ^2\\left(8 x^3+7\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(9*x+6))/(log(8*x**3+7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(y-z^3\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z^2}{\\sqrt{1-\\left(y-z^3\\right)^2}},\\frac{1}{\\sqrt{1-\\left(y-z^3\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y-z**3)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{\\left(y+z^3\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & -\\frac{3}{2 \\left(y+z^3\\right)^{5/2}} & -\\frac{9 z^2}{2 \\left(y+z^3\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = sin(y)\nh = (1/((y+z**3)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x^4}{y}}}$", - "Output Answer": [ - "$\\frac{3 x^8}{4 y^4 \\left(\\frac{x^4}{y}\\right)^{5/2}}+\\frac{12 x^6}{y^2 \\left(\\frac{x^4}{y}\\right)^{5/2}}-\\frac{x^4}{y^3 \\left(\\frac{x^4}{y}\\right)^{3/2}}-\\frac{6 x^2}{y \\left(\\frac{x^4}{y}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(((x**4)/y))))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^4\\right)$, $g(x,y,z) = \\log \\left(x^4+y\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{4 x^3}{x^4+y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**4)\ng = log(x**4+y)\nh = log(x**4+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(x^4-y\\right)$", - "Output Answer": [ - "$\\frac{16 x^6 \\left(x^4-y\\right)}{\\left(1-\\left(x^4-y\\right)^2\\right)^{3/2}}+\\frac{12 x^2}{\\sqrt{1-\\left(x^4-y\\right)^2}}+\\frac{x^4-y}{\\left(1-\\left(x^4-y\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**4-y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sin(y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = (1/(sqrt(y)))\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (4-5 x)-\\cos (5 x+2)$\n", - "Output Answer": [ - "$25 \\left(\\cos (5 x+2)+2 \\tan (4-5 x) \\sec ^2(4-5 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4-5*x)-cos(5*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y+z\nh = y+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$(x-5)^2 \\sin (5) (-\\cosh (5))+(x-5) (\\cos (5) \\cosh (5)-\\sin (5) \\sinh (5))+\\cos (5) \\sinh (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tan (x-y)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x},\\sec ^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = tan(x-y)\nh = tan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{1}{y}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = log(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{y^5}\\right)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$-\\frac{5 x}{y^6 \\left(1-\\frac{x^2}{y^{10}}\\right)}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = atanh(x/(y**5))\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^2$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,-2 y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**2\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x z)^{3/2}$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\cos (x-y)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+y}^2}+\\frac{3}{2} z \\sqrt{x z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*z)**(3/2)\ng = cbrt(x+y)\nh = cos(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = y z^2$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\cos (x+y)+z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y)\ng = y*z**2\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = cbrt(y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$, and $h(x,y,z) = \\frac{1}{(x+z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 0 \\\\\n \\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2} & 0 & -\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2} \\\\\n -\\frac{3}{2 (x+z)^{5/2}} & 0 & -\\frac{3}{2 (x+z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y\ng = cbrt(x/z)\nh = (1/((x+z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{(x-z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{2}{(x-z)^3} & 0 & \\frac{2}{(x-z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(y)\nh = (1/((x-z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sinh ^{-1}\\left(x^5\\right)$", - "Output Answer": [ - "$\\left(1-\\frac{816}{205 \\sqrt{41}}\\right) (x-2)^2+\\left(4+\\frac{16}{\\sqrt{41}}\\right) (x-2)+4+\\sinh ^{-1}(32)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = asinh(x**5)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(x+y^2\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(y^2\\right)$, and $h(x,y,z) = x+y^2-z$", - "Output Answer": [ - "$\\left\\{2 y,-1,-\\frac{2 y}{\\sqrt{x+y^2-1} \\sqrt{x+y^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x+y**2)\ng = atan(y**2)\nh = atan(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left\\{1,-\\frac{1}{3 \\sqrt[3]{x}^2},-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = x^3 y+z^2$\n", - "Output Answer": [ - "$\\left\\{3 x^2 y,x^3,2 z\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y+z**2\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x**4\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (\\cos (7 x+8))-\\sin (2-4 x)$\n", - "Output Answer": [ - "$4 \\cos (2-4 x)+7 \\sin (7 x+8) \\sin (\\cos (7 x+8))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(cos(7*x+8))-sin(2-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $x^{15}$", - "Output Answer": [ - "$\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = x**15\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = \\frac{1}{z^{3/2}}$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z)\ng = (1/(z**(3/2)))\nh = (y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{44}{5}-\\frac{4 x}{5}\\right)+e^{-\\tan \\left(6 x+\\frac{12}{5}\\right)}$\n", - "Output Answer": [ - "$-\\frac{4}{5} \\cos \\left(\\frac{4 (x-11)}{5}\\right)-6 e^{-\\tan \\left(6 x+\\frac{12}{5}\\right)} \\sec ^2\\left(6 x+\\frac{12}{5}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin((44/5)-((4*x)/5))+math.e**(-tan(6*x+(12/5))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y),0,-5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\sqrt{z (x+y)}$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{z (x+y)}}-\\frac{z}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = sqrt(z*(x+y))\nh = asin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{3}{2 z^{5/2}}+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = y*z\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x+z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(8 x-3)^4}+\\frac{1}{(5-8 x)^2}$\n", - "Output Answer": [ - "$16 \\left(\\frac{1}{(5-8 x)^3}-\\frac{2}{(8 x-3)^5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((8*x-3)**4))+(1/((5-8*x)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(y^5\\right)^{3/2}}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$5 y^4-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y**5)**(3/2)))\ng = y**5\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fourth term in the series expansion of the following function around 4:\n\n$1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(1)\nseries = f.series(x, 4, None)\nfor i, term in enumerate(series):\n if i == 4: print(term)\n elif i > 4: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{y}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = y**(3/2)\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(x^2-9\\right) \\left(-\\tan ^{-1}(3 x)\\right)$\n", - "Output Answer": [ - "$-\\frac{3 \\log \\left(x^2-9\\right)}{9 x^2+1}-\\frac{2 x \\tan ^{-1}(3 x)}{x^2-9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x**2-9)*(-atan(3*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x^8 y^2}$", - "Output Answer": [ - "$\\frac{72}{x^{10} y^2}+\\frac{6}{x^8 y^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**8*y**2))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^3\\right)$ and $g(x) = $e^x$", - "Output Answer": [ - "$-2 (x+1)^2 (3 e \\sin (1)+2 e \\cos (1))+(x+1) (3 e \\sin (1)-e \\cos (1))+e \\cos (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{3 \\sqrt[3]{y-x}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y-x)\nh = cbrt(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan (x y)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sin(y)\nh = tan(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (8 x+8)-\\cos (2 x+4)$\n", - "Output Answer": [ - "$4 (\\cos (2 (x+2))-16 \\cos (8 (x+1)))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8*x+8)-cos(2*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{3 \\sqrt[3]{y+z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(x)\nh = cbrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3 x+4}+\\cos (4)$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{3 x+4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3*x+4)+cos(4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x+z^3\\right)$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$3 z^2-\\sin \\left(x+z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z**3)\ng = cbrt(x)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\tan \\left(\\frac{x-y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{\\sec ^2\\left(\\frac{x-y}{z}\\right)}{z},-\\frac{\\sec ^2\\left(\\frac{x-y}{z}\\right)}{z},\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan (5-7 x)-\\tan (7 x+1)$\n", - "Output Answer": [ - "$7 \\left(\\sec ^2(5-7 x)-\\sec ^2(7 x+1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(5-7*x)-tan(7*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(6 x^2+1\\right)$\n", - "Output Answer": [ - "$-12 \\left(24 x^2 \\tan \\left(6 x^2+1\\right)+1\\right) \\sec ^2\\left(6 x^2+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(6*x**2+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (7 x+8)+\\cos (1-3 x)$\n", - "Output Answer": [ - "$-49 \\sin (7 x+8)-9 \\cos (1-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x+8)+cos(1-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+y}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = z^{12}$", - "Output Answer": [ - "$-\\frac{1}{(x+y)^2}-\\frac{1}{\\sqrt{1-y^2}}+12 z^{11}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+y))\ng = acos(y)\nh = z**12\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+2)^2 \\left(\\frac{\\sin (2)}{2}-80\\right)+(x+2) (80+\\cos (2))-32-\\sin (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = sin(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-5}-\\sqrt{-x^2-1}$\n", - "Output Answer": [ - "$\\frac{x}{\\sqrt{-x^2-1}}+\\frac{4}{\\sqrt{8 x-5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-5)-sqrt(-x**2-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y^2$, and $h(x,y,z) = e^{\\frac{z^4}{y}}$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+\\frac{4 z^3 e^{\\frac{z^4}{y}}}{y}+2 y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y**2\nh = math.e**((z**4)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y z}}$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\left\\{\\frac{y}{2 (y z)^{3/2}},\\frac{1}{3 \\sqrt[3]{z-x}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(sqrt(y*z)))\nh = (1/(sqrt(y*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n -\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)} & \\frac{1}{x \\left(\\frac{y^2}{x^2}+1\\right)} & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = atan(y/x)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\cosh (y)-\\sin (z)-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = sinh(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3-6 x}+\\tan (8-9 x)$\n", - "Output Answer": [ - "$36 e^{3-6 x}+162 \\tan (8-9 x) \\sec ^2(8-9 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3-6*x)+tan(8-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = sin(x)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\sqrt{6 x-4}}-\\sqrt{8 x+4}$\n", - "Output Answer": [ - "$\\frac{3 e^{\\sqrt{6 x-4}}}{\\sqrt{6 x-4}}-\\frac{2}{\\sqrt{2 x+1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(sqrt(6*x-4))-sqrt(8*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = -\\tanh (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}} & 0 & \\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}} \\\\\n 0 & 1 & 0 \\\\\n -\\text{sech}^2(x-z) & 0 & \\text{sech}^2(x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(z/x)\ng = y\nh = -tanh(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y*z)\ng = atan(y)\nh = cos((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+\\sec ^2(y)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = tan(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = z^4$, and $h(x,y,z) = \\log (z-x)$", - "Output Answer": [ - "$\\frac{1}{z-x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = z**4\nh = log(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-2 x}-\\sin (2-3 x)$\n", - "Output Answer": [ - "$3 \\cos (2-3 x)-2 e^{8-2 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-2*x)-sin(2-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (x)+e^y+\\cos (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**y\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{1}{x^2}-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cos(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (y)$, $g(x,y,z) = x$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),1-\\text{sech}^2(y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(y)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{y}{z}}$, $g(x,y,z) = \\tanh ^{-1}(x+y)$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 z \\sqrt{\\frac{y}{z}}} & -\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}} \\\\\n \\frac{1}{1-(x+y)^2} & \\frac{1}{1-(x+y)^2} & 0 \\\\\n \\text{sech}^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((y/z))\ng = atanh(x+y)\nh = tanh(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-z)^4$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-z)**4\ng = acosh(x/z)\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & 3 y^2 & 0 \\\\\n \\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2} & 0 & -\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = y**3\nh = cbrt(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/x)\ng = y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = z-y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -1 & 1 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = z-y\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^{12}$", - "Output Answer": [ - "$(x+3)^2 \\left(-3897234-\\tan ^3(3)-\\tan (3)\\right)+(x+3) \\left(2125765+\\tan ^2(3)\\right)-531441-\\tan (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**12\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = (x+y-z)^{3/2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n \\frac{3}{2} \\sqrt{x+y-z} & \\frac{3}{2} \\sqrt{x+y-z} & -\\frac{3}{2} \\sqrt{x+y-z} \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = (x+y-z)**(3/2)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3-x^5}-\\cos ^{-1}\\left(8-x^2\\right)$\n", - "Output Answer": [ - "$-5 e^{3-x^5} x^4-\\frac{2 x}{\\sqrt{1-\\left(x^2-8\\right)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3-x**5)-acos(8-x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x^5\\right)$", - "Output Answer": [ - "$-20 x^3 \\sin \\left(x^5\\right)-25 x^8 \\cos \\left(x^5\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = sin(x)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(4-x^5\\right)$\n", - "Output Answer": [ - "$10 x^3 \\left(5 x^5 \\tan \\left(4-x^5\\right)-2\\right) \\sec ^2\\left(4-x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4-x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{x^4}{y}\\right)^{3/2}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{6 x^3 \\sqrt{\\frac{x^4}{y}}}{y}+\\sec ^2(y)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/y)**(3/2)\ng = tan(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{41 x^5}{120}+\\frac{x^4}{2}+\\frac{5 x^3}{6}+x^2+x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{5 x^2}{5 x^3-1}$\n", - "Output Answer": [ - "$\\frac{1}{3} \\log \\left(5 x^3-1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((5*x**2)/(5*x**3-1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z-x^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n -2 x & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = (1/(y**(3/2)))\nh = z-x**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-8 x-4}-\\frac{1}{(7 x-4)^5}$\n", - "Output Answer": [ - "$\\frac{35}{(4-7 x)^6}-\\frac{2}{\\sqrt{-2 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-8*x-4)-(1/((7*x-4)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$-\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2}+2 x+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = math.e**y\nh = cbrt(x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = e^{x/y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{x e^{x/y}}{y^2}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((z/y))\ng = math.e**(x/y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$\\sin (4 x)-\\sqrt{3} \\sqrt{x}$\n", - "Output Answer": [ - "$\\frac{7}{82944}-\\frac{256 \\sin (12)}{45}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sin(4*x)-sqrt(3)*sqrt(x))\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = cbrt(y)\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{1}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = (1/y)\nh = asin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{5 x-8}}{7 x^2-5}$\n", - "Output Answer": [ - "$\\frac{-105 x^2+224 x-25}{2 \\sqrt{5 x-8} \\left(5-7 x^2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(5*x-8))/(7*x**2-5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$3 x^2+\\frac{1}{y^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = atan(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{28 x^3}{7 x^4+5}$\n", - "Output Answer": [ - "$\\log \\left(7 x^4+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((28*x**3)/(7*x**4+5))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7-8 x^4} \\cos (3)$\n", - "Output Answer": [ - "$\\frac{16 x^2 \\left(8 x^4-21\\right) \\cos (3)}{\\left(7-8 x^4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7-8*x**4)*cos(3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{17 x}{3}+7\\right)-\\sin \\left(5 x+\\frac{8}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{17}{3} \\sin \\left(\\frac{17 x}{3}+7\\right)-5 \\cos \\left(5 x+\\frac{8}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((17*x)/3)+7)-sin(5*x+(8/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (7 x)-\\sin (\\tan (4 x+5))$\n", - "Output Answer": [ - "$49 \\sin (7 x)-32 \\tan (4 x+5) \\sec ^2(4 x+5) \\cos (\\tan (4 x+5))+16 \\sec ^4(4 x+5) \\sin (\\tan (4 x+5))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7*x)-sin(tan(4*x+5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = (1/y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y+z$, $g(x,y,z) = y+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{-1,1,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y+z\ng = y+z\nh = y+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{e^{-4 x-8}} \\cosh (8 x)$\n", - "Output Answer": [ - "$e^{e^{-4 (x+2)}-4 (x+2)} \\left(8 e^{4 x+8} \\sinh (8 x)-4 \\cosh (8 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(math.e**(-4*x-8))*cosh(8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$y \\cos (x y)-y \\sin (y z)+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = sin(y)\nh = cos(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan \\left(x^3+3\\right)}{e^6}$\n", - "Output Answer": [ - "$-\\frac{3 x^2 \\sec ^2\\left(x^3+3\\right)}{e^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(x**3+3))/(math.e**6)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\cosh ^{-1}(y z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & \\frac{z}{\\sqrt{y z-1} \\sqrt{y z+1}} & \\frac{y}{\\sqrt{y z-1} \\sqrt{y z+1}} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = acosh(y*z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = x$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}},0,\\sin (x+y)+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**2))\ng = acos(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z/x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(\\frac{9 x}{2}+\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{324 (9 x+13)}{\\left(81 x^2+234 x+173\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(((9*x)/2)+(13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = e^{x^2}$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-5) \\left(10 e^{25} \\csc (5)-e^{25} \\cot (5) \\csc (5)\\right)+e^{25} \\csc (5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**2)\ng = sin(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^3}{x^3}$, $g(x,y,z) = y$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left\\{0,-1,-\\frac{3 y^2}{x^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**3)/(x**3))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(-5 x-1)^5 \\sin \\left(4-2 x^2\\right)$\n", - "Output Answer": [ - "$(5 x+1)^4 \\left(25 \\sin \\left(4-2 x^2\\right)-4 x (5 x+1) \\cos \\left(4-2 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(-5*x-1)**5*sin(4-2*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(1-9 x)$\n", - "Output Answer": [ - "$-\\frac{162 (1-9 x)}{\\left((1-9 x)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(1-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+z^3}$, $g(x,y,z) = y^4$, and $h(x,y,z) = z^9$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+z^3}} & 0 & \\frac{3 z^2}{2 \\sqrt{x+z^3}} \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 9 z^8 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+z**3)\ng = y**4\nh = z**9\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$-\\frac{x^3}{6}+x+\\sqrt{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{z}{x}\\right)^{3/2}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt[3]{z-y}$", - "Output Answer": [ - "$-\\frac{3 z \\sqrt{\\frac{z}{x}}}{2 x^2}-\\frac{2}{y^3}+\\frac{1}{3 \\sqrt[3]{z-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)**(3/2)\ng = (1/(y**2))\nh = cbrt(z-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-7 x}+e^{4 x+\\frac{15}{2}}$\n", - "Output Answer": [ - "$4 e^{4 x+\\frac{15}{2}}-7 e^{2-7 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-7*x)+math.e**(4*x+(15/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\frac{y}{3 \\sqrt[3]{y z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(x+z)\nh = cbrt(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & z & y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = sqrt(y)\nh = y*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{y}-z$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y} & -\\frac{x}{y^2} & -1 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/y)-z\ng = asin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\tan (x+y-z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-\\frac{y \\sec ^2\\left(\\frac{y}{x}\\right)}{x^2}+\\sec ^2(x+y-z)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/x))\ng = tan(x+y-z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$1-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = y\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^2$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$2 (x+y)-\\frac{3}{2 y^{5/2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**2\ng = (1/(y**(3/2)))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x/y)\ng = z**3\nh = (x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x z}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z e^{x z} & 0 & x e^{x z} \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & \\sinh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*z)\ng = (1/(y**2))\nh = cosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\log \\left(z^2\\right)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$z \\cos (x z)+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z)\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{9 x}{2}-\\frac{13}{2}}$\n", - "Output Answer": [ - "$-\\frac{81}{16 \\left(-\\frac{9 x}{2}-\\frac{13}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-((9*x)/2)-(13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}\\left(x^4\\right)$ and $g(x) = $x^3$", - "Output Answer": [ - "$x+\\frac{\\pi }{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x**4)\ng = x**3\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^{x/y}$, and $h(x,y,z) = \\sin ^{-1}(x-z)$", - "Output Answer": [ - "$3 x^2-\\frac{x e^{x/y}}{y^2}-\\frac{1}{\\sqrt{1-(x-z)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = math.e**(x/y)\nh = asin(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3 x^4+8\\right)$\n", - "Output Answer": [ - "$-\\frac{36 x^2 \\left(x^4-8\\right)}{\\left(3 x^4+8\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x**4+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(z-y^2\\right)^2$\n", - "Output Answer": [ - "$\\left\\{0,-4 y \\left(z-y^2\\right),2 \\left(z-y^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-y**2)**2\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{29 x}{5}+\\frac{2}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1682}{25} \\tan \\left(\\frac{1}{5} (29 x+2)\\right) \\sec ^2\\left(\\frac{1}{5} (29 x+2)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(((29*x)/5)+(2/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x+y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{1-(x+y)^2}+e^y+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x+y)\ng = math.e**y\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (9 x)}{3-7 x}$\n", - "Output Answer": [ - "$\\frac{-7 x+7 x \\log (9 x)+3}{(3-7 x)^2 x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(9*x))/(3-7*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{25}{576 x^2}$ on the interval $x = 0$ to $x = 8$\n", - "Output Answer": [ - "$\\int_0^8 \\sqrt{\\frac{625}{82944 x^6}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (25/(576*x**2))\na = 0\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x-y)^2}$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z},0,-\\frac{2}{(x-y)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((x-y)**2))\nh = (1/((x-y)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-7 x^3-3\\right)^5$\n", - "Output Answer": [ - "$-210 x \\left(7 x^3+3\\right)^3 \\left(49 x^3+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-7*x**3-3)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-2 x} \\cosh (4 x+6)$\n", - "Output Answer": [ - "$\\frac{4 (1-2 x) \\sinh (4 x+6)-\\cosh (4 x+6)}{\\sqrt{1-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-2*x)*cosh(4*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^3$", - "Output Answer": [ - "$25 (x-5)^4+251 (x-5)^3+1265 (x-5)^2+3200 (x-5)+3250$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**3\nseries = f.subs(x, g).series(x, 5, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(\\frac{3}{2}-x\\right)-\\sin \\left(x+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$2 \\sin (2) \\sin \\left(x+\\frac{1}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin((3/2)-x)-sin(x+(5/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^3 z^{15}}{y^3}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin \\left(z^5\\right)$", - "Output Answer": [ - "$\\frac{3 x^2 z^{15}}{y^3}+\\frac{1}{3 \\sqrt[3]{y}^2}+5 z^4 \\cos \\left(z^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**3*z**15)/(y**3))\ng = cbrt(y)\nh = sin(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$4 x-\\tan (4-7 x)+4$\n", - "Output Answer": [ - "$7 \\sec ^2(4-7 x)+4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(4*x-tan(4-7*x)+4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-\\frac{26 x}{3}-\\frac{25}{3}\\right)+\\cosh \\left(4 x+\\frac{1}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{26}{26 x+25}+4 \\sinh \\left(4 x+\\frac{1}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-((26*x)/3)-(25/3))+cosh(4*x+(1/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(4 x^5+3\\right)$\n", - "Output Answer": [ - "$-\\frac{5 x^3 \\left(4 x^{10}-9 x^5-8\\right)}{\\sqrt{2} \\left(-2 x^{10}-3 x^5-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(4*x**5+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y^3}$, $g(x,y,z) = \\sinh \\left(y^3\\right)$, and $h(x,y,z) = \\sin \\left(y^3-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{y^2}{\\sqrt[3]{y^3}^2} & 0 \\\\\n 0 & 3 y^2 \\cosh \\left(y^3\\right) & 0 \\\\\n 0 & 3 y^2 \\cos \\left(y^3-z\\right) & -\\cos \\left(y^3-z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y**3)\ng = sinh(y**3)\nh = sin(y**3-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x^5+y\\right)^5$", - "Output Answer": [ - "$500 x^8 \\left(x^5+y\\right)^3+100 x^3 \\left(x^5+y\\right)^4+20 \\left(x^5+y\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**5+y)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4}{z^4}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 x^4}{z^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(z**4))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = -\\tan (x-z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n -\\sec ^2(x-z) & 0 & \\sec ^2(x-z) \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = -tan(x-z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = x y$, and $h(x,y,z) = e^{x-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n y & x & 0 \\\\\n e^{x-y} & -e^{x-y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+z)\ng = x*y\nh = math.e**(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = (x y-z)^3$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$3 x (x y-z)^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((z/y))\ng = (x*y-z)**3\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\cos ^{-1}(x-y)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n -\\frac{1}{\\sqrt{1-(x-y)^2}} & \\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+y)\ng = acos(x-y)\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{\\left(y-z^2\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{3 z}{\\left(y-z^2\\right)^{5/2}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = math.e**y\nh = (1/((y-z**2)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^2}{x^2}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2 y^2}{x^3} & \\frac{2 y}{x^2} & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**2)/(x**2))\ng = (1/(sqrt(y)))\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(2-3 x^2\\right)-\\log \\left(7 x^5+1\\right)$\n", - "Output Answer": [ - "$-\\frac{35 x^4}{7 x^5+1}-\\frac{6 x}{\\left(2-3 x^2\\right)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(2-3*x**2)-log(7*x**5+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z^5$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,-5 z^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z**5\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^{10}$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**10\ng = log(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cos (x-z)$, and $h(x,y,z) = \\sin ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n 0 & \\frac{1}{\\sqrt{1-(y-z)^2}} & -\\frac{1}{\\sqrt{1-(y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = cos(x-z)\nh = asin(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(3-x^2\\right)+1$\n", - "Output Answer": [ - "$-2 x \\cos \\left(3-x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3-x**2)+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^{12} y^3}{z^3}$\n", - "Output Answer": [ - "$\\left\\{\\frac{12 x^{11} y^3}{z^3},\\frac{3 x^{12} y^2}{z^3},-\\frac{3 x^{12} y^3}{z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**12*y**3)/(z**3))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh (y z)$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\frac{1}{x+z}+z \\sinh (y z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(y*z)\nh = log(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{z^5}{y^{20}}$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{5 z^4}{y^{20}},\\frac{3}{2 x^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = ((z**5)/(y**20))\nh = ((z**5)/(y**20))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x y}{z^4}\\right)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y \\cos \\left(\\frac{x y}{z^4}\\right)}{z^4} & \\frac{x \\cos \\left(\\frac{x y}{z^4}\\right)}{z^4} & -\\frac{4 x y \\cos \\left(\\frac{x y}{z^4}\\right)}{z^5} \\\\\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(((x*y)/(z**4)))\ng = sin(x*y)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-4 x-5) \\cos \\left(8 x^4+9\\right)$\n", - "Output Answer": [ - "$\\frac{4 \\cos \\left(8 x^4+9\\right)}{4 x+5}-32 x^3 \\log (-4 x-5) \\sin \\left(8 x^4+9\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-4*x-5)*cos(8*x**4+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$5 x+\\tan (6 x)+8$\n", - "Output Answer": [ - "$6 \\sec ^2(6 x)+5$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(5*x+tan(6*x)+8, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cos(x)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{11}{2}-5 x}+\\sin \\left(\\frac{11}{2}-\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$-5 e^{\\frac{11}{2}-5 x}-\\frac{15}{2} \\cos \\left(\\frac{1}{2} (11-15 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((11/2)-5*x)+sin((11/2)-((15*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$1-\\sqrt{8-9 x^2}$\n", - "Output Answer": [ - "$\\frac{72}{\\left(8-9 x^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1-sqrt(8-9*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{x z^2}$, and $h(x,y,z) = \\sqrt{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n \\frac{z^2}{2 \\sqrt{x z^2}} & 0 & \\frac{x z}{\\sqrt{x z^2}} \\\\\n 0 & 0 & \\frac{z}{\\sqrt{z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = sqrt(x*z**2)\nh = sqrt(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-\\frac{14 x}{5}-\\frac{39}{5}\\right)+\\sin \\left(\\frac{11}{5}-\\frac{24 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{196}{(14 x+39)^2}-\\frac{576}{25} \\sin \\left(\\frac{1}{5} (11-24 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((14*x)/5)-(39/5))+sin((11/5)-((24*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y^2}$, $g(x,y,z) = \\sqrt[3]{y^2}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$y^2 e^{x y^2}+\\frac{2 y}{3 \\sqrt[3]{y^2}^2}+4 z^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y**2)\ng = cbrt(y**2)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(2-3 x)^2$\n", - "Output Answer": [ - "$18$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (2-3*x)**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3-3 x} \\log \\left(5-3 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{9 \\sqrt{3-3 x} x^2}{3 x^3-5}-\\frac{3 \\log \\left(5-3 x^3\\right)}{2 \\sqrt{3-3 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3-3*x)*log(5-3*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan \\left(x^5\\right)$ on the interval $x = 1$ to $x = 1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(x**5)\na = 1\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n y \\sec ^2(x y) & x \\sec ^2(x y) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = tan(x*y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(4 x+9)$\n", - "Output Answer": [ - "$-\\frac{32 (4 x+9)}{\\left((4 x+9)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(4*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cos (y-z)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\cosh (z)-\\sin (y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = cos(y-z)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-2 x^4}+\\sin (6-4 x)$\n", - "Output Answer": [ - "$-\\frac{4 x^3}{\\sqrt{8-2 x^4}}-4 \\cos (6-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-2*x**4)+sin(6-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{16 x}{\\sqrt{5} \\sqrt{8 x^2-3}}$\n", - "Output Answer": [ - "$\\frac{2 \\sqrt{8 x^2-3}}{\\sqrt{5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((16*x)/(sqrt(5)*sqrt(8*x**2-3)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$-\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}}+4 z^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/x))\ng = y\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(x^3-1\\right)^4+\\sqrt{x-6}$\n", - "Output Answer": [ - "$12 x^2 \\left(x^3-1\\right)^3+\\frac{1}{2 \\sqrt{x-6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((x**3-1)**4+sqrt(x-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & -\\frac{z e^{\\frac{z}{y}}}{y^2} & \\frac{e^{\\frac{z}{y}}}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sin(y)\nh = math.e**(z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,-\\cos (y)\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(x+\\frac{5}{2}\\right)+\\cos \\left(\\frac{5}{2}-5 x\\right)$\n", - "Output Answer": [ - "$\\frac{x+\\frac{5}{2}}{\\left(1-\\left(x+\\frac{5}{2}\\right)^2\\right)^{3/2}}-25 \\cos \\left(\\frac{5}{2}-5 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(x+(5/2))+cos((5/2)-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y+z$, $g(x,y,z) = \\sqrt{x^5 y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{x^5}{2 \\sqrt{x^5 y}}+5 x^4 y+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y+z\ng = sqrt(x**5*y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\log (z-x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n -\\frac{1}{z-x} & 0 & \\frac{1}{z-x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = (1/(y**(3/2)))\nh = log(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-2 x-6)-\\frac{1}{-4 x-5}$\n", - "Output Answer": [ - "$\\frac{1}{x+3}-\\frac{4}{(4 x+5)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-2*x-6)-(1/(-4*x-5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\sinh (x)+\\frac{1}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = y\nh = (z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{1}{\\left(y^5\\right)^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & -\\frac{15 y^4}{2 \\left(y^5\\right)^{5/2}} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = (1/((y**5)**(3/2)))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt[3]{x^5-z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$5 x^4+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = cbrt(x**5-z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{x+3}}{(-4 x-7)^4}$\n", - "Output Answer": [ - "$\\frac{e^{x+3} (4 x-9)}{(4 x+7)^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(x+3))/((-4*x-7)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y-z$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y & x & -1 \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y-z\ng = tan(y*z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$32 x^3$\n", - "Output Answer": [ - "$8 x^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 32*x**3\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-5} \\left(8 x-\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$32 e^{-8 x-5} (16 x-11)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-5)*(8*x-(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{x \\cos (6)}{4 \\left(x^2-1\\right)^2}$\n", - "Output Answer": [ - "$-\\frac{\\cos (6)}{8 \\left(x^2-1\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((x*cos(6))/(4*(x**2-1)**2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^5}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{5 y^4}{2 \\sqrt{y^5}} & 0 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y**5)\nh = (z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3-2 x) \\left(-\\tan ^{-1}(7 x)\\right)$\n", - "Output Answer": [ - "$-\\frac{7 \\cos (3-2 x)}{49 x^2+1}-2 \\sin (3-2 x) \\tan ^{-1}(7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3-2*x)*(-atan(7*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\frac{y^2}{x^2}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+z\nh = ((y**2)/(x**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$x^3+\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**3\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y+z}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y+z}} & \\frac{x}{2 \\sqrt{x y+z}} & \\frac{1}{2 \\sqrt{x y+z}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y+z)\ng = cos(z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (1-8 x)}{\\sqrt{2 x^2+8}}$\n", - "Output Answer": [ - "$\\frac{-8 \\left(x^2+4\\right) \\cos (1-8 x)-x \\sin (1-8 x)}{\\sqrt{2} \\left(x^2+4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(1-8*x))/(sqrt(2*x**2+8))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\frac{1}{\\left(x y^3+z\\right)^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n -\\frac{3 y^3}{2 \\left(x y^3+z\\right)^{5/2}} & -\\frac{9 x y^2}{2 \\left(x y^3+z\\right)^{5/2}} & -\\frac{3}{2 \\left(x y^3+z\\right)^{5/2}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+z)\ng = (1/((x*y**3+z)**(3/2)))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6-7 x)-\\cosh (9-9 x)$\n", - "Output Answer": [ - "$7 \\sin (6-7 x)+9 \\sinh (9-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6-7*x)-cosh(9-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6-6 x)-\\tan ^{-1}(8 x+6)$\n", - "Output Answer": [ - "$6 \\sin (6-6 x)-\\frac{8}{(8 x+6)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6-6*x)-atan(8*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(z)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(x^4\\right)$", - "Output Answer": [ - "$12 x^2 \\sinh \\left(x^4\\right)+16 x^6 \\cosh \\left(x^4\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x**4)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (4 x+6)-\\log \\left(5 x^2+1\\right)$\n", - "Output Answer": [ - "$2 \\left(\\frac{50 x^2}{\\left(5 x^2+1\\right)^2}-\\frac{5}{5 x^2+1}-\\frac{2}{(2 x+3)^2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x+6)-log(5*x**2+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(y)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = tan(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 1 & -1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = y\nh = x-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{1}{(y z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x-z}^2}-\\frac{1}{2 y^{3/2}}-\\frac{3 y}{2 (y z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-z)\ng = (1/(sqrt(y)))\nh = (1/((y*z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(y-z)^{3/2}}$", - "Output Answer": [ - "$\\cos (x)+\\frac{3}{2 (y-z)^{5/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y\nh = (1/((y-z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x-\\frac{18}{5}}+\\sin \\left(\\frac{26}{5}-\\frac{23 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{9}{\\left(6 x-\\frac{18}{5}\\right)^{3/2}}-\\frac{529}{25} \\sin \\left(\\frac{1}{5} (26-23 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x-(18/5))+sin((26/5)-((23*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x+y+z^4\\right)$", - "Output Answer": [ - "$-\\frac{16 z^6}{\\left(x+y+z^4\\right)^2}+\\frac{12 z^2}{x+y+z^4}-\\frac{2}{\\left(x+y+z^4\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y+z**4)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y**2)\nh = cos(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\frac{1}{y}-\\frac{z e^{\\frac{z}{x}}}{x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z/x)\ng = log(x*y)\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x+y^4}$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y^4}^2} & \\frac{4 y^3}{3 \\sqrt[3]{x+y^4}^2} & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = cbrt(x+y**4)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(4 x+\\frac{17}{2}\\right)^3}$\n", - "Output Answer": [ - "$\\frac{6144}{(8 x+17)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((4*x+(17/2))**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{x}{y^2 \\left(\\frac{x^2}{y^2}+1\\right)}+\\frac{1}{2 \\sqrt{x}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(x/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y+z}$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y+z)\ng = (x/z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4}{z^8}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\frac{1}{x^2 y^2}$", - "Output Answer": [ - "$\\frac{4 x^3}{z^8}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(z**8))\ng = cos(x)\nh = (1/(x**2*y**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{x^2}{4}$ on the interval $x = 4$ to $x = 11$\n", - "Output Answer": [ - "$\\frac{47 \\sqrt{5}}{4}-\\sinh ^{-1}(2)+\\sinh ^{-1}\\left(\\frac{11}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((x**2)/4)\na = 4\nb = 11\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,-\\frac{\\sec ^2\\left(\\frac{y}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/x))\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{9}{2}-\\frac{11 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{121}{(9-11 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log((9/2)-((11*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{7 x+8}$\n", - "Output Answer": [ - "$\\frac{98}{(7 x+8)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(7*x+8))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z^2}{y}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((z**2)/y))\ng = tan(y)\nh = y-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = y\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-8 x^3 \\cos \\left(2 x^4+1\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(2 x^4+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -8*x**3*cos(2*x**4+1)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = (1/y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x-y)$, $g(x,y,z) = \\frac{1}{(y+z)^2}$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$\\left\\{\\frac{2}{(y+z)^3},-z \\sec ^2(x z),\\text{sech}^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x-y)\ng = (1/((y+z)**2))\nh = (1/((y+z)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{(x-y)^{3/2}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3}{2 (x-y)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/((x-y)**(3/2)))\nh = (1/((x-y)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^3$, $g(x,y,z) = z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$3 (x-y)^2+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**3\ng = z\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = (x y)^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{3}{2} x \\sqrt{x y}-\\sin (x)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (x*y)**(3/2)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = \\frac{x^{20}}{z^4}$, and $h(x,y,z) = \\sqrt[3]{y-x^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n \\frac{20 x^{19}}{z^4} & 0 & -\\frac{4 x^{20}}{z^5} \\\\\n -\\frac{5 x^4}{3 \\sqrt[3]{y-x^5}^2} & \\frac{1}{3 \\sqrt[3]{y-x^5}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**5)\ng = ((x**20)/(z**4))\nh = cbrt(y-x**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z^2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(z**2))\ng = log(y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y}+3 e^{z^3} z^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y)\nh = math.e**(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(x^3+4\\right) (-\\cos (8-6 x))$\n", - "Output Answer": [ - "$-3 \\left(2 \\sin (8-6 x) \\sin \\left(x^3+4\\right)+x^2 \\cos (8-6 x) \\cos \\left(x^3+4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(x**3+4)*(-cos(8-6*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cosh \\left(3-4 x^4\\right)$\n", - "Output Answer": [ - "$256 x^6 \\cosh \\left(3-4 x^4\\right)-48 x^2 \\sinh \\left(3-4 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cosh(3-4*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x}{y^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-5 x-1)^4$\n", - "Output Answer": [ - "$300 (5 x+1)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-5*x-1)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x y)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{x^2 y^2+1} & \\frac{x}{x^2 y^2+1} & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x*y)\ng = cosh(y)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{6 x^3}{\\sqrt{3 x^4+6}}$\n", - "Output Answer": [ - "$\\sqrt{3 x^4+6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((6*x**3)/(sqrt(3*x**4+6)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tanh ^{-1}(y-z)$, $g(x,y,z) = \\log \\left(x^3+z\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x^3+z},\\frac{1}{1-(y-z)^2},\\frac{3 x^2}{x^3+z}+\\frac{1}{1-(y-z)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atanh(y-z)\ng = log(x**3+z)\nh = log(x**3+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{\\sin (8-7 x)}{\\sqrt{7 x-8}}$\n", - "Output Answer": [ - "$\\frac{49 \\left(\\left(-196 x^2+448 x-253\\right) \\sin (8-7 x)+4 (7 x-8) \\cos (8-7 x)\\right)}{4 (7 x-8)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((sin(8-7*x))/(sqrt(7*x-8)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^3 z^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 y^2 z^3 & 3 y^3 z^2 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{2}{(y+z)^3} & -\\frac{2}{(y+z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**3*z**3\ng = y\nh = (1/((y+z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\sinh \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & 4 z^3 \\cosh \\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = asin(x)\nh = sinh(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y z$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{-y,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin ^{-1}(x+z)$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\cos (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asin(x+z)\nh = (1/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^3-z$", - "Output Answer": [ - "$6 x$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3-z\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^{x y-z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n y e^{x y-z} & x e^{x y-z} & -e^{x y-z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**(x*y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\sec ^2(y)-\\frac{1}{2 (x+y)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x+y)))\ng = tan(y)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\sqrt{\\frac{5}{2}} \\sqrt{-x}$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{5}}{128}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt((5/2))*sqrt(-x))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x-z^5\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{y^4}{z^{20}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin \\left(x-z^5\\right) & 0 & 5 z^4 \\sin \\left(x-z^5\\right) \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{4 y^3}{z^{20}} & -\\frac{20 y^4}{z^{21}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-z**5)\ng = tan(y)\nh = ((y**4)/(z**20))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$(x+4) (1-8 \\sin (16))+(x+4)^2 (\\sin (16)+32 \\cos (16))-4-\\cos (16)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = cos(x**2)\nseries = f.subs(x, g).series(x, -4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{x}{y}-z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{x}{y^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (x/y)-z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x}}$, and $h(x,y,z) = -\\tanh ^{-1}(x-z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{1}{1-(x-z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = (1/(sqrt(x)))\nh = -atanh(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 \\sqrt{y z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x+y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{(x+z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-(x+y)^2}} & -\\frac{1}{\\sqrt{1-(x+y)^2}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{2}{(x+z)^3} & 0 & -\\frac{2}{(x+z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x+y)\ng = cbrt(y)\nh = (1/((x+z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-x)$ on the interval $x = 3$ to $x = 11$\n", - "Output Answer": [ - "$-\\sqrt{10}+\\sqrt{122}+\\tanh ^{-1}\\left(\\sqrt{10}\\right)-\\tanh ^{-1}\\left(\\sqrt{122}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-x)\na = 3\nb = 11\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (2-8 x)-\\frac{1}{\\left(6-6 x^3\\right)^2}$\n", - "Output Answer": [ - "$-\\frac{3 x^4}{2 \\left(x^3-1\\right)^4}+\\frac{x}{3 \\left(x^3-1\\right)^3}-\\frac{16}{(1-4 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2-8*x)-(1/((6-6*x**3)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, -4, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos \\left(x^5\\right)$ on the interval $x = 1$ to $x = 1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(x**5)\na = 1\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-3 x-7)^4$\n", - "Output Answer": [ - "$108 (3 x+7)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-3*x-7)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = (z (x+y))^{3/2}$, and $h(x,y,z) = \\log (y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y+z}-\\frac{3}{2} (x+y) \\sqrt{z (x+y)},0,\\frac{3}{2} z \\sqrt{z (x+y)}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (z*(x+y))**(3/2)\nh = (z*(x+y))**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$4 y^3+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = y**4\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(7 x-8)^3}$\n", - "Output Answer": [ - "$\\frac{588}{(7 x-8)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x-8)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = sqrt(x)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{81 x^4}{16}$ on the interval $x = 0$ to $x = 2$\n", - "Output Answer": [ - "$2 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{6};\\frac{7}{6};-26244\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((81*x**4)/16)\na = 0\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{y \\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}} & \\frac{x}{y^2 \\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}} \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos((x/y)-z)\ng = (1/(y**(3/2)))\nh = (z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-7 x^4-5}-\\tan (6 x+7)$\n", - "Output Answer": [ - "$e^{-7 x^4-5} \\left(784 x^6-84 x^2-72 e^{7 x^4+5} \\tan (6 x+7) \\sec ^2(6 x+7)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-7*x**4-5)-tan(6*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(\\frac{14 x}{3}\\right)$ on the interval $x = 1$ to $x = 10$\n", - "Output Answer": [ - "$-\\sqrt{2}+\\sqrt{101}+\\tanh ^{-1}\\left(\\sqrt{2}\\right)-\\tanh ^{-1}\\left(\\sqrt{101}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((14*x)/3))\na = 1\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x^2-5}+\\tan (3 x)$\n", - "Output Answer": [ - "$18 \\tan (3 x) \\sec ^2(3 x)-\\frac{15}{\\left(3 x^2-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x**2-5)+tan(3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, $g(x,y,z) = \\sqrt[3]{\\frac{y^4}{x}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 x \\sqrt[3]{\\frac{z}{x}}^2},-\\frac{y^4}{3 x^2 \\sqrt[3]{\\frac{y^4}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z/x)\ng = cbrt((y**4)/x)\nh = cbrt((y**4)/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{\\sqrt{y^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asinh(y)\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sin \\left(x^2\\right)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = sin(x**2)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2} \\sqrt{3-5 x}$\n", - "Output Answer": [ - "$-\\frac{25}{2 \\sqrt{2} (3-5 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2)*sqrt(3-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{20} z^{16}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 20 x^{19} z^{16} & 0 & 16 x^{20} z^{15} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**20*z**16\ng = cos(y)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos \\left(x+z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,\\sin \\left(x+z^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^5$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**5\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-4 x} \\sin ^{-1}\\left(6 x^2+4\\right)$\n", - "Output Answer": [ - "$\\frac{12 e^{8-4 x} x}{\\sqrt{1-4 \\left(3 x^2+2\\right)^2}}-4 e^{8-4 x} \\sin ^{-1}\\left(6 x^2+4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-4*x)*asin(6*x**2+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{x^2 z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\sinh (x-z)$", - "Output Answer": [ - "$\\left\\{0,-\\cosh (x-z),\\frac{y}{3 \\sqrt[3]{x y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(x*y)\nh = cbrt(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(8-3 x)+\\tan (\\sin (2-2 x))$\n", - "Output Answer": [ - "$\\frac{\\sqrt{3} (3 x-8)}{\\left(-3 x^2+16 x-21\\right)^{3/2}}-4 \\sec ^2(\\sin (2-2 x)) \\left(\\sin (2-2 x)-2 \\cos ^2(2-2 x) \\tan (\\sin (2-2 x))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(8-3*x)+tan(sin(2-2*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^4$, $g(x,y,z) = \\log \\left(x+z^4\\right)$, and $h(x,y,z) = \\sin ^{-1}\\left(y z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 4 z^3 \\\\\n \\frac{1}{x+z^4} & 0 & \\frac{4 z^3}{x+z^4} \\\\\n 0 & \\frac{z^4}{\\sqrt{1-y^2 z^8}} & \\frac{4 y z^3}{\\sqrt{1-y^2 z^8}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**4\ng = log(x+z**4)\nh = asin(y*z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6-9 x}-\\cos (8-4 x)$\n", - "Output Answer": [ - "$16 \\cos (8-4 x)-\\frac{81}{4 (6-9 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6-9*x)-cos(8-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{(3 x+4)^4}-\\sin (2-8 x)$\n", - "Output Answer": [ - "$\\frac{12}{(3 x+4)^5}+8 \\cos (2-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/((3*x+4)**4))-sin(2-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = (x+y+z)^4$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$4 (x+y+z)^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = (x+y+z)**4\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\frac{1}{\\sqrt{x}}$, and $h(x,y,z) = x^2 z^2$", - "Output Answer": [ - "$\\left\\{0,x-2 x z^2,-\\frac{1}{2 x^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = (1/(sqrt(x)))\nh = (1/(sqrt(x)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}}$, $g(x,y,z) = \\frac{1}{(x-y)^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n -\\frac{2}{(x-y)^3} & \\frac{2}{(x-y)^3} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y))\ng = (1/((x-y)**2))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\cos (y-z)$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$1-\\sin (y-z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = cos(y-z)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (8-4 x)$\n", - "Output Answer": [ - "$32 \\tan (8-4 x) \\sec ^2(8-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**2\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(-6 x-\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{432 (4 x+1)}{\\left(-144 x^2-72 x-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-6*x-(3/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left\\{0,-e^x,-\\frac{1}{3 \\sqrt[3]{y}^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = e^{x^4}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+2) \\left(-32 e^{16}-\\sin (2)\\right)+(x+2)^2 \\left(536 e^{16}+\\frac{\\cos (2)}{2}\\right)+e^{16}-\\cos (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**4)\ng = cos(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 (x+y)^2 & 3 (x+y)^2 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+y)**3\ng = (1/(y**2))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z^2$, $g(x,y,z) = \\frac{1}{\\left(x-z^2\\right)^{3/2}}$, and $h(x,y,z) = \\log \\left(y z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 2 z \\\\\n -\\frac{3}{2 \\left(x-z^2\\right)^{5/2}} & 0 & \\frac{3 z}{\\left(x-z^2\\right)^{5/2}} \\\\\n 0 & \\frac{1}{y} & \\frac{2}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z**2\ng = (1/((x-z**2)**(3/2)))\nh = log(y*z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y z)$, $g(x,y,z) = \\cosh (x-y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n \\sinh (x-y) & -\\sinh (x-y) & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y*z)\ng = cosh(x-y)\nh = (1/(sqrt(y)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$e^x+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y)\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = y^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\sec ^2(x+y)+4 y^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = y**4\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = \\log \\left(x^5-y\\right)$, and $h(x,y,z) = \\cos \\left(x^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n \\frac{5 x^4}{x^5-y} & -\\frac{1}{x^5-y} & 0 \\\\\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**5)\ng = log(x**5-y)\nh = cos(x**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x+z^5\\right)^3$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\cos ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$3 \\left(x+z^5\\right)^2+\\frac{1}{x}-\\frac{5 z^4}{\\sqrt{1-z^{10}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z**5)**3\ng = (y/x)\nh = acos(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{20}$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = \\left(y^4+z\\right)^4$", - "Output Answer": [ - "$\\left\\{16 y^3 \\left(y^4+z\\right)^3,0,-20 y^{19}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**20\ng = sin(y**4)\nh = sin(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{\\frac{x^4+y}{z^3}}$", - "Output Answer": [ - "$-\\frac{32 x^6}{9 z^3 \\left(x^4+y\\right) \\sqrt[3]{\\frac{x^4+y}{z^3}}^2}+\\frac{4 x^2}{z^3 \\sqrt[3]{\\frac{x^4+y}{z^3}}^2}-\\frac{2}{9 z^3 \\left(x^4+y\\right) \\sqrt[3]{\\frac{x^4+y}{z^3}}^2}+\\frac{2 \\left(x^4+y\\right)}{z^5 \\sqrt[3]{\\frac{x^4+y}{z^3}}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt((x**4+y)/(z**3))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}-z\\right)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3 x}{2 y^2 \\left(\\frac{x}{y}-z\\right)^{5/2}}+e^x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(((x/y)-z)**(3/2)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin (x-y)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n \\cos (x-y) & -\\cos (x-y) & 0 \\\\\n 0 & z & y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sin(x-y)\nh = y*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin ^{-1}\\left(x-y+z^2\\right)$", - "Output Answer": [ - "$\\frac{2 z}{\\sqrt{1-\\left(x-y+z^2\\right)^2}}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/y)\ng = tan(y)\nh = asin(x-y+z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{x+y}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3-4 x) \\cos \\left(x^3+1\\right)$\n", - "Output Answer": [ - "$\\frac{4 \\cos \\left(x^3+1\\right)}{4 x-3}-3 x^2 \\log (3-4 x) \\sin \\left(x^3+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3-4*x)*cos(x**3+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sinh ^{-1}(x-y)$, and $h(x,y,z) = \\cos (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n \\frac{1}{\\sqrt{(x-y)^2+1}} & -\\frac{1}{\\sqrt{(x-y)^2+1}} & 0 \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = asinh(x-y)\nh = cos(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(1-x^2\\right)-\\tan (1-2 x)$\n", - "Output Answer": [ - "$2 \\left(x \\sin \\left(1-x^2\\right)+\\sec ^2(1-2 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(1-x**2)-tan(1-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{2}{y^3}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = (1/(y**2))\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{x-z^3}$", - "Output Answer": [ - "$9 z^4 e^{x-z^3}-6 z e^{x-z^3}+e^{x-z^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x-y)$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x+y}}+\\sec ^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x-y)\ng = sqrt(x+y)\nh = sqrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y}+\\cos (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = sin(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-x}}$", - "Output Answer": [ - "$-\\frac{1}{2 (z-x)^{3/2}}-\\frac{2}{y^3}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(y**2))\nh = (1/(sqrt(z-x)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((x+y)**(3/2)))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{\\left(y+z^2\\right)^{3/2}}$", - "Output Answer": [ - "$\\cos (x)-\\frac{3 z}{\\left(y+z^2\\right)^{5/2}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**y\nh = (1/((y+z**2)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-x)^2$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$-2 (y-x)+\\cos (y)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**2\ng = sin(y)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh (x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,\\sinh (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(x+y)\nh = cosh(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{9 x}{2}-\\frac{1}{2}}+\\log \\left(\\frac{17 x}{2}+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{17}{17 x+7}+\\frac{9}{2 \\sqrt{18 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((9*x)/2)-(1/2))+log(((17*x)/2)+(7/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = cos(z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (8 x-5)-\\cos (5)$\n", - "Output Answer": [ - "$\\frac{8}{8 x-5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8*x-5)-cos(5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^2}}$, $g(x,y,z) = \\sin ^{-1}\\left(x^2 y z\\right)$, and $h(x,y,z) = \\cos \\left(x^2 y\\right)$", - "Output Answer": [ - "$\\left\\{x^2 \\left(-\\sin \\left(x^2 y\\right)\\right)-\\frac{x^2 y}{\\sqrt{1-x^4 y^2 z^2}},2 x y \\sin \\left(x^2 y\\right),\\frac{2 x y z}{\\sqrt{1-x^4 y^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**2)))\ng = asin(x**2*y*z)\nh = asin(x**2*y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n 0 & 2 y & 0 \\\\\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*z)\ng = y**2\nh = sqrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{1-8 x^2}+2$\n", - "Output Answer": [ - "$16 e^{1-8 x^2} \\left(16 x^2-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(1-8*x**2)+2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (2 x)$ on the interval $x = 1$ to $x = 8$\n", - "Output Answer": [ - "$-\\sqrt{2}+\\sqrt{65}+\\tanh ^{-1}\\left(\\sqrt{2}\\right)-\\tanh ^{-1}\\left(\\sqrt{65}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x)\na = 1\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6-x} \\sin (8-x)$\n", - "Output Answer": [ - "$-e^{6-x} (\\sin (8-x)+\\cos (8-x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6-x)*sin(8-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-3 x^3\\right) \\cos (5 x+6)$\n", - "Output Answer": [ - "$\\frac{3 \\cos (5 x+6)}{x}-5 \\log \\left(-3 x^3\\right) \\sin (5 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-3*x**3)*cos(5*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-20 x^3 \\sin \\left(5 x^4+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$\\cos \\left(5 x^4+\\frac{5}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -20*x**3*sin(5*x**4+(5/2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (7 x+3)+\\frac{1}{4096}$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(7*x+3)+(1/4096)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z^5}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & 0 & \\frac{5}{z} \\\\\n 0 & 1 & 0 \\\\\n 3 x^2 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(((z**5)/x))\ng = y\nh = x**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$7 x+\\frac{29}{4}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 7*x+(29/4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^4}{y z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{4 x^3}{y z},-\\frac{x^4}{y^2 z},-\\frac{x^4}{y z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(y*z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sin(y)\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sqrt[3]{x^5}$", - "Output Answer": [ - "$77\\ 3^{2/3} (x+3)^2-126\\ 3^{2/3} (x+3)+81\\ 3^{2/3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = cbrt(x**5)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x+2} \\cos \\left(e^{9-5 x}\\right)$\n", - "Output Answer": [ - "$5 e^{11-2 x} \\sin \\left(e^{9-5 x}\\right)+3 e^{3 x+2} \\cos \\left(e^{9-5 x}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x+2)*cos(math.e**(9-5*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, $g(x,y,z) = \\cosh ^{-1}(z)$, and $h(x,y,z) = \\cosh (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}},-\\sinh (x),\\frac{1}{2 (x+y)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x+y)))\ng = acosh(z)\nh = acosh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{26 x}{3}+\\frac{13}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{676}{9} \\sin \\left(\\frac{13}{3} (2 x+1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(((26*x)/3)+(13/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$-\\sin (x+y)+\\frac{1}{x+z}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+z)\ng = cos(x+y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = z^2$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y+z)\ng = z**2\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{x}{2}+\\cos ^{-1}\\left(4-\\frac{15 x}{2}\\right)+5$\n", - "Output Answer": [ - "$\\frac{\\sqrt{15} (15 x-8)}{\\left(-15 x^2+16 x-4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (x/2)+acos(4-((15*x)/2))+5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tan (y+z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = tan(y+z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-4 x^4-2\\right)$\n", - "Output Answer": [ - "$\\frac{8 x^2 \\left(3-2 x^4\\right)}{\\left(2 x^4+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x**4-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x-3}-e^{6-x}$\n", - "Output Answer": [ - "$-e^{6-x}-\\frac{9}{(6 x-3)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(6*x-3)-math.e**(6-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\tanh (x y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n y \\text{sech}^2(x y) & x \\text{sech}^2(x y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = tanh(x*y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y+z)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,\\cos (y+z),-\\cos (y+z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y+z)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{9 x}{2}-\\frac{17}{2}}+\\frac{1}{\\left(\\frac{3}{2}-\\frac{17 x}{2}\\right)^4}$\n", - "Output Answer": [ - "$\\frac{9}{2} e^{\\frac{9 x}{2}-\\frac{17}{2}}-\\frac{1088}{(17 x-3)^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((9*x)/2)-(17/2))+(1/(((3/2)-((17*x)/2))**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sqrt{-5 x-6} \\tan (5 x)$\n", - "Output Answer": [ - "$-\\frac{25 \\sec ^2(5 x) \\left(\\left(800 x^2+1920 x+1151\\right) \\tan (5 x)+80 x-\\sin (15 x) \\sec (5 x)+96\\right)}{16 (-5 x-6)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sqrt(-5*x-6)*tan(5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = x y^4$, and $h(x,y,z) = y^4-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n y^4 & 4 x y^3 & 0 \\\\\n -1 & 4 y^3 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = x*y**4\nh = y**4-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^4\\right)$, $g(x,y,z) = \\cos \\left(\\frac{y}{x^4}\\right)$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\left\\{-z \\sin (y z),0,\\frac{4 y \\sin \\left(\\frac{y}{x^4}\\right)}{x^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**4)\ng = cos((y/(x**4)))\nh = cos((y/(x**4)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{12}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**12\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-2 x \\sin \\left(x^2\\right)-\\sin (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**2)\ng = y\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{17 x}{2}-1\\right)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{17} (2-17 x)}{(-x (17 x-4))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(((17*x)/2)-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-9 x^3-3\\right)^2-\\sin (7 x+7)$\n", - "Output Answer": [ - "$162 \\left(3 x^5+x^2\\right)-7 \\cos (7 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-9*x**3-3)**2-sin(7*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = \\tan (x-y)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$-\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}}-\\sec ^2(x-y)+\\frac{\\cos \\left(\\frac{z}{y}\\right)}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/x))\ng = tan(x-y)\nh = sin((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(2 x-8)^5 \\left(9 x^2+5\\right)^5$\n", - "Output Answer": [ - "$160 (x-4)^4 \\left(9 x^2+5\\right)^4 \\left(27 x^2-72 x+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2*x-8)**5*(9*x**2+5)**5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(x^2+8\\right)$\n", - "Output Answer": [ - "$2 \\left(4 x^2 \\tan \\left(x^2+8\\right)+1\\right) \\sec ^2\\left(x^2+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(x**2+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x-7)+\\log (4 x+8)$\n", - "Output Answer": [ - "$\\frac{8 x+1}{(x+2) (4 x-7)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x-7)+log(4*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-x-3)^4+\\sqrt{7 x-6}$\n", - "Output Answer": [ - "$4 (x+3)^3+\\frac{7}{2 \\sqrt{7 x-6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-x-3)**4+sqrt(7*x-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{3 \\sqrt[3]{y}^2}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cbrt(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x-1)^2+3 (x-1)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = x**2\nseries = f.subs(x, g).series(x, 1, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^{x+y}$, and $h(x,y,z) = (x-y-z)^3$", - "Output Answer": [ - "$-3 (x-y-z)^2+e^{x+y}+2 x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = math.e**(x+y)\nh = (x-y-z)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos \\left(\\frac{z^4}{x^2}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2 z^4 \\sin \\left(\\frac{z^4}{x^2}\\right)}{x^3},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^4\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-1)^2 \\left(-\\frac{11 \\sin (1)}{2}-8 \\cos (1)\\right)+(x-1) (-4 \\sin (1)-\\cos (1))-\\sin (1)+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**4)\ng = sin(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^4}{z^4}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$4 z^3-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**4)/(z**4))\ng = acos(y)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cosh (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-3) (\\sec (3) \\sinh (3)+\\tan (3) \\sec (3) \\cosh (3))+\\sec (3) \\cosh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cosh(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\tan ^{-1}(x z)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = atan(x*z)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z^4}$, $g(x,y,z) = \\frac{y^3}{x^3}$, and $h(x,y,z) = \\tan ^{-1}\\left(x-z^4\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{4 z^3}{3 \\sqrt[3]{x+z^4}^2}-\\frac{1}{\\left(x-z^4\\right)^2+1},-\\frac{3 y^3}{x^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z**4)\ng = ((y**3)/(x**3))\nh = ((y**3)/(x**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{1}{x y^2}-y \\sin (x y)+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = (1/(x*y))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = e^{x^4}$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{37}{3} e (x-1)^3+\\frac{7}{2} e (x-1)^2+e (x-1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**4)\ng = log(x)\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y-x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & 0 & -\\sin (z) \\\\\n \\frac{1}{2 (y-x)^{3/2}} & -\\frac{1}{2 (y-x)^{3/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = cos(z)\nh = (1/(sqrt(y-x)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(z-y)$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(z-y)^2}},-\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = acos(z-y)\nh = acos(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4}$, $g(x,y,z) = \\sqrt{x^4+z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{x^4+z}},0,\\frac{2 x^3}{\\sqrt{x^4+z}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4)\ng = sqrt(x**4+z)\nh = sqrt(x**4+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos ^{-1}(-5 x)$ on the interval $x = 5$ to $x = 5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-5*x)\na = 5\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x}{\\sqrt{1-x^2 y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\left(\\frac{z}{x}\\right)^{3/2}$, and $h(x,y,z) = \\sqrt[3]{\\frac{x y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{3 z \\sqrt[3]{\\frac{x y}{z}}^2}-\\frac{3 \\sqrt{\\frac{z}{x}}}{2 x},x-\\frac{y}{3 z \\sqrt[3]{\\frac{x y}{z}}^2},-\\frac{3 z \\sqrt{\\frac{z}{x}}}{2 x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = (z/x)**(3/2)\nh = (z/x)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{x y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = (1/(x*y))\nh = sin((y/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^3}{y}+z$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x^3}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 x^2}{y} & -\\frac{x^3}{y^2} & 1 \\\\\n -\\frac{3 y}{x^4 \\left(\\frac{y^2}{x^6}+1\\right)} & \\frac{1}{x^3 \\left(\\frac{y^2}{x^6}+1\\right)} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**3)/y)+z\ng = atan(y/(x**3))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4}$, $g(x,y,z) = \\sin \\left(x^4+y\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,4 x^3 \\cos \\left(x^4+y\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4)\ng = sin(x**4+y)\nh = sin(x**4+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{x}{3}+6\\right)-\\cos \\left(\\frac{17 x}{3}+\\frac{5}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{9} \\left(289 \\cos \\left(\\frac{1}{3} (17 x+5)\\right)-\\cos \\left(\\frac{x}{3}+6\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((x/3)+6)-cos(((17*x)/3)+(5/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x^5$", - "Output Answer": [ - "$-\\frac{1}{8} (x+2)^2+\\frac{1}{4} (-x-2)-\\frac{1}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x**5\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-8 x^3-6}-\\tan (9-x)$\n", - "Output Answer": [ - "$\\sec ^2(9-x)-\\frac{12 x^2}{\\sqrt{-8 x^3-6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-8*x**3-6)-tan(9-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-3 x-5} \\tan (2-4 x)$\n", - "Output Answer": [ - "$e^{-3 x-5} \\left(9 \\tan (2-4 x)+8 (4 \\tan (2-4 x)+3) \\sec ^2(2-4 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-3*x-5)*tan(2-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cosh ^{-1}\\left(y+z^5\\right)$, and $h(x,y,z) = \\tanh (x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y+z^5-1} \\sqrt{y+z^5+1}} & \\frac{5 z^4}{\\sqrt{y+z^5-1} \\sqrt{y+z^5+1}} \\\\\n \\text{sech}^2(x-y) & -\\text{sech}^2(x-y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = acosh(y+z**5)\nh = tanh(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$1-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{\\sqrt{1-y^2}}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = asin(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x-2}+\\log (-8 x-7)$\n", - "Output Answer": [ - "$25 e^{5 x-2}-\\frac{64}{(8 x+7)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x-2)+log(-8*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = acos(y)\nh = log(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{y^4}{z}$", - "Output Answer": [ - "$\\frac{2 y^4}{z^3}+\\frac{12 y^2}{z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**4)/z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = z$, and $h(x,y,z) = (x+y)^4$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = z\nh = (x+y)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^x$ on the interval $x = 5$ to $x = 10$\n", - "Output Answer": [ - "$-\\sqrt{1+e^{10}}+\\sqrt{1+e^{20}}+\\tanh ^{-1}\\left(\\sqrt{1+e^{10}}\\right)-\\tanh ^{-1}\\left(\\sqrt{1+e^{20}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**x\na = 5\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2-8 x}-\\left(5 x^4-4\\right)^3$\n", - "Output Answer": [ - "$-60 \\left(4-5 x^4\\right)^2 x^3-\\frac{4}{\\sqrt{2-8 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2-8*x)-(5*x**4-4)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x**(3/2)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y},0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-7 x-6)^4}$\n", - "Output Answer": [ - "$\\frac{980}{(7 x+6)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-7*x-6)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6 x-3}-\\tan \\left(4 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{3}{\\sqrt{6 x-3}}-20 x^4 \\sec ^2\\left(4 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6*x-3)-tan(4*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\frac{1}{y}+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = log(y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = atan(x)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x^2+8}-\\sin (2 x+5)$\n", - "Output Answer": [ - "$4 e^{2 x^2+8} x-2 \\cos (2 x+5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x**2+8)-sin(2*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(8 x-3)^2$\n", - "Output Answer": [ - "$128$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (8*x-3)**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\cosh (x-z)$", - "Output Answer": [ - "$\\{0,-\\sinh (x-z),y \\cos (x y)-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\tan \\left(3 x^5\\right)-64 x^3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(tan(3*x**5)-64*x**3)\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = sin(x**3)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x-y^4\\right)^5$\n", - "Output Answer": [ - "$\\left\\{5 \\left(x-y^4\\right)^4,-20 y^3 \\left(x-y^4\\right)^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y**4)**5\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5} \\sqrt{x}+\\log (x-2)$\n", - "Output Answer": [ - "$\\frac{1}{x-2}+\\frac{\\sqrt{5}}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5)*sqrt(x)+log(x-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\tan \\left(x^5 y-z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 5 x^4 y \\sec ^2\\left(x^5 y-z\\right) & x^5 \\sec ^2\\left(x^5 y-z\\right) & -\\sec ^2\\left(x^5 y-z\\right) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y+z)\ng = tan(x**5*y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y^4}+z^5\\right)$", - "Output Answer": [ - "$-\\frac{16 x^2 \\sin \\left(\\frac{x}{y^4}+z^5\\right)}{y^{10}}-25 z^8 \\sin \\left(\\frac{x}{y^4}+z^5\\right)-\\frac{\\sin \\left(\\frac{x}{y^4}+z^5\\right)}{y^8}+20 z^3 \\cos \\left(\\frac{x}{y^4}+z^5\\right)+\\frac{20 x \\cos \\left(\\frac{x}{y^4}+z^5\\right)}{y^6}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/(y**4))+z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5 z$, $g(x,y,z) = \\log \\left(x y^5-z\\right)$, and $h(x,y,z) = e^{y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 z & y^5 \\\\\n \\frac{y^5}{x y^5-z} & \\frac{5 x y^4}{x y^5-z} & -\\frac{1}{x y^5-z} \\\\\n 0 & 5 e^{y^5} y^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5*z\ng = log(x*y**5-z)\nh = math.e**(y**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}+y e^{y z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = asin(y)\nh = math.e**(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(z)$, $g(x,y,z) = \\sin ^{-1}(x-y)$, and $h(x,y,z) = \\cos ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n -\\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & -\\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(z)\ng = asin(x-y)\nh = acos(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^{\\frac{x+y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{x+y}{z}}}{z},\\frac{1}{\\sqrt{1-z^2}}-\\frac{e^{\\frac{x+y}{z}}}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-8 x-7)^4+\\sin (8 x)$\n", - "Output Answer": [ - "$8 \\left(4 (8 x+7)^3+\\cos (8 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-8*x-7)**4+sin(8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -x$ on the interval $x = 5$ to $x = 6$\n", - "Output Answer": [ - "$\\sqrt{2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -x\na = 5\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$-\\frac{z}{x^2}+\\frac{1}{2 \\sqrt{y}}+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = sqrt(y)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{1}{2}-\\frac{7 x}{2}\\right)+\\tan ^{-1}(9-9 x)$\n", - "Output Answer": [ - "$\\frac{7}{2} \\sin \\left(\\frac{1}{2} (1-7 x)\\right)-\\frac{9}{(9-9 x)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((1/2)-((7*x)/2))+atan(9-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sqrt{\\frac{y}{x}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{y}{2 \\sqrt{x y}}+\\frac{1}{2 x \\sqrt{\\frac{y}{x}}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = sqrt((y/x))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)},\\sec ^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\left(\\frac{1}{4 \\sqrt{2}}-3\\right) (x+1)^2+\\left(3+\\frac{1}{\\sqrt{2}}\\right) (x+1)-1-\\sinh ^{-1}(1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = x**3\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x^4+4}$\n", - "Output Answer": [ - "$72 e^{6 x^4+4} x^2 \\left(8 x^4+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x**4+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/z)\ng = atan(y)\nh = tan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{3 x}{2}+\\frac{3}{2}\\right)-e^{x^5+\\frac{15}{2}}$\n", - "Output Answer": [ - "$-5 e^{x^5+\\frac{15}{2}} x^4-\\frac{3}{2} \\sin \\left(\\frac{3 (x+1)}{2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(((3*x)/2)+(3/2))-math.e**(x**5+(15/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x},0,-\\frac{z}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (z/x)\nh = (z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\cos ^{-1}\\left(x^5\\right)$", - "Output Answer": [ - "$\\sqrt{x}-\\frac{\\pi }{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = acos(x**5)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^3$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 3 z^2 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**3\ng = y**4\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{z-x^2}$", - "Output Answer": [ - "$-\\frac{8 x^2}{9 \\left(z-x^2\\right) \\sqrt[3]{z-x^2}^2}-\\frac{2}{9 \\left(z-x^2\\right) \\sqrt[3]{z-x^2}^2}-\\frac{2}{3 \\sqrt[3]{z-x^2}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z-x**2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y-z^3}}$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x+y}}-\\frac{3 z^2}{2 \\left(y-z^3\\right)^{3/2}},-\\frac{1}{2 \\sqrt{x+y}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(sqrt(y-z**3)))\nh = (1/(sqrt(y-z**3)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y-z)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(y-z)^2}},\\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(y-z)\nh = asin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(y-z^4\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$, and $h(x,y,z) = \\sqrt[3]{y z^4}$", - "Output Answer": [ - "$\\frac{4 y z^3}{3 \\sqrt[3]{y z^4}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y-z**4)\ng = atan(z**4)\nh = cbrt(y*z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y^2+1},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4 z^2}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^6$", - "Output Answer": [ - "$4 x^3 z^2 e^{x^4 z^2}+\\cos (y)+6 z^5$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4*z**2)\ng = sin(y)\nh = z**6\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x z^2\\right)$, $g(x,y,z) = e^{\\frac{y}{x}}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z^2 \\sec ^2\\left(x z^2\\right) & 0 & 2 x z \\sec ^2\\left(x z^2\\right) \\\\\n -\\frac{y e^{\\frac{y}{x}}}{x^2} & \\frac{e^{\\frac{y}{x}}}{x} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z**2)\ng = math.e**(y/x)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 0$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 0\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z (x+y)}$", - "Output Answer": [ - "$\\frac{x+y}{3 \\sqrt[3]{z (x+y)}^2}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = sqrt(y)\nh = cbrt(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = asin(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x-y)$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{y}{x^2}-\\frac{1}{\\sqrt{1-(x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x-y)\ng = (y/x)\nh = (y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x z}{y}}$", - "Output Answer": [ - "$-\\frac{x^2 z^2}{4 y^4 \\left(\\frac{x z}{y}\\right)^{3/2}}-\\frac{x^2}{4 y^2 \\left(\\frac{x z}{y}\\right)^{3/2}}-\\frac{z^2}{4 y^2 \\left(\\frac{x z}{y}\\right)^{3/2}}+\\frac{x z}{y^3 \\sqrt{\\frac{x z}{y}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x*z)/y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$2 \\sqrt{-x}+\\cos (3-3 x)$\n", - "Output Answer": [ - "$-\\frac{1}{2 (-x)^{3/2}}-9 \\cos (3-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 2*sqrt(-x)+cos(3-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(y**3)\nh = math.e**(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x^5-\\frac{1}{2}}+\\sqrt{3-\\frac{x}{2}}$\n", - "Output Answer": [ - "$30 e^{6 x^5-\\frac{1}{2}} x^4-\\frac{1}{4 \\sqrt{3-\\frac{x}{2}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x**5-(1/2))+sqrt(3-(x/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$-\\frac{z}{y^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = (z/y)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5}{z^2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4}{z^2},0,-\\frac{2 x^5}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/(z**2))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(3-5 x^2\\right)^5}$\n", - "Output Answer": [ - "$-\\frac{50 \\left(55 x^2+3\\right)}{\\left(5 x^2-3\\right)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((3-5*x**2)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^{y-z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**(y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{-5 x-5}$\n", - "Output Answer": [ - "$-\\frac{2}{5 (x+1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(-5*x-5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},0,\\cos (x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{y^3}{z}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\frac{3 y^2}{z}+\\cosh (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = ((y**3)/z)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(z)\ng = log(y)\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(5-3 x^5\\right)$\n", - "Output Answer": [ - "$60 x^3 \\sin \\left(5-3 x^5\\right)-225 x^8 \\cos \\left(5-3 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5-3*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin (x-y-z)$\n", - "Output Answer": [ - "$\\{\\cos (x-y-z),-\\cos (x-y-z),-\\cos (x-y-z)\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{x+z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(x+z)^2}+x,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}+z \\cos (y z)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sin(y*z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z^2}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{\\sin \\left(\\frac{x}{z^2}\\right)}{z^2},0,\\frac{2 x \\sin \\left(\\frac{x}{z^2}\\right)}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/(z**2)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(6-6 x) \\sqrt{4 x+3}$\n", - "Output Answer": [ - "$-\\frac{6 (6 x+1)}{\\sqrt{4 x+3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6-6*x)*sqrt(4*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\frac{1}{x^2 y^2}$", - "Output Answer": [ - "$-\\frac{1}{(x-y)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = atan(x)\nh = (1/(x**2*y**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos ^{-1}(2 x)$ on the interval $x = 4$ to $x = 13$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{5} \\left(E\\left(\\sin ^{-1}(26)|\\frac{1}{5}\\right)-E\\left(\\sin ^{-1}(8)|\\frac{1}{5}\\right)\\right)+i \\sqrt{59}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x)\na = 4\nb = 13\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^2$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,-2 y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**2\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{46}{3} e^{-\\frac{23 x^2}{3}-6} x$\n", - "Output Answer": [ - "$e^{-\\frac{23 x^2}{3}-6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -(46/3)*math.e**(-((23*x**2)/3)-6)*x\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = e^{x y+z}$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$x e^{x y+z}-\\frac{2}{x^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = math.e**(x*y+z)\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x+y^2}{z}$", - "Output Answer": [ - "$\\frac{2 \\left(x+y^2\\right)}{z^3}+\\frac{2}{z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y**2)/z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (9 x+4) \\cos ^{-1}(-2 x-9)$\n", - "Output Answer": [ - "$\\frac{\\log (9 x+4)}{\\sqrt{-x^2-9 x-20}}+\\frac{9 \\cos ^{-1}(-2 x-9)}{9 x+4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(9*x+4)*acos(-2*x-9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{x^3-1}+\\log (6 x-7)$\n", - "Output Answer": [ - "$3 e^{x^3-1} x \\left(3 x^3+2\\right)-\\frac{36}{(7-6 x)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x**3-1)+log(6*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (7-2 x) \\tan ^{-1}(2-x)$\n", - "Output Answer": [ - "$2 \\sin (7-2 x) \\tan ^{-1}(2-x)-\\frac{\\cos (7-2 x)}{x^2-4 x+5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(7-2*x)*atan(2-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y & x & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y\ng = log(y)\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (2-7 x)+\\cosh (9-6 x)$\n", - "Output Answer": [ - "$36 \\cosh (9-6 x)-49 \\sin (2-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2-7*x)+cosh(9-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(\\frac{5}{2}-\\frac{13 x}{2}\\right)+\\cos (7 x+1)$\n", - "Output Answer": [ - "$-\\frac{13}{\\sqrt{-169 x^2+130 x-21}}-7 \\sin (7 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin((5/2)-((13*x)/2))+cos(7*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $x$", - "Output Answer": [ - "$(x-2)^2+4 (x-2)+4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = x\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(8-3 x)^3-\\frac{1}{x^4-2}$\n", - "Output Answer": [ - "$\\frac{4 x^3}{\\left(x^4-2\\right)^2}-9 (8-3 x)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8-3*x)**3-(1/(x**4-2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{x^2+3}}{\\sqrt{-5 x-8}}$\n", - "Output Answer": [ - "$-\\frac{e^{x^2+3} \\left(20 x^2+32 x-5\\right)}{2 (-5 x-8)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(x**2+3))/(sqrt(-5*x-8))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tanh ^{-1}\\left(x-y^3\\right)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{1-\\left(x-y^3\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = atanh(x-y**3)\nh = atanh(x-y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sinh ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{(y+z)^2+1}},0,-\\frac{x}{2 y^2 \\left(\\frac{x}{y}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((x/y))))\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = sin((x/y))\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-\\frac{13 x}{2}-5}-e^{\\frac{11}{2}-3 x}$\n", - "Output Answer": [ - "$3 e^{\\frac{11}{2}-3 x}-\\frac{13}{2 \\sqrt{-26 x-20}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-((13*x)/2)-5)-math.e**((11/2)-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left\\{z,-\\frac{1}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/z))\ng = atanh(y)\nh = atanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tanh ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = x z^5$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+5 x z^4+\\frac{5 y^4}{1-y^{10}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = atanh(y**5)\nh = x*z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{3 y^2 \\sqrt[3]{\\frac{z}{y}}^2},0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y+z}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$y e^{x y+z}+3 y^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y+z)\ng = y**3\nh = acos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x^5 y^4 z\\right)$", - "Output Answer": [ - "$32 x^{10} y^6 z^2 \\tan \\left(x^5 y^4 z\\right) \\sec ^2\\left(x^5 y^4 z\\right)+50 x^8 y^8 z^2 \\tan \\left(x^5 y^4 z\\right) \\sec ^2\\left(x^5 y^4 z\\right)+12 x^5 y^2 z \\sec ^2\\left(x^5 y^4 z\\right)+20 x^3 y^4 z \\sec ^2\\left(x^5 y^4 z\\right)+2 x^{10} y^8 \\tan \\left(x^5 y^4 z\\right) \\sec ^2\\left(x^5 y^4 z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5*y**4*z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = x+z\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(e^{8 x-\\frac{31}{5}}\\right)$\n", - "Output Answer": [ - "$64 e^{8 x-\\frac{62}{5}} \\left(2 e^{8 x} \\tan \\left(e^{8 x-\\frac{31}{5}}\\right)+e^{31/5}\\right) \\sec ^2\\left(e^{8 x-\\frac{31}{5}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = tan(math.e**(8*x-(31/5)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{\\cos \\left(\\frac{x}{z}\\right)}{z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(4 x^3+6\\right)-\\cos \\left(3-9 x^2\\right)$\n", - "Output Answer": [ - "$-6 x \\left(3 \\sin \\left(3-9 x^2\\right)+2 x \\sin \\left(4 x^3+6\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x**3+6)-cos(3-9*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\tanh ^{-1}(x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n \\frac{1}{1-(x-y)^2} & -\\frac{1}{1-(x-y)^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cosh(y)\nh = atanh(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\sqrt{x^3}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n \\frac{3 x^2}{2 \\sqrt{x^3}} & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z)\ng = sqrt(x**3)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-4 x-8)-\\log (4-9 x)$\n", - "Output Answer": [ - "$\\frac{22}{-9 x^2-14 x+8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-4*x-8)-log(4-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7 x^4+4\\right)-\\sin ^{-1}(6 x+7)$\n", - "Output Answer": [ - "$\\frac{28 x^3}{7 x^4+4}-\\frac{6}{\\sqrt{1-(6 x+7)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x**4+4)-asin(6*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x$", - "Output Answer": [ - "$75 (x-5)+125$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x**3\nh = atan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{3 x^2}{\\sqrt{2 x^3-1}}$\n", - "Output Answer": [ - "$\\sqrt{2 x^3-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((3*x**2)/(sqrt(2*x**3-1)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(3 x^2-6\\right)^2}$\n", - "Output Answer": [ - "$\\frac{4 \\left(5 x^2+2\\right)}{9 \\left(x^2-2\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((3*x**2-6)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2 y^2$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$2 x y^2+\\sinh (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2*y**2\ng = cosh(y)\nh = z-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = cbrt(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = acos(y)\nh = tan((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = (1/y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5-z}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{5 x^4}{3 \\sqrt[3]{x^5-z}^2}-\\frac{3}{2 y^{5/2}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5-z)\ng = (1/(y**(3/2)))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$e^{x+z}+\\frac{1}{3 \\sqrt[3]{y+z}^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = y\nh = cbrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(4-6 x^2\\right)$\n", - "Output Answer": [ - "$12 \\left(12 x^2 \\sin \\left(4-6 x^2\\right)+\\cos \\left(4-6 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(4-6*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n 2 x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = cos(x+z)\nh = x**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{4-4 x}}{1296 x^4}$\n", - "Output Answer": [ - "$-\\frac{e^{4-4 x} (x+1)}{324 x^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(4-4*x))/(1296*x**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(8 x^5+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$160 x^3 \\left(10 x^5 \\sin \\left(8 x^5+\\frac{5}{2}\\right)-\\cos \\left(8 x^5+\\frac{5}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(8*x**5+(5/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(4 x^2-\\frac{26}{5}\\right)^2+\\sin \\left(\\frac{22 x}{5}+7\\right)$\n", - "Output Answer": [ - "$192 x^2-\\frac{484}{25} \\sin \\left(\\frac{22 x}{5}+7\\right)-\\frac{416}{5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (4*x**2-(26/5))**2+sin(((22*x)/5)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y-z)$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x z}}-\\sin (y-z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y-z)\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(6 x-6)^4}+\\cos (8 x+4)$\n", - "Output Answer": [ - "$-\\frac{24}{(6 x-6)^5}-8 \\sin (8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((6*x-6)**4))+cos(8*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(y)\nh = cbrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^2+y-z$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2+y-z\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4-x^2}$\n", - "Output Answer": [ - "$-\\frac{x}{\\sqrt{4-x^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4-x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^3$, $g(x,y,z) = \\frac{1}{(y-x)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 y^2 & 0 \\\\\n \\frac{3}{2 (y-x)^{5/2}} & -\\frac{3}{2 (y-x)^{5/2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**3\ng = (1/((y-x)**(3/2)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$\\sin ^2(4)-2 (x+4) \\sin (4) \\cos (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^4}{x^4}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\frac{1}{\\left(z^2\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{4 y^4}{x^5} & \\frac{4 y^3}{x^4} & 0 \\\\\n y & x & 0 \\\\\n 0 & 0 & -\\frac{3 z}{\\left(z^2\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**4)/(x**4))\ng = x*y\nh = (1/((z**2)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (7-5 x) \\left(-\\tan ^{-1}(5-2 x)\\right)$\n", - "Output Answer": [ - "$\\frac{2 \\sin (7-5 x)}{(5-2 x)^2+1}+5 \\cos (7-5 x) \\tan ^{-1}(5-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7-5*x)*(-atan(5-2*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x^2+y}{z^5}}$", - "Output Answer": [ - "$\\frac{4 x^2 e^{\\frac{x^2+y}{z^5}}}{z^{10}}+\\frac{2 e^{\\frac{x^2+y}{z^5}}}{z^5}+\\frac{30 \\left(x^2+y\\right) e^{\\frac{x^2+y}{z^5}}}{z^7}+\\frac{e^{\\frac{x^2+y}{z^5}}}{z^{10}}+\\frac{25 \\left(x^2+y\\right)^2 e^{\\frac{x^2+y}{z^5}}}{z^{12}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x**2+y)/(z**5))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = (y+z)^{3/2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+5 y^4+\\frac{3 \\sqrt{y+z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**5\nh = (y+z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n 1 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = x+y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x-y^5+z\\right)$, $g(x,y,z) = -\\tan \\left(y^5-z\\right)$, and $h(x,y,z) = \\cos (x z)$", - "Output Answer": [ - "$\\frac{1}{x-y^5+z}-x \\sin (x z)-5 y^4 \\sec ^2\\left(y^5-z\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-y**5+z)\ng = -tan(y**5-z)\nh = cos(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^2+z\\right)$, $g(x,y,z) = x^2 z$, and $h(x,y,z) = -\\sin ^{-1}\\left(x^2-z\\right)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-\\left(x^2-z\\right)^2}}+2 x \\sec ^2\\left(x^2+z\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2+z)\ng = x**2*z\nh = -asin(x**2-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x^{20}$ and $g(x) = $x^3$", - "Output Answer": [ - "$6175095174171 (x-3)^3+2646469360359 (x-3)^2+721764371007 (x-3)+94143178827$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**20\ng = x**3\nseries = f.subs(x, g).series(x, 3, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^2-x$, $g(x,y,z) = \\left(y^2-x\\right)^2$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$4 y \\left(y^2-x\\right)+4 z^3-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**2-x\ng = (y**2-x)**2\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-27 x^2 \\cos \\left(6-9 x^3\\right)$\n", - "Output Answer": [ - "$\\sin \\left(6-9 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -27*x**2*cos(6-9*x**3)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8-4 x)^4}+1$\n", - "Output Answer": [ - "$\\frac{5}{64 (x-2)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8-4*x)**4))+1\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{y^3}{z}}$, $g(x,y,z) = \\cos ^{-1}\\left(x+y^3\\right)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3 y^2}{2 z \\sqrt{\\frac{y^3}{z}}} & -\\frac{y^3}{2 z^2 \\sqrt{\\frac{y^3}{z}}} \\\\\n -\\frac{1}{\\sqrt{1-\\left(x+y^3\\right)^2}} & -\\frac{3 y^2}{\\sqrt{1-\\left(x+y^3\\right)^2}} & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(((y**3)/z))\ng = acos(x+y**3)\nh = (x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y+z}$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left\\{\\cos (y)-e^z,\\frac{1}{2 \\sqrt{x y+z}},-\\frac{x}{2 \\sqrt{x y+z}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y+z)\ng = math.e**z\nh = math.e**z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = y-x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 3 x^2 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = log(y)\nh = x**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = tan((x/y))\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (x-z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (x-y-z)$", - "Output Answer": [ - "$-\\sec ^2(x-y-z)-\\sec ^2(x-z)+5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-z)\ng = y**5\nh = tan(x-y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = sin((x/z))\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},-\\frac{1}{2 z^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z)))\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(9 x-5)^5}-\\cosh (8 x+4)$\n", - "Output Answer": [ - "$-\\frac{45}{(5-9 x)^6}-8 \\sinh (8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((9*x-5)**5))-cosh(8*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (3)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4-7 x} (4-2 x)^5$\n", - "Output Answer": [ - "$32 e^{4-7 x} (x-2)^4 (7 x-19)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4-7*x)*(4-2*x)**5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan (x-y)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\frac{3 \\sqrt{y}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y**(3/2)\nh = tan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(5 x+9)^5+\\cos (2)$\n", - "Output Answer": [ - "$500 (5 x+9)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5*x+9)**5+cos(2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$(x+4) \\left(\\cos (4)-\\frac{1}{17}\\right)-\\sin (4)+\\tan ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z\nh = math.e**(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{0,0,\\cos (x+y)\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(x+y)\nh = sin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x z$, and $h(x,y,z) = (z-x)^3$", - "Output Answer": [ - "$3 (z-x)^2+\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x*z\nh = (z-x)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+6} \\tan ^{-1}(5-x)$\n", - "Output Answer": [ - "$e^{x+6} \\left(\\tan ^{-1}(5-x)-\\frac{1}{(x-5)^2+1}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+6)*atan(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/(z**2))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\cos (4 x)$\n", - "Output Answer": [ - "$\\frac{128 \\sin (4)}{15}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(4*x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (4 x+4)-\\frac{1}{(-9 x-4)^5}$\n", - "Output Answer": [ - "$\\frac{2430}{(9 x+4)^7}+32 \\tan (4 (x+1)) \\sec ^2(4 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4*x+4)-(1/((-9*x-4)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = -\\tan (x-z)$", - "Output Answer": [ - "$\\sec ^2(x-z)+\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = acos(x/z)\nh = -tan(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y^5}$, and $h(x,y,z) = \\tan ^{-1}\\left(x y^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{5 y^4}{3 \\sqrt[3]{y^5}^2} & 0 \\\\\n \\frac{y^5}{x^2 y^{10}+1} & \\frac{5 x y^4}{x^2 y^{10}+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(y**5)\nh = atan(x*y**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin \\left(x^3+z\\right)$, and $h(x,y,z) = \\frac{z^5}{y^5}$", - "Output Answer": [ - "$3 x^2+\\frac{5 z^4}{y^5}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sin(x**3+z)\nh = ((z**5)/(y**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,\\cos (z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{(7 x-6)^2}{\\sqrt{7 x-8}}$\n", - "Output Answer": [ - "$\\frac{7 (7 x-6) (21 x-26)}{2 (7 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((7*x-6)**2)/(sqrt(7*x-8))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+y)\ng = sin(z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)},\\sin (x),0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = atan(z/y)\nh = atan(z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y-x}$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{y-x}}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y-x)\ng = math.e**(x*z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = (z-x)^2$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$z \\cos (x z)+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z)\ng = (z-x)**2\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5-z^2}$, $g(x,y,z) = \\left(\\frac{z^2}{x^5}\\right)^{3/2}$, and $h(x,y,z) = \\log \\left(z^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{3 z \\sqrt{\\frac{z^2}{x^5}}}{x^5},-\\frac{z}{\\sqrt{x^5-z^2}},-\\frac{15 z^2 \\sqrt{\\frac{z^2}{x^5}}}{2 x^6}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5-z**2)\ng = ((z**2)/(x**5))**(3/2)\nh = ((z**2)/(x**5))**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\sqrt{x+y^4}$, and $h(x,y,z) = \\tan \\left(y^4 z\\right)$", - "Output Answer": [ - "$\\left\\{4 y^3 z \\sec ^2\\left(y^4 z\\right),\\frac{1}{3 \\sqrt[3]{z}^2},\\frac{1}{2 \\sqrt{x+y^4}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = sqrt(x+y**4)\nh = sqrt(x+y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{(x+y)^5}{z^5}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 (x+y)^4}{z^5} & \\frac{5 (x+y)^4}{z^5} & -\\frac{5 (x+y)^5}{z^6} \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (((x+y)**5)/(z**5))\ng = sin(y)\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (9 x+9)}{\\sin ^{-1}\\left(x^2+1\\right)}$\n", - "Output Answer": [ - "$\\frac{9 \\sin ^{-1}\\left(x^2+1\\right) \\cos (9 (x+1))-\\frac{2 x \\sin (9 (x+1))}{\\sqrt{-x^2 \\left(x^2+2\\right)}}}{\\sin ^{-1}\\left(x^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(9*x+9))/(asin(x**2+1))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\sin ^{-1}\\left(x^3-z^4\\right)$, and $h(x,y,z) = \\sqrt[3]{z^4}$", - "Output Answer": [ - "$\\left\\{\\frac{4 z^3}{\\sqrt{1-\\left(x^3-z^4\\right)^2}},0,\\frac{3 x^2}{\\sqrt{1-\\left(x^3-z^4\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3)\ng = asin(x**3-z**4)\nh = asin(x**3-z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = z^2$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left\\{-2 z,-e^x,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = z**2\nh = z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y-x)^2}$, $g(x,y,z) = x^3$, and $h(x,y,z) = e^{y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2}{(y-x)^3} & -\\frac{2}{(y-x)^3} & 0 \\\\\n 3 x^2 & 0 & 0 \\\\\n 0 & e^{y-z} & -e^{y-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y-x)**2))\ng = x**3\nh = math.e**(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 y^2}$, $g(x,y,z) = y-z$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left\\{1,-1,\\frac{2}{x^2 y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*y**2))\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x-z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{\\sec ^2\\left(x-z^5\\right),0,-5 z^4 \\sec ^2\\left(x-z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x-z**5)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin \\left(\\frac{x z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x z \\cos \\left(\\frac{x z}{y}\\right)}{y^2},-\\frac{z \\cos \\left(\\frac{x z}{y}\\right)}{y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tanh \\left(\\frac{y^2}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n 0 & \\frac{2 y \\text{sech}^2\\left(\\frac{y^2}{z}\\right)}{z} & -\\frac{y^2 \\text{sech}^2\\left(\\frac{y^2}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+z)\ng = log((x/z))\nh = tanh((y**2)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$\\frac{61 x^6}{720}+\\frac{5 x^4}{24}+\\frac{x^2}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{z}{x^2 z^2+1}+3 y^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x*z)\ng = y**3\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z^4}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\log (x y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},-\\frac{1}{x},\\frac{\\cos \\left(\\frac{x}{y}\\right)}{y}-\\frac{1}{(x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y)\ng = sin((x/y))\nh = sin((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{15}{2}-2 x} \\cos ^{-1}(-x-6)$\n", - "Output Answer": [ - "$e^{\\frac{15}{2}-2 x} \\left(\\frac{1}{\\sqrt{-x^2-12 x-35}}-2 \\cos ^{-1}(-x-6)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((15/2)-2*x)*acos(-x-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x}-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{(y-z)^2}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\frac{2}{(y-z)^3} & \\frac{2}{(y-z)^3} \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/((y-z)**2))\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x y-z)$, and $h(x,y,z) = y^4 z^4$", - "Output Answer": [ - "$-x \\sin (x y-z)+4 y^4 z^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(x*y-z)\nh = y**4*z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,x \\sin (x y)+1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^3\\right)$, $g(x,y,z) = \\cos \\left(x^3+y^5\\right)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y^5}}$", - "Output Answer": [ - "$-5 y^4 \\sin \\left(x^3+y^5\\right)+\\frac{3 x^2}{x^6+1}+\\frac{1}{3 y^5 \\sqrt[3]{\\frac{z}{y^5}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**3)\ng = cos(x**3+y**5)\nh = cbrt(z/(y**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(1-\\frac{11 x}{2}\\right)-\\cos \\left(7-\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{225}{4} \\cos \\left(7-\\frac{15 x}{2}\\right)-\\frac{121}{(2-11 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(1-((11*x)/2))-cos(7-((15*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sqrt(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4 x+8)+\\cos (5 x+2)$\n", - "Output Answer": [ - "$-4 \\sin (4 (x+2))-5 \\sin (5 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x+8)+cos(5*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\cos \\left(\\frac{x}{y}+z\\right),0,\\frac{\\cos \\left(\\frac{x}{y}+z\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sin((x/y)+z)\nh = sin((x/y)+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{4 x^2+4}}{\\sqrt{9 x+4}}$\n", - "Output Answer": [ - "$\\frac{e^{4 x^2+4} \\left(144 x^2+64 x-9\\right)}{2 (9 x+4)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(4*x**2+4))/(sqrt(9*x+4))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$(x-4)^2 \\left(\\frac{1}{64}+\\tan ^3(4)+\\tan (4)\\right)+(x-4) \\left(\\frac{3}{4}+\\tan ^2(4)\\right)-2+\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y-z)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(y-z)^2+1},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(y-z)\nh = atan(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{7}{2}-\\frac{17 x}{2}}$\n", - "Output Answer": [ - "$-\\frac{17}{2} e^{\\frac{7}{2}-\\frac{17 x}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((7/2)-((17*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = x^{20} z^4$", - "Output Answer": [ - "$4 x^{20} z^3+\\frac{5 x^4}{2 \\sqrt{x^5}}-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5)\ng = acos(y)\nh = x**20*z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = cbrt(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\cos ^{-1}\\left(x^3-y\\right)$, and $h(x,y,z) = \\cos ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 e^{x^3} x^2 & 0 & 0 \\\\\n -\\frac{3 x^2}{\\sqrt{1-\\left(x^3-y\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(x^3-y\\right)^2}} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y+z)^2}} & -\\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x**3)\ng = acos(x**3-y)\nh = acos(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**4\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},\\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = asin(y/z)\nh = asin(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^{12}$ and $g(x) = $x^{12}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**12\ng = x**12\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z (x-y)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\tanh ^{-1}(x)$", - "Output Answer": [ - "$z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z*(x-y)\ng = sqrt(z)\nh = atanh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4-x^5}$\n", - "Output Answer": [ - "$\\frac{5 x^3 \\left(3 x^5-32\\right)}{4 \\left(4-x^5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4-x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x z}$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = x^5$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(x+z),x e^{x z}-5 x^4,\\sec ^2(x+z)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*z)\ng = tan(x+z)\nh = tan(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}+z\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{3}{2 \\left(\\frac{x}{y}+z\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x\nh = (1/(((x/y)+z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3 x+9) \\cos (x+8)$\n", - "Output Answer": [ - "$\\frac{\\cos (x+8)}{x+3}-\\log (3 (x+3)) \\sin (x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x+9)*cos(x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(\\frac{16 x}{5}\\right)$ on the interval $x = 4$ to $x = 11$\n", - "Output Answer": [ - "$-\\sqrt{17}+\\sqrt{122}+\\tanh ^{-1}\\left(\\sqrt{17}\\right)-\\tanh ^{-1}\\left(\\sqrt{122}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((16*x)/5))\na = 4\nb = 11\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (6 x+2) \\tan (5 x+4)$\n", - "Output Answer": [ - "$-6 \\cos (6 x+2) \\tan (5 x+4)-5 \\sin (6 x+2) \\sec ^2(5 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(6*x+2)*tan(5*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^3 \\left(x^2+y\\right)^3$", - "Output Answer": [ - "$6 z^3 \\left(x^2+y\\right)^2+24 x^2 z^3 \\left(x^2+y\\right)+6 z^3 \\left(x^2+y\\right)+6 z \\left(x^2+y\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3*(x**2+y)**3\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\frac{z^5}{y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & -\\frac{5 z^5}{y^6} & \\frac{5 z^4}{y^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = acos(y)\nh = ((z**5)/(y**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = sqrt(y)\nh = cbrt(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-z)\ng = y**4\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/y)\ng = sqrt(y)\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sinh (x-y)$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\{0,0,\\cosh (x-y)\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sinh(x-y)\nh = sinh(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (7 x+5) \\cosh (6-7 x)$\n", - "Output Answer": [ - "$\\frac{49 \\left(\\left((7 x+5)^2 \\log (7 x+5)-1\\right) \\cosh (6-7 x)-2 (7 x+5) \\sinh (6-7 x)\\right)}{(7 x+5)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(7*x+5)*cosh(6-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{1}{3 \\sqrt[3]{z-y}^2} & \\frac{1}{3 \\sqrt[3]{z-y}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sqrt(y)\nh = cbrt(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = y+z$\n", - "Output Answer": [ - "$\\{0,1,1\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{y^2+1}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = atan(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^2}{z^2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{z^2} & 0 & -\\frac{2 x^2}{z^3} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**2)/(z**2))\ng = log(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{-\\frac{15 x^5}{2}-6}-\\sin (2)$\n", - "Output Answer": [ - "$-\\frac{75}{4} e^{-\\frac{15 x^5}{2}-6} x^3 \\left(75 x^5-8\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(-((15*x**5)/2)-6)-sin(2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\sqrt{5 x+3}\\right)$\n", - "Output Answer": [ - "$-\\frac{125 (2 x+1)}{4 (-((5 x+2) (5 x+3)))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(sqrt(5*x+3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cos (x z)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -z \\sin (x z) & 0 & -x \\sin (x z) \\\\\n 3 x^2 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = cos(x*z)\nh = x**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-5) \\left(e^5 \\cos (5)-e^5 \\sin (5)\\right)+e^5 \\cos (5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = cos(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $e^{x^3}$", - "Output Answer": [ - "$\\frac{3 \\pi (x+1)}{e}-\\frac{\\sqrt{2} \\sqrt{x+1}}{e}+\\frac{\\pi }{e}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = math.e**(x**3)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(\\frac{1}{4}+\\frac{e}{2}\\right) (x-1)^2+\\left(e-\\frac{1}{2}\\right) (x-1)-\\frac{\\pi }{4}+e$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = atan(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-z}$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = (y+z)^4$", - "Output Answer": [ - "$\\left\\{4 (y+z)^3-\\frac{1}{2 \\sqrt{y+z}},-\\frac{1}{2 \\sqrt{x-z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-z)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{\\left(3 x+\\frac{15}{2}\\right)^2+1}{2 \\left(3 x+\\frac{15}{2}\\right)}$\n", - "Output Answer": [ - "$\\frac{8}{3 (2 x+5)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (((3*x+(15/2))**2+1)/(2*(3*x+(15/2))))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & -1 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-z\ng = acos(y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\sin ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\sqrt[3]{\\frac{x^4}{y^4}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & 0 \\\\\n 0 & \\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n \\frac{4 x^3}{3 y^4 \\sqrt[3]{\\frac{x^4}{y^4}}^2} & -\\frac{4 x^4}{3 y^5 \\sqrt[3]{\\frac{x^4}{y^4}}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4\ng = asin(y**4)\nh = cbrt((x**4)/(y**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = \\frac{1}{x^3}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{x^2}{\\sqrt[3]{x^3}^2} & 0 & 0 \\\\\n -\\frac{3}{x^4} & 0 & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**3)\ng = (1/(x**3))\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2 z^2}$, $g(x,y,z) = \\frac{1}{\\sqrt{z}}$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z^{3/2}}+1,-\\frac{2}{y^2 z^3}-1,\\frac{2}{y^3 z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2*z**2))\ng = (1/(sqrt(z)))\nh = (1/(sqrt(z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,-\\sin (z),\\sec ^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+y)\ng = log(x)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\left\\{-3 z^2,\\frac{1}{z}-\\cos (x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*z)\ng = z**3\nh = z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{3-x}}{\\sqrt{-3 x-6}}$\n", - "Output Answer": [ - "$\\frac{e^{3-x} (2 x+5)}{2 \\sqrt{3} (-x-2)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(3-x))/(sqrt(-3*x-6))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(x+5)^3}$\n", - "Output Answer": [ - "$\\frac{12}{(x+5)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((x+5)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sqrt{\\frac{5}{3}} \\sqrt{-x}$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{\\frac{5}{3}}}{64}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt((5/3))*sqrt(-x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$e^y-\\frac{3}{2 x^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = math.e**y\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x z}}$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{1,-\\frac{x}{2 (x z)^{3/2}}-1,-\\frac{\\sin \\left(\\frac{x}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*z)))\ng = cos((x/y))\nh = cos((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-7 x^4-3\\right)^5+\\sqrt{5-6 x^2}$\n", - "Output Answer": [ - "$-140 x^3 \\left(7 x^4+3\\right)^4-\\frac{6 x}{\\sqrt{5-6 x^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-7*x**4-3)**5+sqrt(5-6*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos \\left(y^4\\right)$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y**4)\nh = cos(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = (x+y)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 5 (x+y)^4 & 5 (x+y)^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = (1/(x**(3/2)))\nh = (x+y)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sin \\left(z^3\\right)$", - "Output Answer": [ - "$x+3 z^2 \\cos \\left(z^3\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x*y\nh = sin(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z-y}$, $g(x,y,z) = (x+y)^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$4 (x+y)^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z-y)\ng = (x+y)**4\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x$", - "Output Answer": [ - "$\\frac{3}{256} (x-4)^2+\\frac{4-x}{16}+\\frac{1}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x^5}{y}+z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4}{y \\sqrt{1-\\left(\\frac{x^5}{y}+z\\right)^2}},-\\frac{x^5}{y^2 \\sqrt{1-\\left(\\frac{x^5}{y}+z\\right)^2}},\\frac{1}{\\sqrt{1-\\left(\\frac{x^5}{y}+z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(((x**5)/y)+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-e^{x-y}+\\frac{1}{3 \\sqrt[3]{x+z}^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = math.e**(x-y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = x^5$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{2 \\sqrt{x^5}} & 0 & 0 \\\\\n 5 x^4 & 0 & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**5)\ng = x**5\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh ^{-1}\\left(x y^3-z\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{3 x y^2}{\\sqrt{\\left(x y^3-z\\right)^2+1}}+\\cos (x)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asinh(x*y**3-z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = \\cosh (x+z)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{1-\\sinh (x+z),-\\frac{x}{\\sqrt{1-x^2 z^2}},\\sinh (x+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*z)\ng = cosh(x+z)\nh = cosh(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x^5-3}$\n", - "Output Answer": [ - "$60 e^{6 x^5-3} x^3 \\left(15 x^5+2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x**5-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(y)$, $g(x,y,z) = \\sin \\left(x^4-z\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 4 x^3 \\cos \\left(x^4-z\\right) & 0 & -\\cos \\left(x^4-z\\right) \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(y)\ng = sin(x**4-z)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-y}$, $g(x,y,z) = \\left(\\frac{z}{y}\\right)^{3/2}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-y}^2} & -\\frac{1}{3 \\sqrt[3]{x-y}^2} & 0 \\\\\n 0 & -\\frac{3 z \\sqrt{\\frac{z}{y}}}{2 y^2} & \\frac{3 \\sqrt{\\frac{z}{y}}}{2 y} \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-y)\ng = (z/y)**(3/2)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x y^3\\right)$, $g(x,y,z) = \\sin \\left(y^3 z\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{-y^3 \\cos \\left(y^3 z\\right),0,-3 x y^2 \\cos \\left(x y^3\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y**3)\ng = sin(y**3*z)\nh = sin(y**3*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 1$ on the interval $x = 3$ to $x = 10$\n", - "Output Answer": [ - "$7$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1\na = 3\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{e^{y/z}}{z} & -\\frac{y e^{y/z}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(y)\nh = math.e**(y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x^4}{y}-z\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 x^3}{y \\sqrt{1-\\left(\\frac{x^4}{y}-z\\right)^2}},\\frac{x^4}{y^2 \\sqrt{1-\\left(\\frac{x^4}{y}-z\\right)^2}},\\frac{1}{\\sqrt{1-\\left(\\frac{x^4}{y}-z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(((x**4)/y)-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y-z}$, $g(x,y,z) = \\frac{1}{(x+y)^2}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},-\\frac{1}{3 \\sqrt[3]{y-z}^2},-\\frac{2}{(x+y)^3}-\\frac{1}{3 \\sqrt[3]{y-z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y-z)\ng = (1/((x+y)**2))\nh = (1/((x+y)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\begin{cases}\n \\sqrt[3]{x}-\\sqrt{x} & x>0 \\\\\n -\\sqrt{x}-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{y}{x}}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{e^{\\frac{y}{x}}}{x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y/x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cosh \\left(\\frac{33 x}{5}+\\frac{26}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1089}{25} \\cosh \\left(\\frac{1}{5} (33 x+26)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cosh(((33*x)/5)+(26/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$\\frac{x^4}{24}-\\frac{5 x^3}{6}+\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = sin(x**3)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-3) \\left(\\frac{\\sec (3)}{3\\ 3^{2/3}}+\\sqrt[3]{3} \\tan (3) \\sec (3)\\right)+\\sqrt[3]{3} \\sec (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (8-4 x)-\\tan (6-2 x)$\n", - "Output Answer": [ - "$-8 \\left(4 \\tan (8-4 x) \\sec ^2(8-4 x)+\\tan (6-2 x) \\sec ^2(6-2 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(8-4*x)-tan(6-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cosh ^{-1}\\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z \\sqrt{\\frac{y}{z}-1} \\sqrt{\\frac{y}{z}+1}},\\frac{1}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2 x \\cos \\left(x^2\\right)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(3 x^4+3\\right)^4}$\n", - "Output Answer": [ - "$\\frac{16 x^2 \\left(17 x^4-3\\right)}{81 \\left(x^4+1\\right)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((3*x**4+3)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 3 x^2 & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = x**3\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{(y+z)^3},0,\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = asin(x)\nh = asin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x+y}{z}$, $g(x,y,z) = x$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/z)\ng = x\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^4-x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin \\left(z^4\\right)$", - "Output Answer": [ - "$4 z^3 \\cos \\left(z^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**4-x\ng = y\nh = sin(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\cos (x)+3 y^2-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**3\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x z}}-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = x\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = (z-x)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n -5 (z-x)^4 & 0 & 5 (z-x)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y)\ng = cos(y)\nh = (z-x)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z^8$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^2 y}}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x^2}{2 \\left(x^2 y\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**2*y)))\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{\\cos \\left(\\frac{x}{z}\\right)}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{-x,0,z\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x*z\nh = x*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log \\left(z-x^2\\right)$", - "Output Answer": [ - "$\\frac{1}{z-x^2}+2 e^{x^2} x+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2)\ng = sqrt(y)\nh = log(z-x**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^3 z\\right)$, $g(x,y,z) = (y+z)^3$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -3 x^2 z \\sin \\left(x^3 z\\right) & 0 & -x^3 \\sin \\left(x^3 z\\right) \\\\\n 0 & 3 (y+z)^2 & 3 (y+z)^2 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**3*z)\ng = (y+z)**3\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\tan \\left(x^4+y\\right)$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(y-z),0,4 x^3 \\sec ^2\\left(x^4+y\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**4)\ng = tan(x**4+y)\nh = tan(x**4+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{17 x^2}{2}-5}+e^{\\frac{7 x}{2}+6}$\n", - "Output Answer": [ - "$17 e^{\\frac{17 x^2}{2}-5} x+\\frac{7}{2} e^{\\frac{7 x}{2}+6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((17*x**2)/2)-5)+math.e**(((7*x)/2)+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$3 x^2-\\sin (y)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = cos(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sin(y-z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = e^{y^5 z}$, and $h(x,y,z) = \\tan ^{-1}\\left(y^5\\right)$", - "Output Answer": [ - "$5 y^4 z e^{y^5 z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = math.e**(y**5*z)\nh = atan(y**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x-z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x-z)\ng = log(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\left(\\left(-\\frac{36 x}{5}-\\frac{43}{5}\\right) \\sin \\left(\\frac{8 x}{5}+\\frac{3}{5}\\right)\\right)$\n", - "Output Answer": [ - "$-\\frac{64}{125} \\left((36 x+43) \\sin \\left(\\frac{1}{5} (8 x+3)\\right)-45 \\cos \\left(\\frac{1}{5} (8 x+3)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((-((36*x)/5)-(43/5))*sin(((8*x)/5)+(3/5)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y**(3/2)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^4}{x^4}$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = e^{y z^4}$", - "Output Answer": [ - "$\\left\\{z^4 e^{y z^4},0,-\\frac{4 y^3}{x^4}-\\sin (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**4)/(x**4))\ng = cos(x-y)\nh = cos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x^2}}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\frac{2}{x^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = (1/(sqrt((z/(x**2)))))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = (y+z)^5$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-5 (y+z)^4,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (y+z)**5\nh = (y+z)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z-x}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},\\frac{1}{3 \\sqrt[3]{z-x}^2}-\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z-x)\ng = acos(y/z)\nh = acos(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2}+z \\sec ^2(x z)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = cbrt(x/y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^2}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n x^{2/3}-\\sqrt[3]{x} & x>0 \\\\\n (-x)^{2/3}+\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**2)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x y^3\\right)$, $g(x,y,z) = e^x$, and $h(x,y,z) = -\\tan \\left(x-y^3\\right)$", - "Output Answer": [ - "$-y^3 \\sin \\left(x y^3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y**3)\ng = math.e**x\nh = -tan(x-y**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3 x+7)-\\cosh (1-2 x)$\n", - "Output Answer": [ - "$2 \\sinh (1-2 x)-3 \\sin (3 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3*x+7)-cosh(1-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(3 x+7)$\n", - "Output Answer": [ - "$-\\frac{3}{\\sqrt{1-(3 x+7)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(3*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = acos(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x-y)^{3/2}$, $g(x,y,z) = y^4$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x-y}}{2} & -\\frac{3 \\sqrt{x-y}}{2} & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x-y)**(3/2)\ng = y**4\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\frac{1}{\\left(x^5-y\\right)^2}$", - "Output Answer": [ - "$\\left\\{\\frac{2}{\\left(x^5-y\\right)^3}-3 z^2,\\frac{10 x^4}{\\left(x^5-y\\right)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = z**3\nh = z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^3 z\\right)$, $g(x,y,z) = \\frac{1}{z^{3/2}}$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$3 x^2 z \\cos \\left(x^3 z\\right)+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**3*z)\ng = (1/(z**(3/2)))\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-3 x-4)+\\log (6 x+9)$\n", - "Output Answer": [ - "$\\frac{12 x+17}{6 x^2+17 x+12}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-3*x-4)+log(6*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x+2}$\n", - "Output Answer": [ - "$-\\frac{9}{(6 x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{y^2-z}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{2 y}{\\left(y^2-z\\right)^2},\\frac{1}{\\left(y^2-z\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2-z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^2}$ and $g(x) = $x^2$", - "Output Answer": [ - "$\\frac{14 (x+5)^2}{1125 \\sqrt[3]{5}}+\\frac{4 (x+5)}{75 \\sqrt[3]{5}}+\\frac{1}{5 \\sqrt[3]{5}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**2)\ng = x**2\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 y^2 z^2}$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$-\\frac{2}{x^3 y^2 z^2}-x \\sin (x y)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*y**2*z**2))\ng = cos(x*y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$(x-3) (\\cos (3)-1)-3+\\sin (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^{20}$", - "Output Answer": [ - "$\\frac{1}{x^{39/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**20\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-2 x-7)$\n", - "Output Answer": [ - "$\\frac{2 x+7}{2 \\left(-x^2-7 x-12\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-2*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{27 x^2}{\\sqrt{1-\\left(9 x^3+2\\right)^2}}$\n", - "Output Answer": [ - "$-\\sin ^{-1}\\left(9 x^3+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((27*x**2)/(sqrt(1-(9*x**3+2)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{x z}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{2 \\sqrt{x z}}-\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2},0,\\frac{z}{2 \\sqrt{x z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(x*z)\nh = sqrt(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 1 & 1 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = y+z\nh = sqrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sin ^{-1}\\left(x^4\\right)$", - "Output Answer": [ - "$\\frac{1}{x^3}+\\frac{2 x}{15}+\\frac{1}{3 x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = asin(x**4)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y*z)\ng = cos(y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $x^4$", - "Output Answer": [ - "$\\begin{cases}\n \\sqrt[3]{x}-x^4 & x>0 \\\\\n -x^4-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = x**4\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4-6 x)+\\cos (5-2 x)$\n", - "Output Answer": [ - "$2 (3 \\sin (4-6 x)+\\sin (5-2 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4-6*x)+cos(5-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4-y-z^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z^2}$", - "Output Answer": [ - "$\\{0,-2 z,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4-y-z**2\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n -\\frac{1}{2 z \\left(\\frac{x}{z}\\right)^{3/2}} & 0 & \\frac{x}{2 z^2 \\left(\\frac{x}{z}\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = y\nh = (1/(sqrt((x/z))))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-\\frac{15 x}{2}-5\\right)^3}$\n", - "Output Answer": [ - "$-\\frac{864}{125 (3 x+2)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-((15*x)/2)-5)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\frac{y}{2 \\sqrt{y z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cos(x)\nh = sqrt(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{-1,0,-2\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = (y+z)^5$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = (y+z)**5\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = \\left(\\frac{x}{y}-z\\right)^{3/2}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{3}{2} \\sqrt{\\frac{x}{y}-z}+x e^{x y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = math.e**(x*y)\nh = ((x/y)-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(y-z)$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-2 z,-\\frac{1}{\\sqrt{(y-z)^2+1}},-\\frac{1}{\\sqrt{(y-z)^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(y-z)\ng = z**2\nh = z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$1-\\sin \\left(2 x^2+6\\right)$\n", - "Output Answer": [ - "$-4 \\left(\\cos \\left(2 \\left(x^2+3\\right)\\right)-4 x^2 \\sin \\left(2 \\left(x^2+3\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1-sin(2*x**2+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x-z} & 0 & -\\frac{1}{x-z} \\\\\n -\\frac{2}{x^3} & 0 & 0 \\\\\n \\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2} & 0 & -\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x-z)\ng = (1/(x**2))\nh = cbrt(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{9 x+9} \\tan (7-3 x)$\n", - "Output Answer": [ - "$-\\frac{3 (12 (x+1)-\\sin (14-6 x)) \\sec ^2(7-3 x)}{4 \\sqrt{x+1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(9*x+9)*tan(7-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z-x}}+\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y)\nh = sqrt(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(x^2+6\\right)$\n", - "Output Answer": [ - "$2 \\left(\\cos \\left(x^2+6\\right)-2 x^2 \\sin \\left(x^2+6\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(x**2+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = x^3$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\cos (x-y) & \\cos (x-y) & 0 \\\\\n 3 x^2 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -sin(x-y)\ng = x**3\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = z^2$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & 2 z \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = z**2\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y^2}-z$, $g(x,y,z) = z^2$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{1}{y^2}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(y**2))-z\ng = z**2\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2-7 x}-(5 x+3)^3$\n", - "Output Answer": [ - "$-15 (5 x+3)^2-\\frac{7}{2 \\sqrt{2-7 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2-7*x)-(5*x+3)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cbrt(y)\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x-z} & 0 & -e^{x-z} \\\\\n 0 & \\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}} & -\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}} \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x-z)\ng = acos(z/y)\nh = log(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x^2+1}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = acos(z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5\ng = log(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\sin ^{-1}\\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{y}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = (y/x)\nh = (y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$z \\sec ^2(x z)-y \\sin (y z)+2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = y**2\nh = cos(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x-z}}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z-\\frac{1}{2 (x-z)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x-z)))\ng = sin(z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x y^4-z\\right)$", - "Output Answer": [ - "$32 x^2 y^6 \\tan \\left(x y^4-z\\right) \\sec ^2\\left(x y^4-z\\right)+12 x y^2 \\sec ^2\\left(x y^4-z\\right)+2 y^8 \\tan \\left(x y^4-z\\right) \\sec ^2\\left(x y^4-z\\right)+2 \\tan \\left(x y^4-z\\right) \\sec ^2\\left(x y^4-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y**4-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^2$, $g(x,y,z) = \\tan ^{-1}\\left(y^2\\right)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 y & 0 \\\\\n 0 & \\frac{2 y}{y^4+1} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**2\ng = atan(y**2)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = \\sqrt{\\frac{z}{y}}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{y \\left(\\left(\\frac{x}{y}-z\\right)^2+1\\right)}-\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x/y)-z)\ng = sqrt((z/y))\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = -\\tan ^{-1}\\left(x^5-z\\right)$", - "Output Answer": [ - "$\\frac{1}{\\left(x^5-z\\right)^2+1}+\\frac{5 x^4}{2 \\sqrt{x^5}}+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5)\ng = sin(y)\nh = -atan(x**5-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (x z)$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = log(x*z)\nh = (x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x y^3+z\\right)$\n", - "Output Answer": [ - "$\\left\\{y^3 \\cos \\left(x y^3+z\\right),3 x y^2 \\cos \\left(x y^3+z\\right),\\cos \\left(x y^3+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y**3+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n 0 & z e^{y z} & y e^{y z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-y)\ng = math.e**(y*z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x+y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 (x+y)^{3/2}},\\frac{1}{2 (x+y)^{3/2}},\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{y^5}{z^5}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{5 y^4}{z^5},-\\frac{5 y^5}{z^6}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**5)/(z**5))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = \\log \\left(x y z^5\\right)$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = log(x*y*z**5)\nh = math.e**(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (x-z)$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{x-z} & 0 & -\\frac{1}{x-z} \\\\\n 2 x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log(x-z)\nh = x**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x+z)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{1-(x+z)^2}-z e^{x z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x+z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\cos \\left(x^3 y+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-x^3 \\sin \\left(x^3 y+z\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/y)\ng = cos(x**3*y+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = y^4 z^4$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y^2+1}-4 y^4 z^3,\\frac{1}{x+z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+z)\ng = y**4*z**4\nh = y**4*z**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cos \\left(3 x^3\\right)$\n", - "Output Answer": [ - "$-45 \\sin (375)-\\frac{50625 \\cos (375)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(3*x**3))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x}{y^2}+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = asin(y)\nh = y**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\sin \\left(\\frac{x y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-\\frac{x y \\cos \\left(\\frac{x y}{z}\\right)}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = cos(x)\nh = sin(((x*y)/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\frac{x^5}{y^5}$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y+z\nh = ((x**5)/(y**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sinh ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\{0,\\cos (x-z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asinh(y**3)\nh = asinh(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\sqrt{7 x-4}\\right)$\n", - "Output Answer": [ - "$\\frac{49 \\left(\\sin \\left(\\sqrt{7 x-4}\\right)-\\sqrt{7 x-4} \\cos \\left(\\sqrt{7 x-4}\\right)\\right)}{4 (7 x-4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(sqrt(7*x-4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{y^4}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/(y**4))\nh = (1/(y**4))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n 0 & e^y & 0 \\\\\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+z)\ng = math.e**y\nh = cos(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-y-z)$, $g(x,y,z) = x$, and $h(x,y,z) = y^2 z^2$", - "Output Answer": [ - "$\\left\\{2 y z^2,-\\cos (x-y-z),\\cos (x-y-z)+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y-z)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$(x-5) \\left(\\frac{1}{\\sqrt{26} \\log (5)}-\\frac{\\sinh ^{-1}(5)}{5 \\log ^2(5)}\\right)+\\frac{\\sinh ^{-1}(5)}{\\log (5)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x} \\cos ^{-1}(8-8 x)$\n", - "Output Answer": [ - "$e^{7 x} \\left(49 \\cos ^{-1}(8-8 x)-\\frac{16 \\left(448 x^2-928 x+473\\right)}{\\left(-64 x^2+128 x-63\\right)^{3/2}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x)*acos(8-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n \\frac{1}{y \\sqrt{\\frac{x}{y}-1} \\sqrt{\\frac{x}{y}+1}} & -\\frac{x}{y^2 \\sqrt{\\frac{x}{y}-1} \\sqrt{\\frac{x}{y}+1}} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z)\ng = acosh(x/y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{6 x-1}$\n", - "Output Answer": [ - "$\\frac{72}{(6 x-1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(6*x-1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\tan ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = e^{\\frac{y^5}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{5 y^4 e^{\\frac{y^5}{z}}}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = atan(y**5)\nh = atan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 y^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x+4}+\\frac{1}{(x+8)^4}$\n", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+4}}-\\frac{4}{(x+8)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x+4)+(1/((x+8)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^3 z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{y^3}{2 \\sqrt{y^3 z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y**3*z)\nh = sqrt(y**3*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^{10}$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{97656251 (x-5)}{5}+9765625+\\log (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**10\ng = log(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x^3+y-z^3\\right)$", - "Output Answer": [ - "$-\\frac{9 x^4}{\\left(x^3+y-z^3\\right)^2}+\\frac{6 x}{x^3+y-z^3}-\\frac{6 z}{x^3+y-z^3}-\\frac{9 z^4}{\\left(x^3+y-z^3\\right)^2}-\\frac{1}{\\left(x^3+y-z^3\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**3+y-z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(y)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(y)\ng = acosh(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{17 x^2}{2}-\\frac{7}{2}}$\n", - "Output Answer": [ - "$17 e^{\\frac{17 x^2}{2}-\\frac{7}{2}} \\left(17 x^2+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((17*x**2)/2)-(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{y^4+z}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{2 y^3}{\\sqrt{y^4+z}},\\frac{1}{2 \\sqrt{y^4+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**4+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\cos (y)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sin(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-12 x^2 \\sin \\left(4 x^3+6\\right)$\n", - "Output Answer": [ - "$\\cos \\left(4 x^3+6\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -12*x**2*sin(4*x**3+6)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (9-9 x)-\\sin ^{-1}(4-9 x)$\n", - "Output Answer": [ - "$-\\frac{81 (4-9 x)}{\\left(1-(4-9 x)^2\\right)^{3/2}}-81 \\cos (9-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(9-9*x)-asin(4-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,0,-\\sec ^2(y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+z)^4$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 (x+z)^3 & 0 & 4 (x+z)^3 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+z)**4\ng = sin(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left\\{0,z \\left(-e^{x z}\\right),-\\sec ^2(y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+y)^2+1} & \\frac{1}{(x+y)^2+1} & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+y)\ng = y**3\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-7 x^3-2}-\\sin \\left(6 x^4+1\\right)$\n", - "Output Answer": [ - "$\\frac{3}{4} x \\left(\\frac{49 x^3+768 \\left(-7 x^3-2\\right)^{3/2} x^5 \\sin \\left(6 x^4+1\\right)+56}{\\left(-7 x^3-2\\right)^{3/2}}-96 x \\cos \\left(6 x^4+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-7*x**3-2)-sin(6*x**4+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x y^5-z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{y^5}{2 \\sqrt{x y^5-z}},\\frac{5 x y^4}{2 \\sqrt{x y^5-z}},-\\frac{1}{2 \\sqrt{x y^5-z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y**5-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tan (y+z)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\text{sech}^2(x)+\\sec ^2(y+z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = tan(y+z)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-9 x^3-1\\right)^3$\n", - "Output Answer": [ - "$-162 \\left(324 x^7+45 x^4+x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-9*x**3-1)**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{-\\cos (y+z),\\sin (x-z)-z,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = sin(y+z)\nh = sin(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+2 y-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y**2\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$8 \\cos (8 (x+1))$\n", - "Output Answer": [ - "$\\sin (8 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 8*cos(8*(x+1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(z),0,-\\frac{x \\sin \\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/y))\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$2 x \\sec ^2\\left(x^2\\right)+e^y+\\sec ^2(z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2)\ng = math.e**y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (9 x+6)$\n", - "Output Answer": [ - "$9 \\cos (9 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(9*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z^3-x$, and $h(x,y,z) = \\tanh \\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{-3 z^2,0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z**3-x\nh = z**3-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt{x-y}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = atan(y)\nh = sqrt(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y-z)$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\cos (y+z)+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y-z)\ng = sin(y+z)\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (z-x)^4$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 (z-x)^3 & 0 & 4 (z-x)^3 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z-x)**4\ng = math.e**y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{3 \\sqrt[3]{y z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-7 x^4-4}$\n", - "Output Answer": [ - "$\\frac{14 x^2 \\left(7 x^4+12\\right)}{\\left(-7 x^4-4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-7*x**4-4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$4 x+\\frac{1}{(1-6 x)^4}+3$\n", - "Output Answer": [ - "$\\frac{24}{(1-6 x)^5}+4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(4*x+(1/((1-6*x)**4))+3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x y^3-z^2\\right)^{3/2}$, $g(x,y,z) = \\log \\left(y^3\\right)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,-3 z \\sqrt{x y^3-z^2},-\\frac{9}{2} x y^2 \\sqrt{x y^3-z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y**3-z**2)**(3/2)\ng = log(y**3)\nh = log(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{3 x}{2}+4\\right)$\n", - "Output Answer": [ - "$-\\frac{9 \\left(\\frac{3 x}{2}+4\\right)}{4 \\left(1-\\frac{1}{4} (3 x+8)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(((3*x)/2)+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = acos(z)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x y)$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 y \\sqrt{\\frac{x}{y}}}-x \\sinh (x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x*y)\ng = sqrt((x/y))\nh = sqrt((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\sqrt{z^5}$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$-\\sin (x-y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = sqrt(z**5)\nh = sqrt(y-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^5}{z^5}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (z-x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z-x}-\\frac{5 x^5}{z^6},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/(z**5))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh (x+z)$", - "Output Answer": [ - "$\\text{sech}^2(x+z)+\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = y\nh = tanh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^{x y^5}$, and $h(x,y,z) = \\sqrt{y^5-x}$", - "Output Answer": [ - "$\\left\\{\\frac{5 y^4}{2 \\sqrt{y^5-x}},\\frac{1}{2 \\sqrt{y^5-x}},y^5 e^{x y^5}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**(x*y**5)\nh = math.e**(x*y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (-3 x-1)}{\\sqrt{x-8}}$\n", - "Output Answer": [ - "$\\frac{\\frac{6 (x-8)}{3 x+1}-\\log (-3 x-1)}{2 (x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(-3*x-1))/(sqrt(x-8))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{\\sin (x+z),0,-\\sin (x+z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(x+z)\nh = cos(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -e^{y-x} & e^{y-x} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y-x)\ng = tan(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},-\\sin (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sqrt{\\frac{15 x}{2}+1} \\sin (5-6 x)$\n", - "Output Answer": [ - "$\\frac{9 \\left(\\left(3600 x^2+960 x+89\\right) \\sin (5-6 x)+40 (15 x+2) \\cos (5-6 x)\\right)}{4 \\sqrt{2} (15 x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sqrt(((15*x)/2)+1)*sin(5-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{y}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z/y)\ng = log((y/z))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y^4 z}\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{x y^4}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{y^4 z^2 \\left(\\frac{x^2}{y^8 z^2}+1\\right)}+\\frac{4 x y^3 \\sec ^2\\left(\\frac{x y^4}{z}\\right)}{z},-\\frac{y^4 \\sec ^2\\left(\\frac{x y^4}{z}\\right)}{z},\\frac{1}{y^4 z \\left(\\frac{x^2}{y^8 z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = atan(x/(y**4*z))\nh = atan(x/(y**4*z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z^4$\n", - "Output Answer": [ - "$\\left\\{0,0,4 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**4\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & -\\frac{5 y^4}{\\sqrt{1-y^{10}}} & 0 \\\\\n 4 x^3 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = acos(y**5)\nh = x**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (y)$, $g(x,y,z) = \\log (z-x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cosh (y) & 0 \\\\\n -\\frac{1}{z-x} & 0 & \\frac{1}{z-x} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(y)\ng = log(z-x)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z \\left(1-\\frac{x^2}{z^2}\\right)},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = e^{x^5-y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-e^{x^5-y}-5 x^4 \\sin \\left(x^5\\right)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5)\ng = math.e**(x**5-y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y*z)\ng = y**5\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n -\\frac{1}{x^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y)\ng = y**(3/2)\nh = (1/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^3\\right)$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**3)\ng = sin(x**3)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\frac{9}{64 x^2}+e^{3 x}$\n", - "Output Answer": [ - "$\\frac{27}{1024}+\\frac{9}{2 e^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S((9/(64*x**2))+math.e**(3*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (4-8 x) \\sin (8-5 x)$\n", - "Output Answer": [ - "$\\frac{8 \\sin (8-5 x)}{4-8 x}+5 \\log (4-8 x) \\cos (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(4-8*x)*sin(8-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = x\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4 x+2)-\\tan (9 x+7)$\n", - "Output Answer": [ - "$-4 \\sin (4 x+2)-9 \\sec ^2(9 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x+2)-tan(9*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{27}{1331}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(27/1331)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^3}$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x^3}}$, and $h(x,y,z) = \\sin \\left(x^3 y\\right)$", - "Output Answer": [ - "$\\frac{1}{3 x^3 \\sqrt[3]{\\frac{y}{x^3}}^2}-\\frac{3}{x^4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**3))\ng = cbrt(y/(x**3))\nh = sin(x**3*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cosh \\left(x^2\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{17 x^4}{24}+\\frac{x^2}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cosh(x**2)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\sin (x-z)+e^x+\\frac{z}{2 \\sqrt{y z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y*z)\nh = cos(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7 x^2+9\\right)$\n", - "Output Answer": [ - "$14 \\left(\\cos \\left(7 x^2+9\\right)-14 x^2 \\sin \\left(7 x^2+9\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x**2+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (z (x+y))$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & \\frac{1}{z} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = log(z*(x+y))\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{9 x^2+8} \\cos (5-8 x)$\n", - "Output Answer": [ - "$\\frac{8 \\left(9 x^2+8\\right) \\sin (5-8 x)+9 x \\cos (5-8 x)}{\\sqrt{9 x^2+8}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(9*x**2+8)*cos(5-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{x-y}$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+y\nh = (1/(x-y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{15}{2}-9 x\\right)$\n", - "Output Answer": [ - "$-\\frac{36}{(5-6 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log((15/2)-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = y^{20}$", - "Output Answer": [ - "$380 y^{18}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**20\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (y-z)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\sec ^2(y-z) & -\\sec ^2(y-z) \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = tan(y-z)\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y^3}$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = \\sinh ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 x}{y^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(y**3))\ng = cos(y**3)\nh = cos(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\sinh (x)+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},\\frac{x}{2 \\sqrt{x z}}+\\sin (x-z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = log((z/y))\nh = log((z/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$5 y^4+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = y**5\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$, and $h(x,y,z) = \\cosh \\left(y-z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 (x+y)^{3/2}} & -\\frac{1}{2 (x+y)^{3/2}} & 0 \\\\\n -\\frac{1}{2 y \\left(\\frac{x}{y}\\right)^{3/2}} & \\frac{x}{2 y^2 \\left(\\frac{x}{y}\\right)^{3/2}} & 0 \\\\\n 0 & \\sinh \\left(y-z^4\\right) & -4 z^3 \\sinh \\left(y-z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x+y)))\ng = (1/(sqrt((x/y))))\nh = cosh(y-z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x z}{y^3}}$, $g(x,y,z) = \\sin \\left(\\frac{y^3}{z}\\right)$, and $h(x,y,z) = \\sqrt{y^3-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{2 y^3 \\sqrt{\\frac{x z}{y^3}}} & -\\frac{3 x z}{2 y^4 \\sqrt{\\frac{x z}{y^3}}} & \\frac{x}{2 y^3 \\sqrt{\\frac{x z}{y^3}}} \\\\\n 0 & \\frac{3 y^2 \\cos \\left(\\frac{y^3}{z}\\right)}{z} & -\\frac{y^3 \\cos \\left(\\frac{y^3}{z}\\right)}{z^2} \\\\\n 0 & \\frac{3 y^2}{2 \\sqrt{y^3-z}} & -\\frac{1}{2 \\sqrt{y^3-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(((x*z)/(y**3)))\ng = sin(((y**3)/z))\nh = sqrt(y**3-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(3 x^2+6\\right)+\\sqrt{-\\frac{5 x}{2}-1}$\n", - "Output Answer": [ - "$\\frac{2 x}{x^2+2}-\\frac{5}{4 \\sqrt{-\\frac{5 x}{2}-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x**2+6)+sqrt(-((5*x)/2)-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{e^{7 x+1}}$\n", - "Output Answer": [ - "$\\frac{49}{4} \\sqrt{e^{7 x+1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(math.e**(7*x+1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{z^4}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sinh ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{z^4} & -\\frac{4 y}{z^5} \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\frac{4 z^3}{\\sqrt{z^8+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/(z**4))\ng = y**3\nh = asinh(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{-9 x-7}$\n", - "Output Answer": [ - "$-\\frac{162}{(9 x+7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(-9*x-7))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(4-2 x^2\\right)-\\frac{1}{(2 x-8)^2}$\n", - "Output Answer": [ - "$\\frac{1}{2 (x-4)^3}-4 x \\cos \\left(4-2 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4-2*x**2)-(1/((2*x-8)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = y$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\{z,0,-\\cos (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\tan ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n 4 x^3 & 0 & 0 \\\\\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = x**4\nh = atan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^{x/2}$ on the interval $x = 0$ to $x = 0$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x/2)\na = 0\nb = 0\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{\\frac{13 x}{3}+\\frac{14}{3}}-\\log (3)$\n", - "Output Answer": [ - "$-\\frac{13}{3} e^{\\frac{13 x}{3}+\\frac{14}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(((13*x)/3)+(14/3))-log(3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{z}\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = x^4 z^4$", - "Output Answer": [ - "$\\left\\{0,-4 x^3 z^4-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},-\\frac{1}{z \\sqrt{1-\\frac{y^2}{z^2}}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y/z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$40 x^4$\n", - "Output Answer": [ - "$8 x^5$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 40*x**4\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(3 x^2\\right)-\\tan (5 x+5)$\n", - "Output Answer": [ - "$\\frac{6 \\left(9 x^4+1\\right)}{\\left(1-9 x^4\\right)^{3/2}}-50 \\tan (5 (x+1)) \\sec ^2(5 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(3*x**2)-tan(5*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**y\nh = atan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{z^2}{y^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z^2}{y^3},-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x-y)^{3/2}}$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{3}{2 (x-y)^{5/2}} & \\frac{3}{2 (x-y)^{5/2}} & 0 \\\\\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((x-y)**(3/2)))\nh = tan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x-2)^2 \\left(-1+\\tan ^3(2)+\\tan (2)\\right)+(x-2) \\left(\\tan ^2(2)-3\\right)-4+\\tan (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**2\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = acos(y)\nh = y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = log(y)\nh = x**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (9 x+3)$\n", - "Output Answer": [ - "$-81 \\sin (9 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(9*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x-y}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = y\nh = math.e**(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$e^{2 x}$\n", - "Output Answer": [ - "$\\frac{2}{e^{10}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(2*x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(z-y)^2}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{2}{(z-y)^3} & -\\frac{2}{(z-y)^3} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((z-y)**2))\ng = asin(y)\nh = (x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^2 y-z\\right)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z}},-\\frac{1}{\\sqrt{\\left(x^2 y-z\\right)^2+1}}-2 x,-\\frac{x^2}{\\sqrt{\\left(x^2 y-z\\right)^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x**2*y-z)\ng = sqrt(z)\nh = sqrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y^3}$, $g(x,y,z) = x y^3$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y^3} & 3 y^2 e^{x+y^3} & 0 \\\\\n y^3 & 3 x y^2 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y**3)\ng = x*y**3\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(8 x+\\frac{13}{2}\\right)^2-e^{\\frac{15 x^2}{2}-9}$\n", - "Output Answer": [ - "$\\left(128-15 e^{\\frac{15 x^2}{2}-9}\\right) x+104$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((8*x+(13/2))**2-math.e**(((15*x**2)/2)-9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(6-\\frac{15 x}{2}\\right)-e^{\\frac{17}{2}-\\frac{11 x}{2}}$\n", - "Output Answer": [ - "$-\\frac{121}{4} e^{\\frac{17}{2}-\\frac{11 x}{2}}-\\frac{225}{4} \\sin \\left(6-\\frac{15 x}{2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(6-((15*x)/2))-math.e**((17/2)-((11*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{79 (x-5)^2}{40 \\sqrt{5} e^5}-\\frac{9 (x-5)}{2 \\sqrt{5} e^5}+\\frac{\\sqrt{5}}{e^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y+z)\ng = (1/(y**(3/2)))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(-\\frac{x}{2}-2\\right)-e^{2-\\frac{x^2}{2}}$\n", - "Output Answer": [ - "$e^{2-\\frac{x^2}{2}} x+\\frac{1}{\\sqrt{-x^2-8 x-12}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(acos(-(x/2)-2)-math.e**(2-((x**2)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{z}}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\frac{1}{2 z \\left(\\frac{y}{z}\\right)^{3/2}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = (1/(sqrt((y/z))))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{1}{2}-x^2\\right)$\n", - "Output Answer": [ - "$2 \\sin \\left(\\frac{1}{2}-x^2\\right)-4 x^2 \\cos \\left(\\frac{1}{2}-x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((1/2)-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{31}{31 x-12}$\n", - "Output Answer": [ - "$\\log (31 x-12)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (31/(31*x-12))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\begin{cases}\n \\sqrt[3]{x}-x^3 & x>0 \\\\\n -x^3-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = x**3\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z^5}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n -\\frac{1}{x^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sin(y)\nh = (1/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x-y)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},0,\\text{sech}^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x-y)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-24 e^{\\frac{2}{5}-\\frac{24 x^5}{5}} x^4-\\frac{111 x^2}{10 \\sqrt{-\\frac{37 x^3}{5}-\\frac{31}{5}}}$\n", - "Output Answer": [ - "$\\sqrt{-\\frac{37 x^3}{5}-\\frac{31}{5}}+e^{\\frac{2}{5}-\\frac{24 x^5}{5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -24*math.e**((2/5)-((24*x**5)/5))*x**4-((111*x**2)/(10*sqrt(-((37*x**3)/5)-(31/5))))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z}-3 x^2,-\\frac{1}{x^2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/x))\ng = (1/(x*y))\nh = (1/(x*y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (2 x+8)-\\cos \\left(1-3 x^2\\right)$\n", - "Output Answer": [ - "$2 \\left(\\sec ^2(2 (x+4))-3 x \\sin \\left(1-3 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(2*x+8)-cos(1-3*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (z/y)\nh = (1/(sqrt(x)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-y}$, $g(x,y,z) = x-y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-y}^2} & -\\frac{1}{3 \\sqrt[3]{x-y}^2} & 0 \\\\\n 1 & -1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-y)\ng = x-y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z}$, $g(x,y,z) = y$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/z)\ng = y\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin (3 x)$ on the interval $x = 0$ to $x = 8$\n", - "Output Answer": [ - "$\\frac{1}{3} \\sqrt{10} \\left(14 E\\left(\\frac{9}{10}\\right)+E\\left(24-7 \\pi \\left|\\frac{9}{10}\\right.\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3*x)\na = 0\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{\\left(x-y^2\\right)^5}{z^5}$", - "Output Answer": [ - "$\\frac{30 \\left(x-y^2\\right)^5}{z^7}-\\frac{10 \\left(x-y^2\\right)^4}{z^5}+\\frac{80 y^2 \\left(x-y^2\\right)^3}{z^5}+\\frac{20 \\left(x-y^2\\right)^3}{z^5}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x-y**2)**5)/(z**5))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{z^3}{x}\\right)$", - "Output Answer": [ - "$-\\frac{z^6}{2 x^4 \\left(\\frac{z^3}{x}-1\\right)^{3/2} \\sqrt{\\frac{z^3}{x}+1}}-\\frac{z^6}{2 x^4 \\sqrt{\\frac{z^3}{x}-1} \\left(\\frac{z^3}{x}+1\\right)^{3/2}}-\\frac{9 z^4}{2 x^2 \\left(\\frac{z^3}{x}-1\\right)^{3/2} \\sqrt{\\frac{z^3}{x}+1}}-\\frac{9 z^4}{2 x^2 \\sqrt{\\frac{z^3}{x}-1} \\left(\\frac{z^3}{x}+1\\right)^{3/2}}+\\frac{2 z^3}{x^3 \\sqrt{\\frac{z^3}{x}-1} \\sqrt{\\frac{z^3}{x}+1}}+\\frac{6 z}{x \\sqrt{\\frac{z^3}{x}-1} \\sqrt{\\frac{z^3}{x}+1}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh((z**3)/x)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x^2-6}$\n", - "Output Answer": [ - "$4 e^{2 x^2-6} \\left(4 x^2+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x**2-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{5 x^4}{2}-\\frac{13}{2}}-\\log (-6 x-4)$\n", - "Output Answer": [ - "$10 e^{\\frac{5 x^4}{2}-\\frac{13}{2}} x^3-\\frac{3}{3 x+2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((5*x**4)/2)-(13/2))-log(-6*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin \\left(x^3-y\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(x^3-y\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -3 x^2 \\cos \\left(x^3-y\\right) & \\cos \\left(x^3-y\\right) & 0 \\\\\n \\frac{3 x^2}{\\left(x^3-y\\right)^2+1} & -\\frac{1}{\\left(x^3-y\\right)^2+1} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = -sin(x**3-y)\ng = atan(x**3-y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\log (z (x-y))$", - "Output Answer": [ - "$\\frac{1}{1-y^2}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = atanh(y)\nh = log(z*(x-y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-4 x}-\\sqrt{7-3 x}$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{7-3 x}}-\\frac{1}{\\sqrt{2-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-4*x)-sqrt(7-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\frac{23}{8} (x-1)^2+\\frac{7 (x-1)}{2}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**3\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2-8 x^4\\right)-e^{x-6}$\n", - "Output Answer": [ - "$32 x^3 \\sin \\left(2-8 x^4\\right)-e^{x-6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(2-8*x**4)-math.e**(x-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4 x^5-4}-\\log (-2 x-2)$\n", - "Output Answer": [ - "$\\frac{5 x^4}{\\sqrt{x^5-1}}-\\frac{1}{x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4*x**5-4)-log(-2*x-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$-\\frac{x^8}{40320}-\\frac{x^7}{5040}+\\frac{x^6}{720}+\\frac{x^5}{120}-\\frac{x^4}{24}-\\frac{x^3}{6}+\\frac{x^2}{2}+x-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\sqrt{6-5 x}\\right)+\\sin (1-2 x)$\n", - "Output Answer": [ - "$\\frac{5}{2 (5 x-6)}-2 \\cos (1-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(sqrt(6-5*x))+sin(1-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 x^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x^3-y-z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x^2}{x^3-y-z},-\\frac{1}{x^3-y-z},-\\frac{1}{x^3-y-z}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**3-y-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^3\\right)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x+2) \\left(12 e^2 \\sin (8)-e^2 \\cos (8)\\right)+e^2 \\cos (8)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(y+z)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = asin(y+z)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{17 x^2}{2}-2\\right)-\\log \\left(\\frac{7}{2}-6 x\\right)$\n", - "Output Answer": [ - "$\\frac{34 x}{17 x^2-4}+\\frac{12}{7-12 x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((17*x**2)/2)-2)-log((7/2)-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x^4$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x**4\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = -\\tanh (x-z)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n -\\text{sech}^2(x-z) & 0 & \\text{sech}^2(x-z) \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = -tanh(x-z)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{1}{\\left(\\frac{x}{2}-\\frac{5}{2}\\right)^3}-\\sin (8-2 x)$\n", - "Output Answer": [ - "$4 \\sin (8-2 x)-\\frac{96}{(x-5)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(1/(((x/2)-(5/2))**3))-sin(8-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6-2 x^4\\right)+e^{8 x+3}$\n", - "Output Answer": [ - "$8 \\left(3 x^2 \\sin \\left(6-2 x^4\\right)-8 x^6 \\cos \\left(6-2 x^4\\right)+8 e^{8 x+3}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(6-2*x**4)+math.e**(8*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sin ^{-1}(x y)$, and $h(x,y,z) = y^5 z^5$", - "Output Answer": [ - "$\\left\\{5 y^4 z^5,0,\\frac{y}{\\sqrt{1-x^2 y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = asin(x*y)\nh = asin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sin ^{-1}(x+z)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n \\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n -\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}} & 0 & \\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = asin(x+z)\nh = asin(z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = -\\sin ^{-1}\\left(y^3-z\\right)$, and $h(x,y,z) = e^{\\frac{y^3}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & -\\frac{3 y^2}{\\sqrt{1-\\left(y^3-z\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(y^3-z\\right)^2}} \\\\\n 0 & \\frac{3 y^2 e^{\\frac{y^3}{z}}}{z} & -\\frac{y^3 e^{\\frac{y^3}{z}}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = -asin(y**3-z)\nh = math.e**((y**3)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^3}$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\tan ^{-1}\\left(x^3+y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{x^4} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n \\frac{3 x^2}{\\left(x^3+y\\right)^2+1} & \\frac{1}{\\left(x^3+y\\right)^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**3))\ng = cbrt(y+z)\nh = atan(x**3+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x+z^4\\right)$, $g(x,y,z) = \\cos \\left(x+z^4\\right)$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left\\{4 z^3 \\sin \\left(x+z^4\\right),4 z^3 \\cos \\left(x+z^4\\right)-e^x,-\\sin \\left(x+z^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z**4)\ng = cos(x+z**4)\nh = cos(x+z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{4}{81} (x+1)^3+\\frac{2}{9} (x+1)^2-\\frac{4 (x+1)}{3}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left\\{z,0,-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-y)^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{0,3 (z-y)^2-\\cos (x),3 (z-y)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-y)**3\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(5-8 x) \\cos \\left(8 x^5+8\\right)$\n", - "Output Answer": [ - "$40 x^4 (8 x-5) \\sin \\left(8 \\left(x^5+1\\right)\\right)-8 \\cos \\left(8 \\left(x^5+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((5-8*x)*cos(8*x**5+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2 x \\cos \\left(x^2\\right)-\\frac{1}{2 y^{3/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = (1/(sqrt(y)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\log \\left(x^4\\right)$", - "Output Answer": [ - "$\\frac{1}{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = log(x**4)\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\cosh ^{-1}(x)$", - "Output Answer": [ - "$x^2+\\left(i x-\\frac{i \\pi }{2}\\right) (-1)^{\\left\\lfloor \\frac{\\arg (x)}{2 \\pi }\\right\\rfloor }$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = acosh(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos(x+z)\nh = atan(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\left(\\frac{z}{x}\\right)^{3/2}$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (z/x)**(3/2)\nh = tan((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\sqrt{z \\left(x^2+y\\right)}$, and $h(x,y,z) = \\log (y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y+z}-\\frac{x^2+y}{2 \\sqrt{z \\left(x^2+y\\right)}},1,\\frac{x z}{\\sqrt{z \\left(x^2+y\\right)}}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = sqrt(z*(x**2+y))\nh = sqrt(z*(x**2+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan \\left(7 x^2+8\\right)}{(3-x)^4}$\n", - "Output Answer": [ - "$\\frac{2 \\left(\\sin \\left(2 \\left(7 x^2+8\\right)\\right)-7 (x-3) x\\right) \\sec ^2\\left(7 x^2+8\\right)}{(x-3)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(7*x**2+8))/((3-x)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = log(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = (y-x)^2$, and $h(x,y,z) = y$", - "Output Answer": [ - "$2 (y-x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = (y-x)**2\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x^3-3}$\n", - "Output Answer": [ - "$\\frac{3 x \\left(x^3-12\\right)}{4 \\left(x^3-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x**3-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x},\\frac{1}{2 \\sqrt{x+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(x+y)\nh = sqrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2} & -\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos((z/y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (6-x)-\\tan (5-x)$\n", - "Output Answer": [ - "$\\sec ^2(5-x)-\\sec ^2(6-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(6-x)-tan(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{0,\\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2}-1,\\sec ^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/z))\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = \\frac{1}{(x+z)^{3/2}}$", - "Output Answer": [ - "$3 x^2-\\frac{3}{2 (x+y)^{5/2}}-\\frac{3}{2 (x+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/((x+y)**(3/2)))\nh = (1/((x+z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^4\\right)$ and $g(x) = $\\tan \\left(x^4\\right)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**4)\ng = tan(x**4)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**y\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(4-2 x^2\\right)^3}-\\frac{1}{\\left(-3 x^3-3\\right)^2}$\n", - "Output Answer": [ - "$6 x \\left(\\frac{x}{9 \\left(x^3+1\\right)^3}+\\frac{1}{8 \\left(x^2-2\\right)^4}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((4-2*x**2)**3))-(1/((-3*x**3-3)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(5 x^2+5\\right)+\\sin (5)$\n", - "Output Answer": [ - "$10 x \\cos \\left(5 \\left(x^2+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(5*x**2+5)+sin(5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{z^2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 0 & \\frac{z}{\\sqrt{z^2}} \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sqrt(z**2)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-4 x-7)+\\cos (2)$\n", - "Output Answer": [ - "$-\\frac{16}{(4 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x-7)+cos(2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\tan ^{-1}(x-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = atan(x-z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\sqrt{\\frac{y}{x}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/x)\nh = sqrt((y/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$32 (x+2)^2 (\\sinh (2)+\\cosh (2))+(x+2) (-16 \\sinh (2)-32 \\cosh (2))+16 \\cosh (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = cosh(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1-\\frac{x}{3 \\sqrt[3]{x z}^2},0,\\frac{z}{3 \\sqrt[3]{x z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cbrt(x*z)\nh = cbrt(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\left(6-6 x^3\\right)^4 \\sin (2-x)$\n", - "Output Answer": [ - "$\\left(6-6 x^3\\right)^3 \\left(72 x^2 \\sin (2-x)-6 \\left(x^3-1\\right) \\cos (2-x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(6-6*x**3)**4*sin(2-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n \\frac{y \\sin \\left(\\frac{y}{x}\\right)}{x^2} & -\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = cos((y/x))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x}{y^4}-z}$", - "Output Answer": [ - "$\\frac{16 x^2 e^{\\frac{x}{y^4}-z}}{y^{10}}+\\frac{20 x e^{\\frac{x}{y^4}-z}}{y^6}+e^{\\frac{x}{y^4}-z}+\\frac{e^{\\frac{x}{y^4}-z}}{y^8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x/(y**4))-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(\\cos (6-x))-\\log \\left(-4 x^2-7\\right)$\n", - "Output Answer": [ - "$\\frac{2 \\sin (6-x)}{\\cos (2 (x-6))+3}-\\frac{8 x}{4 x^2+7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(cos(6-x))-log(-4*x**2-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-5) (10 \\sin (5)+25 \\cos (5))+25 \\sin (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = sin(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{y z}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/y)\ng = sqrt(y*z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^{x y-z}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$x e^{x y-z}+\\frac{1}{x}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = math.e**(x*y-z)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6} \\sqrt{x}-\\frac{1}{(2 x-8)^5}$\n", - "Output Answer": [ - "$\\frac{1}{16} \\left(-\\frac{4 \\sqrt{6}}{x^{3/2}}-\\frac{15}{(x-4)^7}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6)*sqrt(x)-(1/((2*x-8)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x+z^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\left(x+z^2\\right)^2},0,-\\frac{2 z}{\\left(x+z^2\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+z**2))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}},\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y+z},x,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = log(y+z)\nh = log(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-1}-\\sin ^{-1}(5-6 x)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{2 x-1}}+\\frac{6}{\\sqrt{1-(5-6 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-1)-asin(5-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x+z},\\frac{x}{3 \\sqrt[3]{x z}^2}-\\frac{1}{z},\\frac{1}{x+z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z)\ng = log(x+z)\nh = log(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^2}$, $g(x,y,z) = \\left(y^5-x^2\\right)^4$, and $h(x,y,z) = \\frac{z^2}{y^{10}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{x}{\\sqrt{x^2}} & 0 & 0 \\\\\n -8 x \\left(y^5-x^2\\right)^3 & 20 y^4 \\left(y^5-x^2\\right)^3 & 0 \\\\\n 0 & -\\frac{10 z^2}{y^{11}} & \\frac{2 z}{y^{10}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**2)\ng = (y**5-x**2)**4\nh = ((z**2)/(y**10))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{13}{2}-9 x}+\\log \\left(\\frac{13 x}{2}-\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{13}{13 x-7}-9 e^{\\frac{13}{2}-9 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((13/2)-9*x)+log(((13*x)/2)-(7/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**2))\ng = sqrt(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x y+z$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n y & x & 1 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x*y+z\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\log \\left(x^4\\right)$", - "Output Answer": [ - "$(x-4) \\left(e^4+8 e^4 \\log (2)\\right)+8 e^4 \\log (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = log(x**4)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\sin (x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = x**(3/2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y^3}+z^5\\right)$", - "Output Answer": [ - "$-\\frac{9 x^2 \\sin \\left(\\frac{x}{y^3}+z^5\\right)}{y^8}-25 z^8 \\sin \\left(\\frac{x}{y^3}+z^5\\right)-\\frac{\\sin \\left(\\frac{x}{y^3}+z^5\\right)}{y^6}+20 z^3 \\cos \\left(\\frac{x}{y^3}+z^5\\right)+\\frac{12 x \\cos \\left(\\frac{x}{y^3}+z^5\\right)}{y^5}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/(y**3))+z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(\\frac{1}{2}-4 x\\right) \\tan \\left(2 x+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$\\left(-2 \\cos \\left(\\frac{1}{2}-4 x\\right)-\\cos \\left(8 x+\\frac{21}{2}\\right)+\\cos \\left(\\frac{23}{2}\\right)\\right) \\sec ^2\\left(2 x+\\frac{11}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos((1/2)-4*x)*tan(2*x+(11/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$(x+5)^2 \\left(-1-\\tan ^3(5)-\\tan (5)\\right)+(x+5) \\left(11+\\tan ^2(5)\\right)-25-\\tan (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\cosh (y-z)$", - "Output Answer": [ - "$\\left\\{\\sinh (y-z),0,-\\frac{1}{y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-2 x-4}-\\frac{1}{(3 x+9)^4}$\n", - "Output Answer": [ - "$\\frac{4}{81 (x+3)^5}-\\frac{1}{\\sqrt{-2 x-4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-2*x-4)-(1/((3*x+9)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x-z)$, $g(x,y,z) = x$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{0,-\\sinh (x-z)-z,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x-z)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\sin (y)-3 z^2 \\sin \\left(z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y)\nh = cos(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = -\\tanh (x-y)$, and $h(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\text{sech}^2(x-y)-\\frac{\\sin \\left(\\frac{z}{x}\\right)}{x}+e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = -tanh(x-y)\nh = cos((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\frac{3}{16} (x-2)^2+\\frac{2-x}{4}+\\frac{1}{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = x**3\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y z)^{3/2}}$, $g(x,y,z) = z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3 z}{2 (y z)^{5/2}} & -\\frac{3 y}{2 (y z)^{5/2}} \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y*z)**(3/2)))\ng = z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos \\left(x^3\\right)$", - "Output Answer": [ - "$\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cos(x**3)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-\\frac{x}{2}}+\\log \\left(\\frac{13}{2}-\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{15}{15 x-13}-\\frac{1}{2} e^{1-\\frac{x}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-(x/2))+log((13/2)-((15*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z^5}{x^5}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 z^5}{x^6} & 0 & \\frac{5 z^4}{x^5} \\\\\n 0 & 4 y^3 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((z**5)/(x**5))\ng = y**4\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (1-4 x)+1$\n", - "Output Answer": [ - "$4 \\sin (1-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(1-4*x)+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2+z$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x^2+y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 1 \\\\\n 0 & 1 & 0 \\\\\n \\frac{x}{\\sqrt{x^2+y+z}} & \\frac{1}{2 \\sqrt{x^2+y+z}} & \\frac{1}{2 \\sqrt{x^2+y+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2+z\ng = y\nh = sqrt(x**2+y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{\\frac{z}{x^3}}$, and $h(x,y,z) = \\log (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n -\\frac{3 z}{2 x^4 \\sqrt{\\frac{z}{x^3}}} & 0 & \\frac{1}{2 x^3 \\sqrt{\\frac{z}{x^3}}} \\\\\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sqrt((z/(x**3)))\nh = log(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(z-y)^{3/2}}$, $g(x,y,z) = y^5$, and $h(x,y,z) = y$", - "Output Answer": [ - "$5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z-y)**(3/2)))\ng = y**5\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (7 x+7)$\n", - "Output Answer": [ - "$-49 \\sin (7 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(3-6 x) \\tan (4-9 x)$\n", - "Output Answer": [ - "$-\\frac{6 \\tan (4-9 x)}{(3-6 x)^2+1}-9 \\tan ^{-1}(3-6 x) \\sec ^2(4-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(3-6*x)*tan(4-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$e^y-\\frac{2}{z^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/z))\ng = math.e**y\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(2 x+8) \\cos \\left(7-x^5\\right)$\n", - "Output Answer": [ - "$5 x^4 \\sin ^{-1}(2 x+8) \\sin \\left(7-x^5\\right)+\\frac{2 \\cos \\left(7-x^5\\right)}{\\sqrt{1-4 (x+4)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(2*x+8)*cos(7-x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z)\ng = math.e**y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = y+z^3$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z^3}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & 1 & 3 z^2 \\\\\n \\frac{1}{3 z^3 \\sqrt[3]{\\frac{x}{z^3}}^2} & 0 & -\\frac{x}{z^4 \\sqrt[3]{\\frac{x}{z^3}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = y+z**3\nh = cbrt(x/(z**3))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{-\\frac{5 x^2}{2}-1} \\tan (2-9 x)$\n", - "Output Answer": [ - "$e^{-\\frac{5 x^2}{2}-1} \\left(5 x \\tan (2-9 x)+9 \\sec ^2(2-9 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(-((5*x**2)/2)-1)*tan(2-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8-\\frac{3 x}{2}\\right)-\\sin \\left(\\frac{11}{2}-\\frac{3 x^2}{2}\\right)$\n", - "Output Answer": [ - "$9 x^2 \\sin \\left(\\frac{1}{2} \\left(11-3 x^2\\right)\\right)+3 \\cos \\left(\\frac{1}{2} \\left(11-3 x^2\\right)\\right)-\\frac{9}{(16-3 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8-((3*x)/2))-sin((11/2)-((3*x**2)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{y^5}{x}$, and $h(x,y,z) = \\frac{1}{\\left(y^5 z\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n -\\frac{y^5}{x^2} & \\frac{5 y^4}{x} & 0 \\\\\n 0 & -\\frac{15 y^4 z}{2 \\left(y^5 z\\right)^{5/2}} & -\\frac{3 y^5}{2 \\left(y^5 z\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = ((y**5)/x)\nh = (1/((y**5*z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\cos (y+z)+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(x*z)\nh = sin(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(\\frac{17 x^2}{2}+7\\right)+7 x-\\frac{13}{2}$\n", - "Output Answer": [ - "$17 x \\sin \\left(\\frac{17 x^2}{2}+7\\right)+7$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(((17*x**2)/2)+7)+7*x-(13/2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x+y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{(x+y)^3}{z^5 \\left(1-\\frac{(x+y)^2}{z^2}\\right)^{3/2}}-\\frac{2 (x+y)}{z^3 \\sqrt{1-\\frac{(x+y)^2}{z^2}}}-\\frac{2 (x+y)}{z^3 \\left(1-\\frac{(x+y)^2}{z^2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos((x+y)/z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\frac{1}{(x y)^{3/2}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n -\\frac{3 y}{2 (x y)^{5/2}} & -\\frac{3 x}{2 (x y)^{5/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = (1/((x*y)**(3/2)))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{128 x^3}{\\left(8 x^4+7\\right)^5}$\n", - "Output Answer": [ - "$\\frac{1}{\\left(8 x^4+7\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((128*x**3)/((8*x**4+7)**5))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = math.e**z\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{z}}$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/z))\ng = cbrt(x*z)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{9 x}{2}-\\frac{15}{2}}-\\sin (7 x+4)$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{2 x-\\frac{10}{3}}}-7 \\cos (7 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((9*x)/2)-(15/2))-sin(7*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^2}$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$\\left(\\frac{1}{\\sqrt{17}}-\\frac{\\sqrt[3]{2}}{3}\\right) (x+4)+2 \\sqrt[3]{2}-\\sinh ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**2)\ng = asinh(x)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\sqrt{x^3}$", - "Output Answer": [ - "$\\sqrt{x} \\sqrt{x^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = sqrt(x**3)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = y^2$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = tan(x)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & -\\frac{2}{(y+z)^3} & -\\frac{2}{(y+z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = atan(y)\nh = (1/((y+z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = (x+y)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 \\sqrt{x+y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (x+y)**(3/2)\nh = (x+y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z \\sqrt{\\frac{y}{z}}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{x+z}}-\\cos (x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\sqrt{x^4}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = sqrt(x**4)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 x \\sqrt{\\frac{z}{x}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{e^{-6 x-9}}{(x-4)^4}$\n", - "Output Answer": [ - "$\\frac{4 e^{-6 x-9} \\left(9 x^2-60 x+101\\right)}{(x-4)^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(-6*x-9))/((x-4)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = e^{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & -e^{z-y} & e^{z-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = tan(z)\nh = math.e**(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (8 x+6)-\\cos (7-7 x)$\n", - "Output Answer": [ - "$49 \\cos (7-7 x)+128 \\tan (8 x+6) \\sec ^2(8 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8*x+6)-cos(7-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(3 x^4+1\\right)+x-7$\n", - "Output Answer": [ - "$36 x^2 \\left(8 x^4 \\tan \\left(3 x^4+1\\right)+1\\right) \\sec ^2\\left(3 x^4+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(3*x**4+1)+x-7\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(3-9 x^5\\right) \\tan (5-7 x)$\n", - "Output Answer": [ - "$7 \\cos \\left(3-9 x^5\\right) \\sec ^2(5-7 x)-45 x^4 \\sin \\left(3-9 x^5\\right) \\tan (5-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(3-9*x**5)*tan(5-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z/x)\ng = cbrt(x*z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z-x}^2}+\\frac{1}{y},\\frac{z}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-z}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{1}{(x-z)^2}+4 y^3+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-z))\ng = y**4\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cosh \\left(y^3\\right)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 3 y^2 \\sinh \\left(y^3\\right) & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = cosh(y**3)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x^3}}}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = x^9 z^3$", - "Output Answer": [ - "$3 x^9 z^2+\\frac{3 z}{2 x^4 \\left(\\frac{z}{x^3}\\right)^{3/2}}+\\sinh (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((z/(x**3)))))\ng = cosh(y)\nh = x**9*z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = y^2-x$", - "Output Answer": [ - "$\\cos (x)-2 y \\sin \\left(y^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y**2)\nh = y**2-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{(x+z)^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{2}{(x+z)^3},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (6-9 x)$\n", - "Output Answer": [ - "$-81 \\sin (6-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^4}$, $g(x,y,z) = \\cos ^{-1}\\left(x+y^4\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{4 y^3}{\\sqrt{1-\\left(x+y^4\\right)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**4)\ng = acos(x+y**4)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4 z^4$, $g(x,y,z) = z$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$4 x^3 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4*z**4\ng = z\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\frac{x^5}{z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n \\frac{5 x^4}{z^5} & 0 & -\\frac{5 x^5}{z^6} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = asinh(y)\nh = ((x**5)/(z**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}\\left(x^5\\right)$ and $g(x) = $x^5$", - "Output Answer": [ - "$-\\frac{3357088 (x+2)^2}{42025}+\\frac{16416 (x+2)}{205}-32-\\tan ^{-1}(32)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x**5)\ng = x**5\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y^5}$, $g(x,y,z) = y^5+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-1,0,-\\frac{5 x y^4}{2 \\sqrt{x y^5}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y**5)\ng = y**5+z\nh = y**5+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5-x$, $g(x,y,z) = \\frac{1}{(x+z)^2}$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5-x\ng = (1/((x+z)**2))\nh = sin((x/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{5 x}{2}-\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{125 (x-3)}{\\left(-25 x^2+150 x-221\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(((5*x)/2)-(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{-1,-\\cos \\left(\\frac{x}{y}-z\\right),\\frac{x \\cos \\left(\\frac{x}{y}-z\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/y)-z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}\\left(x^4\\right)$ and $g(x) = $\\cosh ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x**4)\ng = acosh(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,\\cos (x)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-2 x}+i \\pi +\\log (7)$\n", - "Output Answer": [ - "$-\\frac{1}{(1-2 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-2*x)+1j*pi+log(7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cos (x+y+z)$", - "Output Answer": [ - "$\\{-\\sin (x+y+z),\\sin (x+y+z)+1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (\\tan (1-7 x))-\\frac{1}{(1-8 x)^2}$\n", - "Output Answer": [ - "$\\frac{16}{(8 x-1)^3}-7 \\sec ^2(1-7 x) \\sec ^2(\\tan (1-7 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(tan(1-7*x))-(1/((1-8*x)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = y\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\cos ^{-1}(y+z)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(y+z)^2}}+\\frac{1}{y}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = acos(y+z)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^3+8}-\\cos ^{-1}\\left(7-4 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{15 x^2}{2 \\sqrt{5 x^3+8}}-\\frac{8 x}{\\sqrt{1-\\left(7-4 x^2\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**3+8)-acos(7-4*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x+y)$, $g(x,y,z) = \\sqrt{\\frac{z}{y}}$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\left\\{2 y-\\frac{1}{2 y \\sqrt{\\frac{z}{y}}},0,-\\frac{1}{\\sqrt{x+y-1} \\sqrt{x+y+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x+y)\ng = sqrt((z/y))\nh = sqrt((z/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{36 x}{5}+8\\right)$\n", - "Output Answer": [ - "$\\frac{2592}{25} \\tan \\left(\\frac{36 x}{5}+8\\right) \\sec ^2\\left(\\frac{36 x}{5}+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(((36*x)/5)+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (7 x-2)$\n", - "Output Answer": [ - "$-\\frac{49}{(2-7 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(7*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{1}{x^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n -\\frac{4}{x^5} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**2))\ng = y**(3/2)\nh = (1/(x**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (5-4 x) \\sin (x+8)$\n", - "Output Answer": [ - "$\\frac{1}{2} (25 \\cos (5 x+3)-9 \\cos (13-3 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(5-4*x)*sin(x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x z}{y}\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{y \\sqrt{1-\\frac{x^2 z^2}{y^2}}} & -\\frac{x z}{y^2 \\sqrt{1-\\frac{x^2 z^2}{y^2}}} & \\frac{x}{y \\sqrt{1-\\frac{x^2 z^2}{y^2}}} \\\\\n -\\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}} & \\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin((x*z)/y)\ng = asin(y/x)\nh = sqrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^4$, $g(x,y,z) = e^{y^4}$, and $h(x,y,z) = \\tanh ^{-1}\\left(\\frac{z}{y^4}\\right)$", - "Output Answer": [ - "$\\frac{1}{y^4 \\left(1-\\frac{z^2}{y^8}\\right)}+4 e^{y^4} y^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**4\ng = math.e**(y**4)\nh = atanh(z/(y**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = y^4+z$", - "Output Answer": [ - "$1-\\sin (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**z\nh = y**4+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(3-3 x^4\\right)+\\tan (2-8 x)$\n", - "Output Answer": [ - "$-\\frac{12 x^3}{\\sqrt{-9 x^8+18 x^4-8}}-8 \\sec ^2(2-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(3-3*x**4)+tan(2-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (1-4 x)+1$\n", - "Output Answer": [ - "$-4 \\cos (1-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(1-4*x)+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\cos \\left(x^4+z^3\\right)$, and $h(x,y,z) = z^{12}$", - "Output Answer": [ - "$\\frac{2 x^3}{\\sqrt{x^4}}+12 z^{11}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**4)\ng = cos(x**4+z**3)\nh = z**12\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(z^5-y\\right)$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z^5-y},\\frac{5 z^4}{z^5-y}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z**5-y)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z},0,-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x+z}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (x+z)^{3/2}},0,-\\frac{1}{2 (x+z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (1/(sqrt(x+z)))\nh = (1/(sqrt(x+z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\log (y-x)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{y-x}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = log(y-x)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\frac{1}{y^3}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = (1/(y**3))\nh = (1/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = y\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-z^5$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\frac{1}{x-y-z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & -5 z^4 \\\\\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n -\\frac{1}{\\left(x-y-z^5\\right)^2} & \\frac{1}{\\left(x-y-z^5\\right)^2} & \\frac{5 z^4}{\\left(x-y-z^5\\right)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-z**5\ng = sqrt(x+y)\nh = (1/(x-y-z**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^4$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**4\ng = math.e**y\nh = tan(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x z}{y}\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x}+e^y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((x*z)/y))\ng = math.e**y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\log \\left(y-z^5\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(y+z^5\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{5 z^4}{y-z^5}-\\frac{1}{\\sqrt{1-\\left(y+z^5\\right)^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**4)\ng = log(y-z**5)\nh = log(y-z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+z)^2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},-\\frac{2}{(x+z)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+z)**2))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-5 x^5-3 x+5$\n", - "Output Answer": [ - "$-25 x^4-3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-5*x**5-3*x+5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(y)\nh = (x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (3 x)$ on the interval $x = 5$ to $x = 11$\n", - "Output Answer": [ - "$\\int_5^{11} \\sqrt{9 \\sec ^4(3 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x)\na = 5\nb = 11\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3+y$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{y \\left(-e^{y z}\\right),0,-1\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3+y\ng = math.e**(y*z)\nh = math.e**(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = (1/(sqrt(y)))\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\{\\sin (x+z),0,-\\sin (x+z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(x+z)\nh = cos(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left\\{0,-4 x^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}+\\frac{1}{3 y \\sqrt[3]{\\frac{z}{y}}^2}+\\cos (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sin(y+z)\nh = cbrt(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{z^8}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & -\\frac{8}{z^9} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = x\nh = (1/(z**8))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y-x}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y-x)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^5$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\cosh (y)$", - "Output Answer": [ - "$\\left\\{\\sinh (y),0,5 (x-y)^4-\\sin (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**5\ng = cos(x-y)\nh = cos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$\\left\\{0,-e^{x+z},-\\frac{x}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^4}{x^4+y}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 x^3 z^4}{\\left(x^4+y\\right)^2},-\\frac{z^4}{\\left(x^4+y\\right)^2},\\frac{4 z^3}{x^4+y}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**4)/(x**4+y))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\sqrt{x^3}$", - "Output Answer": [ - "$\\frac{5}{32} (x-4)^3+\\frac{15}{4} (x-4)^2+20 (x-4)+32$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = sqrt(x**3)\nseries = f.subs(x, g).series(x, 4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x^5\\right)^{3/2}}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**5)**(3/2)))\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4-6 x) \\left(-\\tan ^{-1}(9-7 x)\\right)$\n", - "Output Answer": [ - "$\\frac{7 \\log (4-6 x)}{(9-7 x)^2+1}+\\frac{3 \\tan ^{-1}(9-7 x)}{2-3 x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4-6*x)*(-atan(9-7*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(8-4 x^2\\right)+\\tan (8 x)$\n", - "Output Answer": [ - "$\\frac{2 x}{x^2-2}+8 \\sec ^2(8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8-4*x**2)+tan(8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = acos(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\left(z^5\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+5 y^4+\\frac{15}{2} z^4 \\sqrt{z^5}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**5\nh = (z**5)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(6 x^4-2\\right)^2+e^{\\sqrt{\\frac{5}{2}-2 x}}$\n", - "Output Answer": [ - "$96 x^3 \\left(3 x^4-1\\right)-\\frac{e^{\\sqrt{\\frac{5}{2}-2 x}}}{\\sqrt{\\frac{5}{2}-2 x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((6*x**4-2)**2+math.e**(sqrt((5/2)-2*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = log(x)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = z$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{-1,0,-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7-x)+\\sin ^{-1}(5-4 x)$\n", - "Output Answer": [ - "$\\frac{1}{x-7}-\\frac{4}{\\sqrt{1-(5-4 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7-x)+asin(5-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = z^5$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = z**5\nh = sin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{x y}{z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{\\frac{x y}{z^2},0,\\frac{y}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = ((x*y)/z)\nh = ((x*y)/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-6 x}$\n", - "Output Answer": [ - "$36 e^{-6 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-6 e^{4-3 x^2} x$\n", - "Output Answer": [ - "$e^{4-3 x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -6*math.e**(4-3*x**2)*x\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\cos (x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4+y}$, $g(x,y,z) = \\frac{1}{x^8}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-e^{x^4+y}-\\frac{8}{x^9}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4+y)\ng = (1/(x**8))\nh = (1/(x**8))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{\\frac{z^2}{x^2}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{2 z^2}{3 x^3 \\sqrt[3]{\\frac{z^2}{x^2}}^2},\\frac{1}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\sinh ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{\\frac{y}{z}}$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{2 z \\sqrt{\\frac{y}{z}}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt((y/z))\nh = log(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y+z}$, $g(x,y,z) = \\sin (x+z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\cos (x+z),e^{y+z},\\cos (x+z)-e^{y+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y+z)\ng = sin(x+z)\nh = sin(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$96 x^3 \\left(8 x^4+3\\right)^2-\\frac{12 x^3}{\\sqrt{4-6 x^4}}$\n", - "Output Answer": [ - "$512 x^{12}+576 x^8+216 x^4+\\sqrt{4-6 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 96*x**3*(8*x**4+3)**2-((12*x**3)/(sqrt(4-6*x**4)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n -\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)} & \\frac{1}{x \\left(\\frac{y^2}{x^2}+1\\right)} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = atan(y/x)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x+y^4\\right)^3$, $g(x,y,z) = \\cos \\left(y^4\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-12 y^3 \\left(x+y^4\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y**4)**3\ng = cos(y**4)\nh = cos(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$y \\text{sech}^2(x y)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*y)\ng = cos(y)\nh = (1/(sqrt(y)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$81 x^4 \\log (-7 x-8)$\n", - "Output Answer": [ - "$81 x^2 \\left(\\frac{7 x (49 x+64)}{(7 x+8)^2}+12 \\log (-7 x-8)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 81*x**4*log(-7*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\text{sech}^2(x)+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = y+z\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\log \\left(y-z^3\\right)$, and $h(x,y,z) = \\log \\left(\\frac{z^3}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{3 z^2}{y-z^3}-\\frac{1}{y},3 z^2,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3\ng = log(y-z**3)\nh = log(y-z**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\left(x+z^2\\right)^5$, and $h(x,y,z) = \\sin \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 5 \\left(x+z^2\\right)^4 & 0 & 10 z \\left(x+z^2\\right)^4 \\\\\n 0 & 0 & 2 z \\cos \\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (x+z**2)**5\nh = sin(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y^2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{z^5}{x}}}$", - "Output Answer": [ - "$-\\frac{5 z^4}{2 x \\left(\\frac{z^5}{x}\\right)^{3/2}}+\\cos (x)+\\frac{y}{\\sqrt{y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(y**2)\nh = (1/(sqrt(((z**5)/x))))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}+z\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos (x z)$", - "Output Answer": [ - "$\\frac{1}{y \\left(\\left(\\frac{x}{y}+z\\right)^2+1\\right)}-x \\sin (x z)+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x/y)+z)\ng = tan(y)\nh = cos(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{5}{2}-\\frac{15 x^4}{2}\\right)$\n", - "Output Answer": [ - "$90 x^2 \\left(\\sin \\left(\\frac{5}{2} \\left(1-3 x^4\\right)\\right)-10 x^4 \\cos \\left(\\frac{5}{2} \\left(1-3 x^4\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((5/2)-((15*x**4)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sinh (z) \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(z)\ng = sqrt(y)\nh = sqrt(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\left(\\frac{y}{x}\\right)^{3/2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{y \\cos \\left(\\frac{y}{x}\\right)}{x^2}+\\frac{3 \\sqrt{\\frac{y}{x}}}{2 x}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((y/x))\ng = (y/x)**(3/2)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4-\\frac{17 x^2}{2}\\right)$\n", - "Output Answer": [ - "$17 \\left(\\sin \\left(4-\\frac{17 x^2}{2}\\right)-17 x^2 \\cos \\left(4-\\frac{17 x^2}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-((17*x**2)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x-z^5\\right)$, $g(x,y,z) = \\sqrt{y^3+z^5}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{-\\frac{5 z^4}{2 \\sqrt{y^3+z^5}},-\\frac{5 z^4}{1-\\left(x-z^5\\right)^2}-\\frac{1}{2 \\sqrt{x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x-z**5)\ng = sqrt(y**3+z**5)\nh = sqrt(y**3+z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{5}{y} & 0 \\\\\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = log(y**5)\nh = tan(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{11 x}{2}+1\\right)$\n", - "Output Answer": [ - "$-\\frac{121}{(11 x+2)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((11*x)/2)+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $x^9$", - "Output Answer": [ - "$78732 e^3 (x-3)+19683 e^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = x**9\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{8 x-7} \\sin \\left(5 x^5+5\\right)$\n", - "Output Answer": [ - "$-e^{8 x-7} \\left(8 \\sin \\left(5 \\left(x^5+1\\right)\\right)+25 x^4 \\cos \\left(5 \\left(x^5+1\\right)\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(8*x-7)*sin(5*x**5+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos ^{-1}(y z)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{\\sqrt{1-y^2 z^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(y z)^{3/2}}$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sin ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{\\sqrt{1-x^2 z^2}}-\\frac{3 y}{2 (y z)^{5/2}},\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}}+\\frac{3 z}{2 (y z)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y*z)**(3/2)))\ng = asin(x/y)\nh = asin(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^2\\right)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$x^{3/2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**2)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y^2+1},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x y-z^3\\right)^2$\n", - "Output Answer": [ - "$\\left\\{2 y \\left(x y-z^3\\right),2 x \\left(x y-z^3\\right),-6 z^2 \\left(x y-z^3\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y-z**3)**2\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(y+z^5\\right)^2}$, $g(x,y,z) = \\log (y-x)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{2}{\\left(y+z^5\\right)^3} & -\\frac{10 z^4}{\\left(y+z^5\\right)^3} \\\\\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y+z**5)**2))\ng = log(y-x)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (y-z)$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y-z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(y-z)\nh = tan(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{28 x^3}{7 x^4-1}$\n", - "Output Answer": [ - "$\\log \\left(7 x^4-1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((28*x**3)/(7*x**4-1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cosh (z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & \\sinh (z) \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cosh(z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = (y/x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\{\\sin (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{13 x}{3}-1}$\n", - "Output Answer": [ - "$-\\frac{169}{36 \\left(\\frac{13 x}{3}-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((13*x)/3)-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(5-7 x^4\\right)$\n", - "Output Answer": [ - "$-\\frac{28 x^2 \\left(7 x^4+15\\right)}{\\left(5-7 x^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5-7*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 \\sin \\left(x^4\\right) & 0 & 0 \\\\\n 0 & z & y \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**4)\ng = y*z\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(5-2 x)^3 \\log \\left(x^3-6\\right)$\n", - "Output Answer": [ - "$3 (5-2 x)^2 \\left(\\frac{(5-2 x) x^2}{x^3-6}-2 \\log \\left(x^3-6\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((5-2*x)**3*log(x**3-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^2-3}+\\frac{1}{(8 x-8)^5}$\n", - "Output Answer": [ - "$\\frac{5 x}{\\sqrt{5 x^2-3}}-\\frac{40}{(8 x-8)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**2-3)+(1/((8*x-8)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{9 x^2}{2}+4}+\\tan \\left(7-8 x^2\\right)$\n", - "Output Answer": [ - "$9 e^{\\frac{9 x^2}{2}+4} \\left(9 x^2+1\\right)+16 \\left(32 x^2 \\tan \\left(7-8 x^2\\right)-1\\right) \\sec ^2\\left(7-8 x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((9*x**2)/2)+4)+tan(7-8*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x-\\frac{7}{2}}$\n", - "Output Answer": [ - "$-\\frac{16}{\\left(8 x-\\frac{7}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x-(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{x/z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\frac{e^{x/z}}{z} & 0 & -\\frac{x e^{x/z}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = cos(y)\nh = math.e**(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**5\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\sec ^2(x+z)+2 x-\\frac{1}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = (1/y)\nh = tan(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x-y)^3$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\sin \\left(x-y+z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 (x-y)^2 & -3 (x-y)^2 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n \\cos \\left(x-y+z^5\\right) & -\\cos \\left(x-y+z^5\\right) & 5 z^4 \\cos \\left(x-y+z^5\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x-y)**3\ng = cbrt(x+y)\nh = sin(x-y+z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$1-\\cos (6-6 x)$\n", - "Output Answer": [ - "$36 \\cos (6-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1-cos(6-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z^8}$", - "Output Answer": [ - "$-\\frac{3 y}{2 (x y)^{5/2}}+\\frac{1}{2 \\sqrt{y}}-\\frac{8}{z^9}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y)**(3/2)))\ng = sqrt(y)\nh = (1/(z**8))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(z^3 (x+y)\\right)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{3 z^3}{2 \\left(z^3 (x+y)\\right)^{5/2}},-\\frac{3 z^3}{2 \\left(z^3 (x+y)\\right)^{5/2}},-\\frac{9 z^2 (x+y)}{2 \\left(z^3 (x+y)\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z**3*(x+y))**(3/2)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(4 x+3)-\\sin ^{-1}(3 x+2)$\n", - "Output Answer": [ - "$-\\frac{9 (3 x+2)}{\\left(1-(3 x+2)^2\\right)^{3/2}}-\\frac{32 (4 x+3)}{\\left((4 x+3)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(4*x+3)-asin(3*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & z & y \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y*z\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cosh (x-y-z)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\sinh (x-y-z),0,\\sinh (x-y-z)-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = cosh(x-y-z)\nh = cosh(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x+\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (z-y)^2$", - "Output Answer": [ - "$4$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-y)**2\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-y}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-y}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y)\ng = log(z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{9 x}{2}+\\frac{17}{2}\\right)+\\cos (2-x)$\n", - "Output Answer": [ - "$\\frac{9}{9 x+17}+\\sin (2-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((9*x)/2)+(17/2))+cos(2-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x^2+2}-\\sin (3-x)$\n", - "Output Answer": [ - "$10 e^{5 x^2+2} \\left(10 x^2+1\\right)+\\sin (3-x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x**2+2)-sin(3-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x z}$, $g(x,y,z) = \\sin (x-y)$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$-\\cos (x-y)+z e^{x z}-\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*z)\ng = sin(x-y)\nh = sqrt((y/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x y$, and $h(x,y,z) = \\tanh ^{-1}(x+y)$", - "Output Answer": [ - "$x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x*y\nh = atanh(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{y+z^5}$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 \\sqrt{x y}}-\\frac{5 z^4}{3 \\sqrt[3]{y+z^5}^2},-\\frac{y}{2 \\sqrt{x y}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cbrt(y+z**5)\nh = cbrt(y+z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4-\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{225}{4} \\cos \\left(4-\\frac{15 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-((15*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$e^y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y+z)\ng = math.e**y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$e^x+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left\\{z \\sec ^2(y z)-\\frac{1}{3 \\sqrt[3]{x+z}^2},\\cos (z),\\frac{1}{3 \\sqrt[3]{x+z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = cbrt(x+z)\nh = cbrt(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{z^2}{y^2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{2 z^2}{y^3} & \\frac{2 z}{y^2} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = ((z**2)/(y**2))\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = sqrt(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4 x^2+2}-\\cos \\left(3-4 x^4\\right)$\n", - "Output Answer": [ - "$8 \\left(e^{4 x^2+2} \\left(8 x^2+1\\right)-6 x^2 \\sin \\left(3-4 x^4\\right)+32 x^6 \\cos \\left(3-4 x^4\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4*x**2+2)-cos(3-4*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(z^2\\right)$, $g(x,y,z) = \\sqrt[3]{\\frac{x+y}{z^2}}$, and $h(x,y,z) = e^{z^2}$", - "Output Answer": [ - "$\\left\\{\\frac{2 (x+y)}{3 z^3 \\sqrt[3]{\\frac{x+y}{z^2}}^2},\\frac{2}{z},\\frac{1}{3 z^2 \\sqrt[3]{\\frac{x+y}{z^2}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z**2)\ng = cbrt((x+y)/(z**2))\nh = cbrt((x+y)/(z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}(x+z)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = atan(x+z)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sqrt[3]{y-z}$", - "Output Answer": [ - "$1-\\frac{1}{3 \\sqrt[3]{y-z}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**z\nh = cbrt(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\sec ^2(y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y)\nh = (1/(y**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (x-z)^5$", - "Output Answer": [ - "$40 (x-z)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-z)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\tan ^{-1}(x-z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n \\frac{1}{(x-z)^2+1} & 0 & -\\frac{1}{(x-z)^2+1} \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z)\ng = atan(x-z)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(y^2+z\\right)$, $g(x,y,z) = \\cos \\left(y^2 z\\right)$, and $h(x,y,z) = \\sin \\left(y^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -2 y \\sin \\left(y^2+z\\right) & -\\sin \\left(y^2+z\\right) \\\\\n 0 & -2 y z \\sin \\left(y^2 z\\right) & -y^2 \\sin \\left(y^2 z\\right) \\\\\n 0 & 2 y \\cos \\left(y^2\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y**2+z)\ng = cos(y**2*z)\nh = sin(y**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = (z-y)^2$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n 0 & -2 (z-y) & 2 (z-y) \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*y)\ng = (z-y)**2\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{x \\left(-e^{x z}\\right),y,z e^{x z}-z\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = math.e**(x*z)\nh = math.e**(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan ^{-1}(x-y)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x-y)^2+1} & \\frac{1}{(x-y)^2+1} & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -atan(x-y)\ng = x\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{1}{2}-\\frac{x^2}{2}}-\\cosh (7 x+2)$\n", - "Output Answer": [ - "$-\\frac{x}{\\sqrt{2-2 x^2}}-7 \\sinh (7 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((1/2)-((x**2)/2))-cosh(7*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\frac{y^2}{x^2 z^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{2 y}{x^2 z^2}-\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/z))\ng = ((y**2)/(x**2*z**2))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\frac{1}{x+y}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y)\ng = math.e**y\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-16 x^3 \\sin \\left(4 \\left(x^4+2\\right)\\right)$\n", - "Output Answer": [ - "$\\cos \\left(4 \\left(x^4+2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -16*x**3*sin(4*(x**4+2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-3 x}-\\sin ^{-1}(6 x+3)$\n", - "Output Answer": [ - "$-3 e^{2-3 x}-\\frac{6}{\\sqrt{1-9 (2 x+1)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-3*x)-asin(6*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan \\left(\\frac{8 x^5}{3}\\right)$ on the interval $x = 0$ to $x = 0$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(((8*x**5)/3))\na = 0\nb = 0\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-(x+z)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(5 x-4)^4}$\n", - "Output Answer": [ - "$\\frac{500}{(4-5 x)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((5*x-4)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\frac{224}{3} (x-2)^3 \\cos (2)+(x-2)^2 (64 \\sin (2)+80 \\cos (2))+(x-2) (80 \\sin (2)+32 \\cos (2))+32 \\sin (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**5\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos ^{-1}(x+z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-(x+z)^2}},\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(3-\\frac{17 x}{2}\\right)-\\sin ^{-1}(5-x)$\n", - "Output Answer": [ - "$\\frac{17}{\\sqrt{-289 x^2+204 x-32}}+\\frac{1}{\\sqrt{1-(x-5)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(3-((17*x)/2))-asin(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & z & y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y\nh = y*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(4 x+3)^3 \\tan (x+6)$\n", - "Output Answer": [ - "$-(4 x+3)^2 (4 x+6 \\sin (2 (x+6))+3) \\sec ^2(x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(4*x+3)**3*tan(x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(y+z)^{3/2}}$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$1-\\frac{3}{2 (y+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((y+z)**(3/2)))\nh = atan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\frac{1}{x}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = math.e**y\nh = log(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-5 x}+1$\n", - "Output Answer": [ - "$-5 e^{1-5 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-5*x)+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(3 x^2-2\\right)^2}-125$\n", - "Output Answer": [ - "$-\\frac{12 x}{\\left(3 x^2-2\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3*x**2-2)**2))-125, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\frac{1}{x-z}+y \\sec ^2(y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = cbrt(z)\nh = tan(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (3 x)$ on the interval $x = 2$ to $x = 10$\n", - "Output Answer": [ - "$\\int_2^{10} \\sqrt{9 \\sec ^4(3 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x)\na = 2\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((x/z))\ng = acos(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{10}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 10 x^9 & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**10\ng = y**3\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(1-8 x)+\\sin (8-2 x)$\n", - "Output Answer": [ - "$2 \\left(-\\frac{1}{\\sqrt{x-4 x^2}}-\\cos (8-2 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(1-8*x)+sin(8-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-x+\\cos \\left(\\frac{13}{2}-\\frac{x}{2}\\right)-\\frac{7}{2}$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(\\sin \\left(\\frac{13-x}{2}\\right)-2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-x+cos((13/2)-(x/2))-(7/2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh (z (x-y))$", - "Output Answer": [ - "$-4 z^2 \\tanh (z (x-y)) \\text{sech}^2(z (x-y))-2 (x-y)^2 \\tanh (z (x-y)) \\text{sech}^2(z (x-y))$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(z*(x-y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $x$", - "Output Answer": [ - "$(x-3)^4+12 (x-3)^3+54 (x-3)^2+108 (x-3)+81$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = x\nseries = f.subs(x, g).series(x, 3, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3-4 x^2}$\n", - "Output Answer": [ - "$8 e^{3-4 x^2} \\left(8 x^2-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3-4*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x^4+4} \\log \\left(5-4 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{2 x \\left(\\frac{4 \\left(x^4+4\\right)}{4 x^2-5}+x^2 \\log \\left(5-4 x^2\\right)\\right)}{\\sqrt{x^4+4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x**4+4)*log(5-4*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = (1/(y**(3/2)))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y z}\\right)$", - "Output Answer": [ - "$-\\frac{x^3}{y^5 z^3 \\left(1-\\frac{x^2}{y^2 z^2}\\right)^{3/2}}-\\frac{x^3}{y^3 z^5 \\left(1-\\frac{x^2}{y^2 z^2}\\right)^{3/2}}-\\frac{2 x}{y^3 z \\sqrt{1-\\frac{x^2}{y^2 z^2}}}-\\frac{2 x}{y z^3 \\sqrt{1-\\frac{x^2}{y^2 z^2}}}-\\frac{x}{y^3 z^3 \\left(1-\\frac{x^2}{y^2 z^2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x/(y*z))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$(x+3) \\left(\\cos (3) \\left(-\\sinh ^{-1}(3)\\right)-\\frac{\\sin (3)}{\\sqrt{10}}\\right)+\\sin (3) \\sinh ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = asinh(x)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{15}{2}\\right)-e^{\\frac{17 x}{2}-\\frac{13}{2}}$\n", - "Output Answer": [ - "$-\\frac{289}{4} e^{\\frac{17 x}{2}-\\frac{13}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin((15/2))-math.e**(((17*x)/2)-(13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(8 x+1)^4-\\sin (3 x+8)$\n", - "Output Answer": [ - "$32 (8 x+1)^3-3 \\cos (3 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8*x+1)**4-sin(3*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y^3}\\right)$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = \\frac{z}{y^3}$", - "Output Answer": [ - "$\\frac{1}{y^3 \\sqrt{\\frac{x^2}{y^6}+1}}+\\frac{3 y^2}{2 \\sqrt{y^3}}+\\frac{1}{y^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x/(y**3))\ng = sqrt(y**3)\nh = (z/(y**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\frac{1}{(x-y)^2}$", - "Output Answer": [ - "$\\frac{1}{x}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x-y\nh = (1/((x-y)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n e^x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cbrt(y)\nh = math.e**x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\sec ^2(y+z)-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = tan(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(4 x^5+6\\right)+\\cos ^{-1}(5 x+7)$\n", - "Output Answer": [ - "$\\frac{10 x^4}{2 x^5+3}-\\frac{5}{\\sqrt{1-(5 x+7)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x**5+6)+acos(5*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{1}{z}-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/z))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tanh ^{-1}(z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{1-z^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atanh(z)\nh = atanh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(1-6 x^4\\right)$\n", - "Output Answer": [ - "$-\\frac{72 \\left(2 x^6+x^2\\right)}{\\left(1-6 x^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(1-6*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6-5 x)+\\sin (8 x+5)$\n", - "Output Answer": [ - "$8 \\cos (8 x+5)-5 \\cos (6-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6-5*x)+sin(8*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y z)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y*z)\ng = acos(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (9-6 x)-(2 x+1)^4$\n", - "Output Answer": [ - "$-48 (2 x+1)^2-36 \\sin (9-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(9-6*x)-(2*x+1)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x^2-y^4}{z}\\right)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{3 x}{z \\left(\\frac{x^2-y^4}{z}\\right)^{5/2}},\\frac{6 y^3}{z \\left(\\frac{x^2-y^4}{z}\\right)^{5/2}},\\frac{3 \\left(x^2-y^4\\right)}{2 z^2 \\left(\\frac{x^2-y^4}{z}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x**2-y**4)/z)**(3/2)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\cos (5 x+7)}$\n", - "Output Answer": [ - "$-25 e^{\\cos (5 x+7)} \\left(\\cos (5 x+7)-\\sin ^2(5 x+7)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(cos(5*x+7))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{\\cos (3 x+6)} \\tan (8 x+6)$\n", - "Output Answer": [ - "$\\frac{3 \\sin (3 (x+2)) \\tan (8 x+6)-16 \\cos (3 (x+2)) \\sec ^2(8 x+6)}{2 \\sqrt{\\cos (3 (x+2))}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(cos(3*x+6))*tan(8*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\sin ^{-1}(x y)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{1-x^2 y^2}}+\\cosh (x)+y e^{y z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = asin(x*y)\nh = math.e**(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{6 x-1}}{\\log (7 x-3)}$\n", - "Output Answer": [ - "$\\frac{-42 x+3 (7 x-3) \\log (7 x-3)+7}{\\sqrt{6 x-1} (7 x-3) \\log ^2(7 x-3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(6*x-1))/(log(7*x-3))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^6$ and $g(x) = $\\log \\left(x^2\\right)$", - "Output Answer": [ - "$1-4 (x+1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**6\ng = log(x**2)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{22 x}{5}-\\frac{8}{5}}$\n", - "Output Answer": [ - "$-\\frac{121}{25 \\left(-\\frac{22 x}{5}-\\frac{8}{5}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-((22*x)/5)-(8/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-7 x-3)+\\cos (3 x+3)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+3)^2}-9 \\cos (3 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-7*x-3)+cos(3*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x}+\\cos (8 x+6)$\n", - "Output Answer": [ - "$-e^{-x}-8 \\sin (8 x+6)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x)+cos(8*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6 x+5)-\\sin (5-4 x)$\n", - "Output Answer": [ - "$4 \\cos (5-4 x)+6 \\cos (6 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x+5)-sin(5-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-\\frac{7 x^5}{2}-7\\right)^4+\\log \\left(\\frac{3}{2}-\\frac{11 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{12005}{4} \\left(x^5+2\\right)^3 x^4+\\frac{11}{11 x-3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-((7*x**5)/2)-7)**4+log((3/2)-((11*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n -1 & 0 & 1 \\\\\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y+z)\ng = z-x\nh = cos(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x$", - "Output Answer": [ - "$(x+3) \\left(-\\frac{\\sin (3)}{3}-\\frac{\\cos (3)}{9}\\right)-\\frac{\\cos (3)}{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{325 (x-3)}{3}+81+\\log (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = log(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 3 z^2 \\\\\n \\frac{1}{z \\left(1-\\frac{x^2}{z^2}\\right)} & 0 & -\\frac{x}{z^2 \\left(1-\\frac{x^2}{z^2}\\right)} \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**3\ng = atanh(x/z)\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 \\sqrt{x}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x**(3/2)\nh = x**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cos(x)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{e^{2-8 x}}{(3-8 x)^4}$\n", - "Output Answer": [ - "$\\frac{64 e^{2-8 x} \\left(64 x^2+16 x+5\\right)}{(3-8 x)^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(2-8*x))/((3-8*x)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y+z)$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(y+z)^2+1},\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{1}{(y+z)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y+z)\ng = cbrt(x)\nh = cbrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = y\nh = tan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8 x-7)^3}$\n", - "Output Answer": [ - "$\\frac{768}{(8 x-7)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8*x-7)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z}{y^5}\\right)$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{5}{y} & \\frac{1}{z} \\\\\n 0 & -5 y^4 \\sin \\left(y^5\\right) & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((z/(y**5)))\ng = cos(y**5)\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\tan ^{-1}(x-z)$, and $h(x,y,z) = \\cos ^{-1}(y-x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = atan(x-z)\nh = acos(y-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(z-x)^2}$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\tan ^{-1}(x-y+z)$", - "Output Answer": [ - "$\\frac{1}{(x-y+z)^2+1}+\\frac{2}{(z-x)^3}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z-x)**2))\ng = log(x*y)\nh = atan(x-y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-2 \\sqrt{-x} \\sin (7 x+2)$\n", - "Output Answer": [ - "$\\frac{\\sin (7 x+2)+14 x \\cos (7 x+2)}{\\sqrt{-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-2*sqrt(-x)*sin(7*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\left(\\frac{x}{y}+z\\right)^{3/2}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n \\frac{3 \\sqrt{\\frac{x}{y}+z}}{2 y} & -\\frac{3 x \\sqrt{\\frac{x}{y}+z}}{2 y^2} & \\frac{3}{2} \\sqrt{\\frac{x}{y}+z} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((x/y))\ng = ((x/y)+z)**(3/2)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\frac{x \\sec ^2\\left(\\frac{x}{y}+z\\right)}{y^2}+\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan((x/y)+z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x-y^5\\right)$", - "Output Answer": [ - "$20 y^3 \\sin \\left(x-y^5\\right)-25 y^8 \\cos \\left(x-y^5\\right)-\\cos \\left(x-y^5\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-y$, $g(x,y,z) = \\cos (x z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{x \\sin (x z),1,1-z \\sin (x z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-y\ng = cos(x*z)\nh = cos(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\left(\\frac{x+y^2}{z}\\right)^{3/2}$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\left(x+y^2\\right) \\sqrt{\\frac{x+y^2}{z}}}{2 z^2},-\\frac{1}{x^2+1},\\frac{3 \\sqrt{\\frac{x+y^2}{z}}}{2 z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = ((x+y**2)/z)**(3/2)\nh = ((x+y**2)/z)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x y}}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$-\\frac{x}{2 (x y)^{3/2}}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(x*y)))\nh = log(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5-x}-\\sqrt{2 x-1}$\n", - "Output Answer": [ - "$-e^{5-x}-\\frac{1}{\\sqrt{2 x-1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5-x)-sqrt(2*x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{z}{x}\\right)^{3/2}}$", - "Output Answer": [ - "$-\\frac{3}{2 x \\left(\\frac{z}{x}\\right)^{5/2}}+\\frac{1}{x}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan(y)\nh = (1/((z/x)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{y},\\frac{z}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/y)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = \\cos (x+y)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(x**2))\nh = cos(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+z)^{3/2}$, $g(x,y,z) = -\\tan (x-z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x+z}}{2} & 0 & \\frac{3 \\sqrt{x+z}}{2} \\\\\n -\\sec ^2(x-z) & 0 & \\sec ^2(x-z) \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+z)**(3/2)\ng = -tan(x-z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^{\\frac{z}{y}}$", - "Output Answer": [ - "$\\frac{1}{x}+4 y^3+\\frac{e^{\\frac{z}{y}}}{y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**4\nh = math.e**(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{1-3 x^5}+\\sin (7-5 x)$\n", - "Output Answer": [ - "$15 e^{1-3 x^5} x^3 \\left(15 x^5-4\\right)-25 \\sin (7-5 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(1-3*x**5)+sin(7-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^{20} (x-y)^5$", - "Output Answer": [ - "$40 z^{20} (x-y)^3+380 z^{18} (x-y)^5$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**20*(x-y)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-2} \\sqrt{9 x-5}$\n", - "Output Answer": [ - "$\\frac{e^{4 x-2} (72 x-31)}{2 \\sqrt{9 x-5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-2)*sqrt(9*x-5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\text{sech}^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = acos(x)\nh = x-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{z}{x}\\right)^{3/2}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 z \\sqrt{\\frac{z}{x}}}{2 x^2} & 0 & \\frac{3 \\sqrt{\\frac{z}{x}}}{2 x} \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/x)**(3/2)\ng = y**3\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$2-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+y\nh = cos(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x+y-z^5\\right)^5$", - "Output Answer": [ - "$500 z^8 \\left(x+y-z^5\\right)^3-100 z^3 \\left(x+y-z^5\\right)^4+40 \\left(x+y-z^5\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y-z**5)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(7 x+6)-\\sin ^{-1}(7 x+7)$\n", - "Output Answer": [ - "$-\\frac{7}{\\sqrt{1-(7 x+6)^2}}-\\frac{7}{\\sqrt{1-49 (x+1)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(7*x+6)-asin(7*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{6 x-2} \\tan (3 x)$\n", - "Output Answer": [ - "$-9 e^{6 x-2} \\sec ^3(3 x) (3 \\sin (3 x)+\\sin (9 x)+4 \\cos (3 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(6*x-2)*tan(3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(1-6 x^3\\right)-\\sin (2 x+2)$\n", - "Output Answer": [ - "$-2 \\left(9 x^2 \\sec ^2\\left(1-6 x^3\\right)+\\cos (2 (x+1))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(1-6*x**3)-sin(2*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cos (3 x)$\n", - "Output Answer": [ - "$-\\frac{9 \\cos (3)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(3*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5}{y}+z$", - "Output Answer": [ - "$\\frac{2 x^5}{y^3}+\\frac{20 x^3}{y}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/y)+z\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$\\cos (x)-\\frac{x}{y^2 \\left(\\left(\\frac{x}{y}+z\\right)^2+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = atan((x/y)+z)\nh = (1/(sqrt(y)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$16 e^{4 x^4-5} x^3$\n", - "Output Answer": [ - "$e^{4 x^4-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 16*math.e**(4*x**4-5)*x**3\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y*z)\ng = cbrt(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{9 x-8} (4-6 x)^2$\n", - "Output Answer": [ - "$36 e^{9 x-8} \\left(81 x^2-72 x+14\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(9*x-8)*(4-6*x)**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(2 x+6)$\n", - "Output Answer": [ - "$-\\frac{8 (x+3)}{\\left(1-4 (x+3)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-z^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asin(z)\nh = asin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(\\frac{x}{y^5}\\right)$", - "Output Answer": [ - "$\\frac{5}{y^2}-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/(y**5)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{x}{y}-z$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & -1 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (x/y)-z\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 2 \\sqrt{-x}$ on the interval $x = 4$ to $x = 8$\n", - "Output Answer": [ - "$-2 \\sqrt{3}+2 \\sqrt{14}-i \\cos ^{-1}(2)+i \\cos ^{-1}\\left(2 \\sqrt{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 2*sqrt(-x)\na = 4\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{z (x+y)}$", - "Output Answer": [ - "$\\frac{x+y}{3 \\sqrt[3]{z (x+y)}^2}+\\frac{1}{2 \\sqrt{x}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**y\nh = cbrt(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = (x+z)^2$", - "Output Answer": [ - "$2 (x+z)+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = log((z/x))\nh = (x+z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$e^x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x^2-5}+e^{4 x^2+6}$\n", - "Output Answer": [ - "$8 e^{-4 x^2-5} \\left(e^{8 x^2+11}-1\\right) x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x**2-5)+math.e**(4*x**2+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^2}{y}$, $g(x,y,z) = y-z^2$, and $h(x,y,z) = \\sqrt{y z^2}$", - "Output Answer": [ - "$\\left\\{\\frac{z^2}{2 \\sqrt{y z^2}}+2 z,\\frac{2 z}{y},\\frac{z^2}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/y)\ng = y-z**2\nh = y-z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (5-3 x)-\\sin (3-3 x)$\n", - "Output Answer": [ - "$6 \\sin (1) \\sin (4-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(5-3*x)-sin(3-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{6 x-\\frac{9}{2}}-\\sin \\left(\\frac{7}{2}-\\frac{13 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{169}{4} \\sin \\left(\\frac{1}{2} (7-13 x)\\right)-36 e^{6 x-\\frac{9}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(6*x-(9/2))-sin((7/2)-((13*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-8}$\n", - "Output Answer": [ - "$4 e^{4 x-8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = x z$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = x*z\nh = acos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (y+z)$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\text{sech}^2(y+z) & \\text{sech}^2(y+z) \\\\\n -1 & 1 & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(y+z)\ng = y-x\nh = sin((x/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(y^4\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,0,-4 y^3 \\sec ^2\\left(y^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y**4)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(\\sqrt{x+9}\\right)$\n", - "Output Answer": [ - "$\\frac{2 x+17}{4 (-((x+8) (x+9)))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(sqrt(x+9))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-z$, $g(x,y,z) = (x-y)^{3/2}$, and $h(x,y,z) = (x+z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & -1 \\\\\n \\frac{3 \\sqrt{x-y}}{2} & -\\frac{3 \\sqrt{x-y}}{2} & 0 \\\\\n 5 (x+z)^4 & 0 & 5 (x+z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-z\ng = (x-y)**(3/2)\nh = (x+z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\cos (x)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y\nh = z-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = tan(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x},\\frac{y}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 \\sqrt{y z}}-y,e^{x+z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & -\\frac{\\sin \\left(\\frac{y}{z}\\right)}{z} & \\frac{y \\sin \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = tan(y)\nh = cos((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z-y$, $g(x,y,z) = z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -1 & 1 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z-y\ng = z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-7 x-6} \\cos (x+1)$\n", - "Output Answer": [ - "$-\\frac{\\left(196 x^2+336 x+193\\right) \\cos (x+1)+28 (7 x+6) \\sin (x+1)}{4 (-7 x-6)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-7*x-6)*cos(x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (-\\tan (8))}{\\log (2-x)}$\n", - "Output Answer": [ - "$-\\frac{\\log (-\\tan (8))}{(x-2) \\log ^2(2-x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(-tan(8)))/(log(2-x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}-\\frac{3}{2 x^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = atan(x)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = asinh(y)\nh = (z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\cos (x)-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos((x/z))\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cos(x-y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (8-8 x)-\\tan ^{-1}(3 x+7)$\n", - "Output Answer": [ - "$\\frac{18 (3 x+7)}{\\left((3 x+7)^2+1\\right)^2}-64 \\sin (8-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(8-8*x)-atan(3*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},\\frac{1}{x},-\\frac{1}{2 \\sqrt{x+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{15 x}{2}-\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{3375 (x-1)}{\\left(-225 x^2+450 x-221\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(((15*x)/2)-(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\frac{x}{y^3}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y^3 z}}$", - "Output Answer": [ - "$-\\frac{3 x}{y^4}-\\frac{y^3}{2 \\left(y^3 z\\right)^{3/2}}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = (x/(y**3))\nh = (1/(sqrt(y**3*z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^2}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{1}{3} (-x-1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**2)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(x-z^5\\right)$", - "Output Answer": [ - "$2-\\frac{5 z^4}{x-z^5}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = log(x-z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh ^{-1}(x)$, and $h(x,y,z) = \\cos ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n -\\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & -\\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = acosh(x)\nh = acos(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}-z\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}},0,\\frac{1}{y \\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = asin((x/y)-z)\nh = asin((x/y)-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos ^{-1}(y-x)$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-(y-x)^2}} & -\\frac{1}{\\sqrt{1-(y-x)^2}} & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = acos(y-x)\nh = cos(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$(x+2) \\left(\\tan ^{-1}(2) \\coth (2) \\text{csch}(2)-\\frac{\\text{csch}(2)}{5}\\right)+\\tan ^{-1}(2) \\text{csch}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z-y}} & \\frac{1}{2 \\sqrt{z-y}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = math.e**y\nh = sqrt(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (8-3 x)}{\\left(-5 x^2-3\\right)^3}$\n", - "Output Answer": [ - "$\\frac{3 \\left(5 x^2+5 x \\sin (16-6 x)+3\\right) \\sec ^2(8-3 x)}{\\left(5 x^2+3\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(8-3*x))/((-5*x**2-3)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(6 x+8)^3}$\n", - "Output Answer": [ - "$\\frac{432}{(6 x+8)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((6*x+8)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = e^{z-y}$, and $h(x,y,z) = z-x^3$", - "Output Answer": [ - "$1-e^{z-y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = math.e**(z-y)\nh = z-x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x+\\frac{3}{2}}+\\cos \\left(\\frac{9}{2}-7 x\\right)$\n", - "Output Answer": [ - "$-\\frac{16}{\\left(8 x+\\frac{3}{2}\\right)^{3/2}}-49 \\cos \\left(\\frac{9}{2}-7 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x+(3/2))+cos((9/2)-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x-8}-e^{5 x-8}$\n", - "Output Answer": [ - "$e^{3 x-8} \\left(9-25 e^{2 x}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x-8)-math.e**(5*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{3 x}{2}+\\frac{3}{2}}$\n", - "Output Answer": [ - "$\\frac{3}{2} e^{\\frac{3 (x+1)}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((3*x)/2)+(3/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\sqrt{-2 x-7}\\right)$\n", - "Output Answer": [ - "$-\\frac{2}{(2 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(sqrt(-2*x-7))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-8 x-7)-625$\n", - "Output Answer": [ - "$-\\frac{64}{(8 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-8*x-7)-625\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan (2 x)$ on the interval $x = 2$ to $x = 3$\n", - "Output Answer": [ - "$\\int_2^3 \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(2*x)\na = 2\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{z^5}$", - "Output Answer": [ - "$\\frac{10 z^3}{9 \\sqrt[3]{z^5}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(8-x^4\\right)-e^{-4 x-7}$\n", - "Output Answer": [ - "$4 \\left(x^3 \\cos \\left(8-x^4\\right)+e^{-4 x-7}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-sin(8-x**4)-math.e**(-4*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{1-\\frac{1}{y},\\frac{1}{2 \\sqrt{x+z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = (z/y)\nh = (z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z^4-x}$, $g(x,y,z) = \\left(x+z^4\\right)^5$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{z^4-x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z**4-x)\ng = (x+z**4)**5\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = x$, and $h(x,y,z) = \\cosh (z (x+y))$", - "Output Answer": [ - "$\\left\\{z \\sinh (z (x+y)),\\frac{1}{2 \\sqrt{x+z}}-z \\sinh (z (x+y)),1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x}{\\sqrt{1-x^2 y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{x+y}^2},-\\frac{1}{3 \\sqrt[3]{x+y}^2},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{\\cos (2 x+7)}{\\log (3 x)}$\n", - "Output Answer": [ - "$\\frac{\\left(-4 x^2 \\log ^2(3 x)+\\log (3 x)+2\\right) \\cos (2 x+7)+4 x \\log (3 x) \\sin (2 x+7)}{x^2 \\log ^3(3 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((cos(2*x+7))/(log(3*x)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-3) \\left(\\frac{1}{\\sqrt{10}}-\\sin (3)\\right)+\\cos (3)+\\sinh ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x-y-z^3\\right)$", - "Output Answer": [ - "$-9 z^4 \\sin \\left(x-y-z^3\\right)-2 \\sin \\left(x-y-z^3\\right)-6 z \\cos \\left(x-y-z^3\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y-z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{30 x^4}{\\left(6 x^5+2\\right)^2+1}$\n", - "Output Answer": [ - "$\\tan ^{-1}\\left(6 x^5+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((30*x**4)/((6*x**5+2)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y^5$, $g(x,y,z) = \\sin \\left(y^5\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y^5 & 5 x y^4 & 0 \\\\\n 0 & 5 y^4 \\cos \\left(y^5\\right) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y**5\ng = sin(y**5)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(6 x-7)^3$\n", - "Output Answer": [ - "$216 (6 x-7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (6*x-7)**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(z \\left(x-y^5\\right)\\right)$, $g(x,y,z) = \\sin (x-z)$, and $h(x,y,z) = \\log \\left(\\frac{x}{y^5}\\right)$", - "Output Answer": [ - "$\\left\\{\\cos (x-z)-\\frac{5}{y},\\frac{x-y^5}{z^2 \\left(x-y^5\\right)^2+1}-\\frac{1}{x},\\frac{5 y^4 z}{z^2 \\left(x-y^5\\right)^2+1}+\\cos (x-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z*(x-y**5))\ng = sin(x-z)\nh = sin(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x+y)^2}$, $g(x,y,z) = x$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{(x+y)^3} & -\\frac{2}{(x+y)^3} & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+y)**2))\ng = x\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^3 y\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{x^3}{x^6 y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**3*y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(y z^3\\right)^{3/2}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^{y-x}$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y*z**3)**(3/2)))\ng = log(y)\nh = math.e**(y-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y**2\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\left(z^2\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 3 z \\sqrt{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(y)\nh = (z**2)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x-z} & 0 & -\\frac{1}{x-z} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x-z)\ng = y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x-y}{z}}$", - "Output Answer": [ - "$-\\frac{(x-y)^2}{4 z^4 \\left(\\frac{x-y}{z}\\right)^{3/2}}+\\frac{x-y}{z^3 \\sqrt{\\frac{x-y}{z}}}-\\frac{1}{2 z^2 \\left(\\frac{x-y}{z}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x-y)/z))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x+y}{z}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x+y}{2 z^2 \\sqrt{\\frac{x+y}{z}}},-\\frac{1}{2 z \\sqrt{\\frac{x+y}{z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x+y)/z))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\sin \\left(\\frac{x^5}{y^3}\\right)$", - "Output Answer": [ - "$\\frac{5 x^4}{2 \\sqrt{x^5}}+3 e^{y^3} y^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5)\ng = math.e**(y**3)\nh = sin(((x**5)/(y**3)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = x-y^5$, and $h(x,y,z) = \\frac{z}{y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n 1 & -5 y^4 & 0 \\\\\n 0 & -\\frac{5 z}{y^6} & \\frac{1}{y^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+z)\ng = x-y**5\nh = (z/(y**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x+y}-1,-\\frac{1}{x+y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z-y\nh = z-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$3 y^2+\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**3\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^{20}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**20\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{x^5}{z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n \\frac{5 x^4}{z^5} & 0 & -\\frac{5 x^5}{z^6} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = y**5\nh = ((x**5)/(z**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}}$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y))\ng = tan(x+z)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{37 x}{5}+\\frac{32}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{1369}{25} \\sin \\left(\\frac{1}{5} (37 x+32)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((37*x)/5)+(32/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sqrt(y*z)\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$1-\\cos \\left(7-x^3\\right)$\n", - "Output Answer": [ - "$-3 x^2 \\sin \\left(7-x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(1-cos(7-x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z-x)$, $g(x,y,z) = \\cos ^{-1}(x+z)$, and $h(x,y,z) = \\frac{1}{x+z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(z-x)^2}}-\\frac{1}{(x+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z-x)\ng = acos(x+z)\nh = (1/(x+z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (x+5)+\\cosh (4-2 x)$\n", - "Output Answer": [ - "$-\\sin (x+5)-2 \\sinh (4-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(x+5)+cosh(4-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\frac{1}{(y+z)^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{2}{(y+z)^3}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = (1/((y+z)**2))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 0 & e^z \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = math.e**z\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^{3/2}$, $g(x,y,z) = \\sin ^{-1}(x-y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 \\sqrt{z-x}}{2},\\frac{1}{\\sqrt{1-(x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**(3/2)\ng = asin(x-y)\nh = asin(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^5$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**5\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(2 x^5-4\\right)^4$\n", - "Output Answer": [ - "$320 x^3 \\left(x^5-2\\right)^2 \\left(19 x^5-8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (2*x**5-4)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\left(x y-z^4\\right)^2$, and $h(x,y,z) = e^{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 2 y \\left(x y-z^4\\right) & 2 x \\left(x y-z^4\\right) & -8 z^3 \\left(x y-z^4\\right) \\\\\n 0 & 0 & 4 e^{z^4} z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = (x*y-z**4)**2\nh = math.e**(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\log (x y z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n \\frac{1}{x} & \\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = log(x*y*z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2 x^2+8\\right)+e^{6 x-4}$\n", - "Output Answer": [ - "$6 e^{6 x-4}-4 x \\sin \\left(2 \\left(x^2+4\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(2*x**2+8)+math.e**(6*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tanh (y z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-y \\text{sech}^2(y z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tanh(y*z)\nh = tanh(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos ^{-1}(6-6 x)}{\\log (-x-7)}$\n", - "Output Answer": [ - "$\\frac{6}{\\sqrt{1-36 (x-1)^2} \\log (-x-7)}-\\frac{\\cos ^{-1}(6-6 x)}{(x+7) \\log ^2(-x-7)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((acos(6-6*x))/(log(-x-7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5-2 x)+\\sin ^{-1}(2 x+3)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{-x^2-3 x-2}}+\\frac{2}{2 x-5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5-2*x)+asin(2*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(x^5+8\\right)+\\sqrt{3 x+1}$\n", - "Output Answer": [ - "$-\\frac{25 x^8}{\\left(x^5+8\\right)^2}+\\frac{20 x^3}{x^5+8}-\\frac{9}{4 (3 x+1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x**5+8)+sqrt(3*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z^3$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^3}}$", - "Output Answer": [ - "$2-\\frac{3 z^2}{2 \\left(z^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z**3\ng = x+y\nh = (1/(sqrt(z**3)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(y-z^3\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(y+z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos \\left(y-z^3\\right) & -3 z^2 \\cos \\left(y-z^3\\right) \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\sin \\left(y+z^3\\right) & -3 z^2 \\sin \\left(y+z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y-z**3)\ng = sqrt(y)\nh = cos(y+z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & 2 z \\sec ^2\\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = sin(y)\nh = tan(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/(y**(3/2)))\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8 x^2+7}-\\tan ^{-1}(7 x+9)$\n", - "Output Answer": [ - "$\\frac{98 (7 x+9)}{\\left(49 x^2+126 x+82\\right)^2}+16 e^{8 x^2+7} \\left(16 x^2+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8*x**2+7)-atan(7*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x}{y^5}-z^5\\right)^2}$", - "Output Answer": [ - "$\\frac{150 x^2}{y^{12} \\left(\\frac{x}{y^5}-z^5\\right)^4}+\\frac{150 z^8}{\\left(\\frac{x}{y^5}-z^5\\right)^4}+\\frac{40 z^3}{\\left(\\frac{x}{y^5}-z^5\\right)^3}-\\frac{60 x}{y^7 \\left(\\frac{x}{y^5}-z^5\\right)^3}+\\frac{6}{y^{10} \\left(\\frac{x}{y^5}-z^5\\right)^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x/(y**5))-z**5)**2))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = (y+z)^2$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\sec ^2(x y) & x \\sec ^2(x y) & 0 \\\\\n 0 & 2 (y+z) & 2 (y+z) \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*y)\ng = (y+z)**2\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$1-\\frac{1}{\\left(3-3 x^3\\right)^2}$\n", - "Output Answer": [ - "$-\\frac{2 x \\left(7 x^3+2\\right)}{3 \\left(x^3-1\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1-(1/((3-3*x**3)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+2) (1-\\cos (2))-2+\\sin (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = sin(x)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tanh \\left(x^4-y\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 \\text{sech}^2\\left(x^4-y\\right) & \\text{sech}^2\\left(x^4-y\\right) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -tanh(x**4-y)\ng = asin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt[3]{z-y}$", - "Output Answer": [ - "$-\\frac{3 x^2}{\\sqrt{1-x^6}}+5 y^4+\\frac{1}{3 \\sqrt[3]{z-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**3)\ng = y**5\nh = cbrt(z-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(2 x^3+3\\right)-\\log (-8 x-8)$\n", - "Output Answer": [ - "$\\frac{6 x^2}{\\left(2 x^3+3\\right)^2+1}-\\frac{1}{x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(2*x**3+3)-log(-8*x-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = sin(z)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+1) (1-\\sin (1))-1-\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = cos(x)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{y^3}}$", - "Output Answer": [ - "$\\frac{27 y^4}{4 \\left(y^3\\right)^{5/2}}-\\frac{3 y}{\\left(y^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y**3)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{y^2}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 (x+y)^2 & 3 (x+y)^2 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{2 y}{z^2} & -\\frac{2 y^2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+y)**3\ng = y\nh = ((y**2)/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^3$, $g(x,y,z) = \\sinh (z (x+y))$, and $h(x,y,z) = \\cos (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 y^2 & 0 \\\\\n z \\cosh (z (x+y)) & z \\cosh (z (x+y)) & (x+y) \\cosh (z (x+y)) \\\\\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**3\ng = sinh(z*(x+y))\nh = cos(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (1-2 x)+\\tan (\\sin (6 x+6))$\n", - "Output Answer": [ - "$-\\frac{4}{(1-2 x)^2}-36 \\sec ^2(\\sin (6 (x+1))) \\left(\\sin (6 (x+1))-2 \\cos ^2(6 (x+1)) \\tan (\\sin (6 (x+1)))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(1-2*x)+tan(sin(6*x+6))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-3 x-2}+\\sin (3 x)$\n", - "Output Answer": [ - "$3 \\cos (3 x)-\\frac{3}{2 \\sqrt{-3 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-3*x-2)+sin(3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\tan ^{-1}(x z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{x^2 z^2+1},x \\sec ^2(x z),\\frac{z}{x^2 z^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = atan(x*z)\nh = atan(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(x+z),e^x\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = math.e**x\nh = math.e**x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\cos (x)+z+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y*z\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\log (z (x+y))$", - "Output Answer": [ - "$e^{x+y}+\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = math.e**z\nh = log(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt[3]{x-y}$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{1}{3 \\sqrt[3]{x-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cbrt(x-y)\nh = (1/(x**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^4}{x^4}$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{4 z^3}{x^4},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**4)/(x**4))\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tanh (x y)$, and $h(x,y,z) = z (x-y)$", - "Output Answer": [ - "$\\left\\{-z,-z,y \\text{sech}^2(x y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tanh(x*y)\nh = tanh(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y^2}-z\\right)$", - "Output Answer": [ - "$-\\frac{4 x^2 \\sin \\left(\\frac{x}{y^2}-z\\right)}{y^6}-\\frac{\\sin \\left(\\frac{x}{y^2}-z\\right)}{y^4}-\\sin \\left(\\frac{x}{y^2}-z\\right)+\\frac{6 x \\cos \\left(\\frac{x}{y^2}-z\\right)}{y^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/(y**2))-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = tan(x+y)\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{11 x}{2}+\\frac{3}{2}\\right)+\\sin \\left(\\frac{17 x}{2}+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(11 \\cos \\left(\\frac{1}{2} (11 x+3)\\right)+17 \\cos \\left(\\frac{1}{2} (17 x+15)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(((11*x)/2)+(3/2))+sin(((17*x)/2)+(15/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y-x)^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2}{(y-x)^3} & -\\frac{2}{(y-x)^3} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{3}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y-x)**2))\ng = y\nh = log(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = x^2 z^2$", - "Output Answer": [ - "$2 x^2 z+\\frac{1}{x^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sqrt(x)\nh = x**2*z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8 x^2-2}$\n", - "Output Answer": [ - "$16 e^{8 x^2-2} \\left(16 x^2+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8*x**2-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$\\frac{x^3}{6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{y}{x}\\right)^{3/2}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$-\\frac{3 y \\sqrt{\\frac{y}{x}}}{2 x^2}+\\frac{z}{2 \\sqrt{y z}}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)**(3/2)\ng = sqrt(y*z)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{1-\\frac{5 x}{2}} \\cos \\left(7 x+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{4} e^{1-\\frac{5 x}{2}} \\left(140 \\sin \\left(7 x+\\frac{5}{2}\\right)-171 \\cos \\left(7 x+\\frac{5}{2}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(1-((5*x)/2))*cos(7*x+(5/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+1)^2 \\left(-\\frac{11 \\sin (1)}{2}-4 \\cos (1)\\right)+(x+1) (4 \\sin (1)+\\cos (1))-\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = sin(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{1}{2}-\\frac{17 x^2}{2}\\right)$\n", - "Output Answer": [ - "$17 \\left(1-34 x^2 \\tan \\left(\\frac{1}{2} \\left(1-17 x^2\\right)\\right)\\right) \\sec ^2\\left(\\frac{1}{2} \\left(1-17 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan((1/2)-((17*x**2)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x z}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{z}{2 (x z)^{3/2}} & 0 & -\\frac{x}{2 (x z)^{3/2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(x*z)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{\\left(x+y^5\\right)^{3/2}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3}{2 \\left(x+y^5\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/((x+y**5)**(3/2)))\nh = (1/((x+y**5)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = acos(y)\nh = cbrt(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = (x-z)^{3/2}$", - "Output Answer": [ - "$-\\frac{3 \\sqrt{x-z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y*z)\ng = z**(3/2)\nh = (x-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^4\\right)$, $g(x,y,z) = \\frac{1}{y+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(y+z)^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x**4)\ng = (1/(y+z))\nh = (1/(y+z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{2 x}{\\sqrt{2 x^2-\\frac{15}{2}}}$\n", - "Output Answer": [ - "$-\\sqrt{2 x^2-\\frac{15}{2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((2*x)/(sqrt(2*x**2-(15/2))))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(9 x+6)-\\tan ^{-1}(x+6)$\n", - "Output Answer": [ - "$\\frac{9}{(9 x+6)^2+1}-\\frac{1}{(x+6)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(9*x+6)-atan(x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (6) \\cos (5-3 x)$\n", - "Output Answer": [ - "$-9 \\sin (6) \\cos (5-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6)*cos(5-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(5 x^4+4\\right)-\\cos \\left(\\frac{15}{2}-4 x\\right)$\n", - "Output Answer": [ - "$\\frac{20 x^3}{5 x^4+4}-4 \\sin \\left(\\frac{15}{2}-4 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x**4+4)-cos((15/2)-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x z}{y^2}\\right)$", - "Output Answer": [ - "$\\frac{4 x^3 z^3}{y^8 \\left(1-\\frac{x^2 z^2}{y^4}\\right)^{3/2}}+\\frac{x^3 z}{y^6 \\left(1-\\frac{x^2 z^2}{y^4}\\right)^{3/2}}+\\frac{6 x z}{y^4 \\sqrt{1-\\frac{x^2 z^2}{y^4}}}+\\frac{x z^3}{y^6 \\left(1-\\frac{x^2 z^2}{y^4}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x*z)/(y**2))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = tan(z)\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{729 x^3}{8}$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((729*x**3)/8)\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{y^4}{z^4}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{4 y^3}{z^4},-\\frac{4 y^4}{z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**4)/(z**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos \\left(x^5\\right)$", - "Output Answer": [ - "$\\log (x)-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cos(x**5)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos \\left(y+z^5\\right)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-5 z^4 \\sin \\left(y+z^5\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y\nh = cos(y+z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = \\frac{1}{x^4 z^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{\\frac{2}{x^4 z^3},\\frac{y}{2 \\sqrt{y z}},-\\frac{4}{x^5 z^2}-\\frac{z}{2 \\sqrt{y z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y*z)\ng = (1/(x**4*z**2))\nh = (1/(x**4*z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = cos(z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = \\cos \\left(y^4+z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 4 y^3 \\sec ^2\\left(y^4\\right) & 0 \\\\\n 0 & -4 y^3 \\sin \\left(y^4+z\\right) & -\\sin \\left(y^4+z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(y**4)\nh = cos(y**4+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(5 x^2+6\\right)+\\cos (3-4 x)$\n", - "Output Answer": [ - "$4 \\sin (3-4 x)-10 x \\sin \\left(5 x^2+6\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5*x**2+6)+cos(3-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-5 x-7)^4 \\sqrt{x-9}$\n", - "Output Answer": [ - "$\\frac{(5 x+7)^2 \\left(1575 x^2-24710 x+92111\\right)}{4 (x-9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-5*x-7)**4*sqrt(x-9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z \\sqrt{\\frac{y^2}{z^2}+1}}-1,0,1-\\frac{1}{2 x \\sqrt{\\frac{y}{x}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/x))\ng = x+z\nh = x+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-5 x)$ on the interval $x = 3$ to $x = 12$\n", - "Output Answer": [ - "$-\\sqrt{10}+\\sqrt{145}+\\tanh ^{-1}\\left(\\sqrt{10}\\right)-\\tanh ^{-1}\\left(\\sqrt{145}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-5*x)\na = 3\nb = 12\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (\\sin (5 x+4))$\n", - "Output Answer": [ - "$25 \\left(\\sin (\\sin (5 x+4)) \\cos ^2(5 x+4)+\\sin (5 x+4) \\cos (\\sin (5 x+4))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(sin(5*x+4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(3-6 x)^4$\n", - "Output Answer": [ - "$432 (3-6 x)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (3-6*x)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{1}{4 x^5}$\n", - "Output Answer": [ - "$\\frac{1}{16 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(1/(4*x**5))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+y)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+y)^2}}-\\frac{1}{y^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+y)\ng = (1/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^2-1}+\\sin \\left(6-7 x^5\\right)$\n", - "Output Answer": [ - "$5 x \\left(\\frac{1}{\\sqrt{5 x^2-1}}-7 x^3 \\cos \\left(6-7 x^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**2-1)+sin(6-7*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\log \\left(x z^5\\right)$, and $h(x,y,z) = \\sqrt{z^5}$", - "Output Answer": [ - "$2 x+\\frac{5 z^4}{2 \\sqrt{z^5}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = log(x*z**5)\nh = sqrt(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$7 x^5+e^{2 x+2}+3$\n", - "Output Answer": [ - "$4 \\left(35 x^3+e^{2 x+2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 7*x**5+math.e**(2*x+2)+3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y \\cos \\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\cos \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((y/x))\ng = log(z)\nh = sin((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = z$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = z\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(x^4+2\\right)-\\tan (5-3 x)$\n", - "Output Answer": [ - "$-\\frac{4 \\left(x^4-6\\right) x^2}{\\left(x^4+2\\right)^2}-18 \\tan (5-3 x) \\sec ^2(5-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x**4+2)-tan(5-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(5-7 x^2\\right) \\sqrt{8 x^3+6}$\n", - "Output Answer": [ - "$-\\frac{2 x \\left(49 x^3-15 x+21\\right)}{\\sqrt{2 x^3+\\frac{3}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((5-7*x**2)*sqrt(8*x**3+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/y)\ng = log(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{\\pi x^4}{48}+\\frac{x^3}{3}-\\frac{\\pi x^2}{4}-x+\\frac{\\pi }{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = (z-y)^5$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\frac{1}{x}-5 (z-y)^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = (z-y)**5\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n 0 & -\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y+z)\ng = tan((z/y))\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$e^{-2 x} \\cos (4 x)$\n", - "Output Answer": [ - "$-6$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(-2*x)*cos(4*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (z-y)^2$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -2 (z-y) & 2 (z-y) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z-y)**2\ng = cos(y)\nh = asinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x z)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{z}{x^2 z^2+1}-\\frac{3}{2 y^{5/2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x*z)\ng = (1/(y**(3/2)))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cbrt(y)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(\\cos (7 x))-e^{6 x+3}$\n", - "Output Answer": [ - "$-6 e^{6 x+3}-\\frac{14 \\sin (7 x)}{\\cos (14 x)+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(atan(cos(7*x))-math.e**(6*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = (y+z)^5$, and $h(x,y,z) = \\sqrt[3]{x-y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n \\frac{1}{3 \\sqrt[3]{x-y-z}^2} & -\\frac{1}{3 \\sqrt[3]{x-y-z}^2} & -\\frac{1}{3 \\sqrt[3]{x-y-z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (y+z)**5\nh = cbrt(x-y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = x+z\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5 z$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 z & y^5 \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5*z\ng = log(x)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tanh ^{-1}(x z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$1-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atanh(x*z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-8 x^2-4\\right)+(5 x-6)^5$\n", - "Output Answer": [ - "$\\frac{4 x}{2 x^2+1}+25 (6-5 x)^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-8*x**2-4)+(5*x-6)**5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{x y+z}$", - "Output Answer": [ - "$\\left\\{x e^{x y+z},y \\left(-e^{x y+z}\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x-1}-\\sqrt{8 x-1}$\n", - "Output Answer": [ - "$\\frac{16}{(8 x-1)^{3/2}}-\\frac{9}{(6 x-1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x-1)-sqrt(8*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{y^5}{x}\\right)$", - "Output Answer": [ - "$-\\frac{y^{10} \\sin \\left(\\frac{y^5}{x}\\right)}{x^4}-\\frac{25 y^8 \\sin \\left(\\frac{y^5}{x}\\right)}{x^2}+\\frac{2 y^5 \\cos \\left(\\frac{y^5}{x}\\right)}{x^3}+\\frac{20 y^3 \\cos \\left(\\frac{y^5}{x}\\right)}{x}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((y**5)/x))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\sin ^{-1}(x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+y)^2}}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = asin(x+y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\left(y+z^2\\right)^3$, and $h(x,y,z) = \\tan \\left(\\frac{y}{x^5}\\right)$", - "Output Answer": [ - "$3 \\left(y+z^2\\right)^2-\\frac{5 x^4}{\\sqrt{1-x^{10}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**5)\ng = (y+z**2)**3\nh = tan((y/(x**5)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-x^3-6}$\n", - "Output Answer": [ - "$\\frac{3 x \\left(x^3+24\\right)}{4 \\left(-x^3-6\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-x**3-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^4}$, $g(x,y,z) = \\sin ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\frac{4 y^3}{\\sqrt{1-y^8}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**4)\ng = asin(y**4)\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y^3 z}$, $g(x,y,z) = x y^3$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3 y^2 z}{2 \\sqrt{y^3 z}} & \\frac{y^3}{2 \\sqrt{y^3 z}} \\\\\n y^3 & 3 x y^2 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y**3*z)\ng = x*y**3\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin (x-y-z)$", - "Output Answer": [ - "$\\left\\{-\\cos (x-y-z),e^z-\\cos (x-y-z),0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2-\\left(6 x+\\frac{3}{2}\\right)^4$\n", - "Output Answer": [ - "$-81 (4 x+1)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2-(6*x+(3/2))**4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{21 x^2}{4 \\sqrt{-\\frac{7 x^3}{2}-8}}$\n", - "Output Answer": [ - "$\\sqrt{-\\frac{7 x^3}{2}-8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((21*x**2)/(4*sqrt(-((7*x**3)/2)-8)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{1}{2}-\\frac{3 x}{2}\\right)+\\tan \\left(\\frac{9 x}{2}+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{3}{2} \\left(\\sin \\left(\\frac{1}{2} (1-3 x)\\right)+3 \\sec ^2\\left(\\frac{1}{2} (9 x+5)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((1/2)-((3*x)/2))+tan(((9*x)/2)+(5/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x-z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-z)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x^4}}$, $g(x,y,z) = \\tan ^{-1}\\left(x^4 z\\right)$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\sec ^2(y-z)-\\frac{2 z}{x^5 \\sqrt{\\frac{z}{x^4}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/(x**4)))\ng = atan(x**4*z)\nh = -tan(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-\\sin (3-x))$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-sin(3-x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sqrt{\\frac{7}{2}} \\sqrt{x}$ on the interval $x = 5$ to $x = 5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt((7/2))*sqrt(x)\na = 5\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/z))\ng = x\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y^5+z$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y^5 & 5 x y^4 & 1 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y**5+z\ng = y**5\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{2 x^3}{\\sqrt{1-x^4}}$\n", - "Output Answer": [ - "$\\sqrt{1-x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((2*x**3)/(sqrt(1-x**4)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\cos (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(x^5-7\\right)+\\cos (3 x+3)$\n", - "Output Answer": [ - "$\\frac{5 x^4}{x^5-7}-3 \\sin (3 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x**5-7)+cos(3*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = (x y+z)^3$, and $h(x,y,z) = \\sinh (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 3 y (x y+z)^2 & 3 x (x y+z)^2 & 3 (x y+z)^2 \\\\\n z \\cosh (x z) & 0 & x \\cosh (x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (x*y+z)**3\nh = sinh(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2 y^2$, $g(x,y,z) = \\cos \\left(x+y+z^2\\right)$, and $h(x,y,z) = \\sin \\left(y+z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x y^2 & 2 x^2 y & 0 \\\\\n -\\sin \\left(x+y+z^2\\right) & -\\sin \\left(x+y+z^2\\right) & -2 z \\sin \\left(x+y+z^2\\right) \\\\\n 0 & \\cos \\left(y+z^2\\right) & 2 z \\cos \\left(y+z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2*y**2\ng = cos(x+y+z**2)\nh = sin(y+z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{(1-8 x)^3}-\\tan (1-7 x)$\n", - "Output Answer": [ - "$7 \\sec ^2(1-7 x)-\\frac{24}{(1-8 x)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/((1-8*x)**3))-tan(1-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x+6}-\\sin (5-7 x)$\n", - "Output Answer": [ - "$36 e^{6 x+6}+49 \\sin (5-7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x+6)-sin(5-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4 x+5}-\\cos \\left(3-8 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{2}{\\sqrt{4 x+5}}-40 x^4 \\sin \\left(3-8 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4*x+5)-cos(3-8*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7 x+\\frac{13}{2}\\right) \\cos \\left(8 x+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{14 \\cos \\left(8 x+\\frac{7}{2}\\right)}{14 x+13}-8 \\log \\left(7 x+\\frac{13}{2}\\right) \\sin \\left(8 x+\\frac{7}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x+(13/2))*cos(8*x+(7/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{28 x}{5}+\\frac{3}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{784}{(28 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((28*x)/5)+(3/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = y^3 z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{-y^3,1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = y**3*z\nh = y**3*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x+9}$\n", - "Output Answer": [ - "$-\\frac{9}{4 (3 x+9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{2 x}{\\sqrt{-2 x^2-9}}$\n", - "Output Answer": [ - "$\\sqrt{-2 x^2-9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((2*x)/(sqrt(-2*x**2-9)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+z)$, $g(x,y,z) = \\left(\\frac{y}{z}\\right)^{3/2}$, and $h(x,y,z) = \\sin ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{3 y \\sqrt{\\frac{y}{z}}}{2 z^2}+\\frac{1}{\\sqrt{1-(y+z)^2}},\\frac{1}{\\sqrt{1-(x+z)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+z)\ng = (y/z)**(3/2)\nh = (y/z)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+4 y^3 \\cos \\left(y^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(y**4)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{x^2}{2}+7\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{x^2}{2}+7\\right)-x^2 \\sin \\left(\\frac{x^2}{2}+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((x**2)/2)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^3 z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^{x^3}$", - "Output Answer": [ - "$\\frac{3 x^2 z}{2 \\sqrt{x^3 z}}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**3*z)\ng = sqrt(y)\nh = math.e**(x**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{\\frac{x}{y^4}}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 y^4 \\sqrt{\\frac{x}{y^4}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt((x/(y**4)))\nh = sqrt((x/(y**4)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{(y-z)^2}$", - "Output Answer": [ - "$5 x^4+\\frac{2}{(y-z)^3}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = log(y)\nh = (1/((y-z)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x^2+8}+\\tan (4-6 x)$\n", - "Output Answer": [ - "$\\frac{12 \\sqrt{2}}{\\left(3 x^2+4\\right)^{3/2}}+72 \\tan (4-6 x) \\sec ^2(4-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x**2+8)+tan(4-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x^3}{y}+z\\right)^5$", - "Output Answer": [ - "$\\frac{20 x^6 \\left(\\frac{x^3}{y}+z\\right)^3}{y^4}+\\frac{180 x^4 \\left(\\frac{x^3}{y}+z\\right)^3}{y^2}+\\frac{10 x^3 \\left(\\frac{x^3}{y}+z\\right)^4}{y^3}+\\frac{30 x \\left(\\frac{x^3}{y}+z\\right)^4}{y}+20 \\left(\\frac{x^3}{y}+z\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x**3)/y)+z)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{5}{3}-\\frac{13 x}{3}\\right)-\\tan ^{-1}\\left(\\frac{2 x}{3}+\\frac{14}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{48 (x+7)}{\\left(4 x^2+56 x+205\\right)^2}+\\frac{169}{9} \\sin \\left(\\frac{1}{3} (5-13 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((5/3)-((13*x)/3))-atan(((2*x)/3)+(14/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin (2 x)$ on the interval $x = 0$ to $x = 7$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{5} \\left(8 E\\left(\\frac{4}{5}\\right)+E\\left(14-4 \\pi \\left|\\frac{4}{5}\\right.\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(2*x)\na = 0\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+y)\ng = sqrt(y*z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x$", - "Output Answer": [ - "$(x-3)^2 \\left(-\\sin (3)-\\frac{3 \\cos (3)}{2}\\right)+(x-3) (\\cos (3)-3 \\sin (3))+3 \\cos (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{y}{x}}$, $g(x,y,z) = \\log (x-y)$, and $h(x,y,z) = \\sqrt[3]{x-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y e^{\\frac{y}{x}}}{x^2} & \\frac{e^{\\frac{y}{x}}}{x} & 0 \\\\\n \\frac{1}{x-y} & -\\frac{1}{x-y} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x-y}^2} & -\\frac{1}{3 \\sqrt[3]{x-y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y/x)\ng = log(x-y)\nh = cbrt(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^5\\right)$ and $g(x) = $\\sin ^{-1}(x)$", - "Output Answer": [ - "$i \\sqrt{2} \\sqrt{x-1} (-1)^{\\left\\lfloor -\\frac{\\arg (x-1)}{2 \\pi }\\right\\rfloor }-5 (x-1) \\sin (1)-\\frac{\\pi }{2}+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**5)\ng = asin(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x+z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}} & 0 & \\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}} \\\\\n 0 & 4 y^3 & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x+z)\ng = y**4\nh = sin((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{7 x+6}}{5-5 x}$\n", - "Output Answer": [ - "$\\frac{7 x+19}{10 (x-1)^2 \\sqrt{7 x+6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(7*x+6))/(5-5*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = cos((z/x))\nh = tan((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\tanh \\left(x^4\\right)$", - "Output Answer": [ - "$625 \\coth (625)-500 (x-5) \\left(-625+625 \\coth ^2(625)-\\coth (625)\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = tanh(x**4)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x+y}{z}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x+y}{z^2},-\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/z)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = -\\tan (x-y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\sec ^2(x-y)+\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = -tan(x-y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^4}$, $g(x,y,z) = y^4$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$4 y^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**4)\ng = y**4\nh = x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{3}{2}-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{2} \\tan \\left(\\frac{3}{2}-\\frac{3 x}{2}\\right) \\sec ^2\\left(\\frac{3 (x-1)}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan((3/2)-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = e^{x-z}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{e^{x-z},0,e^{x-z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = math.e**(x-z)\nh = math.e**(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin \\left(x-z^5\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = z^{25}$", - "Output Answer": [ - "$\\left\\{0,5 z^4 \\cos \\left(x-z^5\\right),1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-z**5)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = \\cos ^{-1}(y+z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y+z)^2}} & -\\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*y)\ng = acos(y+z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}\\left(x^4\\right)$ and $g(x) = $x^2$", - "Output Answer": [ - "$x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x**4)\ng = x**2\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x+y}{z}\\right)$", - "Output Answer": [ - "$e^x-\\frac{x+y}{z^2 \\sqrt{1-\\frac{(x+y)^2}{z^2}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(x)\nh = asin((x+y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x^2 y^2 z^2$", - "Output Answer": [ - "$2 x^2 y^2 z+\\frac{1}{x}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cos(y)\nh = x**2*y**2*z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-2 \\tan \\left(2 x+\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$\\log \\left(\\cos \\left(2 x+\\frac{3}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -2*tan(2*x+(3/2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)} & 0 & -\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x/z)\ng = sqrt(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-9 x-7}-e^{6 x+8}$\n", - "Output Answer": [ - "$81 e^{-9 x-7}-36 e^{6 x+8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-9*x-7)-math.e**(6*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$e^{x+z}+2 y+\\sec ^2(z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = y**2\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & -1 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-z\ng = (1/y)\nh = sin((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = (z (x+y))^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n \\frac{3}{2} z \\sqrt{z (x+y)} & \\frac{3}{2} z \\sqrt{z (x+y)} & \\frac{3}{2} (x+y) \\sqrt{z (x+y)} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = log(x+y)\nh = (z*(x+y))**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{2-8 x}-\\tan ^{-1}(8 x+3)$\n", - "Output Answer": [ - "$\\frac{128 (8 x+3)}{\\left((8 x+3)^2+1\\right)^2}-64 e^{2-8 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(2-8*x)-atan(8*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$e^y-\\frac{1}{y-x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-x)\ng = math.e**y\nh = acos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y^5-x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$5 y^4 e^{y^5-x}+2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(y**5-x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\sin ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n \\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & \\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(z)\nh = asin(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y+z\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{(z-y)^{3/2}}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2 (z-y)^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/((z-y)**(3/2)))\nh = (1/((z-y)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(4 x+4)^2}$\n", - "Output Answer": [ - "$\\frac{3}{8 (x+1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((4*x+4)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x^4}{z}}}$, $g(x,y,z) = \\sqrt{x^4+z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}-\\frac{2 x^3}{z \\left(\\frac{x^4}{z}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(((x**4)/z))))\ng = sqrt(x**4+z)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{24 x^3}{\\left(5-6 x^4\\right)^2+1}$\n", - "Output Answer": [ - "$-\\tan ^{-1}\\left(5-6 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((24*x**3)/((5-6*x**4)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x+y}{z}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cosh (x+z)$", - "Output Answer": [ - "$\\frac{1}{z \\left(\\frac{(x+y)^2}{z^2}+1\\right)}+\\sinh (x+z)+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x+y)/z)\ng = log(y)\nh = cosh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = sqrt(y)\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2-\\frac{15 x^4}{2}\\right)-\\left(\\frac{11 x}{2}-\\frac{1}{2}\\right)^5$\n", - "Output Answer": [ - "$30 x^3 \\sin \\left(2-\\frac{15 x^4}{2}\\right)-\\frac{55}{32} (1-11 x)^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2-((15*x**4)/2))-(((11*x)/2)-(1/2))**5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y}+z^2\\right)$", - "Output Answer": [ - "$-\\frac{x^2 \\sin \\left(\\frac{x}{y}+z^2\\right)}{y^4}-\\frac{\\sin \\left(\\frac{x}{y}+z^2\\right)}{y^2}+\\frac{2 x \\cos \\left(\\frac{x}{y}+z^2\\right)}{y^3}-4 z^2 \\sin \\left(\\frac{x}{y}+z^2\\right)+2 \\cos \\left(\\frac{x}{y}+z^2\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/y)+z**2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x+y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x+y-z}},-\\frac{1}{2 \\sqrt{x+y-z}},-\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 5, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & \\cosh (y) & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = sinh(y)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan ^{-1}(2 x+2)}{(5-x)^2}$\n", - "Output Answer": [ - "$\\frac{2 \\left(\\frac{x-5}{4 x^2+8 x+5}-\\tan ^{-1}(2 x+2)\\right)}{(5-x)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((atan(2*x+2))/((5-x)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x^2+1}} & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(x)\ng = log(y)\nh = tan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x+3)+\\tan ^{-1}(7-6 x)$\n", - "Output Answer": [ - "$\\frac{7}{7 x+3}-\\frac{6}{(7-6 x)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x+3)+atan(7-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^4$", - "Output Answer": [ - "$-\\frac{1}{8} (x-2)^3+\\frac{3}{16} (x-2)^2+\\frac{2-x}{4}+\\frac{1}{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**4\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (x+6)}{\\left(3 x^2+6\\right)^4}$\n", - "Output Answer": [ - "$-\\frac{\\left(x^2+2\\right) \\sin (x+6)+8 x \\cos (x+6)}{81 \\left(x^2+2\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(x+6))/((3*x**2+6)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{x^4}{y^4}$, and $h(x,y,z) = \\cosh ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n \\frac{4 x^3}{y^4} & -\\frac{4 x^4}{y^5} & 0 \\\\\n 0 & -\\frac{z}{y^2 \\sqrt{\\frac{z}{y}-1} \\sqrt{\\frac{z}{y}+1}} & \\frac{1}{y \\sqrt{\\frac{z}{y}-1} \\sqrt{\\frac{z}{y}+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = ((x**4)/(y**4))\nh = acosh(z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{23}{3}-\\frac{19 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{361}{9} \\sin \\left(\\frac{1}{3} (23-19 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin((23/3)-((19*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y**5\nh = tan(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{12}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left\\{0,12 z^{11},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**12\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}-\\frac{z}{y^2}+\\cos (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = (z/y)\nh = sin(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4 x^4-\\frac{9}{2}}$\n", - "Output Answer": [ - "$16 e^{4 x^4-\\frac{9}{2}} x^2 \\left(16 x^4+3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4*x**4-(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{x}{y}+z}$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{e^{\\frac{x}{y}+z}}{y} & -\\frac{x e^{\\frac{x}{y}+z}}{y^2} & e^{\\frac{x}{y}+z} \\\\\n -\\frac{1}{2 z \\left(\\frac{x}{z}\\right)^{3/2}} & 0 & \\frac{x}{2 z^2 \\left(\\frac{x}{z}\\right)^{3/2}} \\\\\n y e^{x y} & x e^{x y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**((x/y)+z)\ng = (1/(sqrt((x/z))))\nh = math.e**(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-3 x-7) \\cos (5 x+9)$\n", - "Output Answer": [ - "$\\frac{3 \\cos (5 x+9)}{3 x+7}-5 \\log (-3 x-7) \\sin (5 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-3*x-7)*cos(5*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x-y)^2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{2}{(x-y)^3}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((x-y)**2))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, and $h(x,y,z) = \\sqrt{x y-z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{1}{2 (x+y)^{3/2}} & -\\frac{1}{2 (x+y)^{3/2}} & 0 \\\\\n \\frac{y}{2 \\sqrt{x y-z^5}} & \\frac{x}{2 \\sqrt{x y-z^5}} & -\\frac{5 z^4}{2 \\sqrt{x y-z^5}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(x+y)))\nh = sqrt(x*y-z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 y^2 z^6}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\tan \\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{6}{x^2 y^2 z^7},\\frac{2}{x^2 y^3 z^6}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*y**2*z**6))\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**(3/2)\ng = acos(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y}+z\\right)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{\\sin \\left(\\frac{x}{y}+z\\right)}{y}-\\frac{1}{\\sqrt{1-y^2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/y)+z)\ng = acos(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = z\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$(x+1) (-2-3 \\cos (1))+1+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = sin(x**3)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,y \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(x*y)\nh = tan(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{z}\\right)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{x^2 z^2+1}-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},-\\frac{1}{z \\sqrt{1-\\frac{y^2}{z^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y/z)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tanh (x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\text{sech}^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = tanh(x)\nh = tanh(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(z^3 (x+y)\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z^3}{z^6 (x+y)^2+1},\\frac{z^3}{z^6 (x+y)^2+1},\\frac{3 z^2 (x+y)}{z^6 (x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z**3*(x+y))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{8-3 x}-1$\n", - "Output Answer": [ - "$\\frac{3}{(8-3 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(8-3*x))-1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tan ^{-1}(x-y+z)$, and $h(x,y,z) = \\cos ^{-1}(x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n \\frac{1}{(x-y+z)^2+1} & -\\frac{1}{(x-y+z)^2+1} & \\frac{1}{(x-y+z)^2+1} \\\\\n -\\frac{1}{\\sqrt{1-(x-z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = atan(x-y+z)\nh = acos(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y-z^4\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = e^{z^4 \\left(x^4-y\\right)}$", - "Output Answer": [ - "$4 z^3 \\left(x^4-y\\right) e^{z^4 \\left(x^4-y\\right)}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y-z**4)\ng = asin(y)\nh = math.e**(z**4*(x**4-y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & 0 & 2 z \\\\\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = z**2\nh = sin(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = e^{x y^3}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,-1,y^3 e^{x y^3}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = math.e**(x*y**3)\nh = math.e**(x*y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$-\\frac{x^2}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cos(x**2)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,\\frac{x}{\\sqrt{1-x^2 z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*z)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-3 x-2} (2 x-6)^4$\n", - "Output Answer": [ - "$-16 e^{-3 x-2} (x-3)^3 (3 x-13)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-3*x-2)*(2*x-6)**4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y/z}$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{e^{y/z}}{z} & -\\frac{y e^{y/z}}{z^2} \\\\\n \\frac{1}{x} & -\\frac{1}{y} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y/z)\ng = log((x/y))\nh = cbrt(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\log \\left(y^4\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = log(y**4)\nh = log(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y-z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x+\\frac{7}{2}}$\n", - "Output Answer": [ - "$-\\frac{9}{\\left(6 x+\\frac{7}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x+(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{11}{2}-2 x\\right)-\\log (5 x-4)$\n", - "Output Answer": [ - "$\\frac{5}{4-5 x}+2 \\sin \\left(\\frac{11}{2}-2 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((11/2)-2*x)-log(5*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(\\frac{22 x^4}{3}+\\frac{13}{3}\\right)^3}$\n", - "Output Answer": [ - "$\\frac{92664 x^2 \\left(22 x^4-3\\right)}{\\left(22 x^4+13\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((((22*x**4)/3)+(13/3))**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\cos (y-z)$", - "Output Answer": [ - "$\\left\\{1-\\sin (y-z),\\frac{1}{\\sqrt{1-z^2}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = x-z\nh = x-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{3}{2 x^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+4)^5-20 (x+4)^4+161 (x+4)^3-652 (x+4)^2+1328 (x+4)-1088$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = x**5\nseries = f.subs(x, g).series(x, -4, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n 0 & 1 & 0 \\\\\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((z/x))\ng = y\nh = sin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = e^{x^5}$ and $g(x) = $\\sqrt{x^2}$", - "Output Answer": [ - "$\\frac{3272960 (x+4)^2}{e^{1024}}+\\frac{5119 (x+4)}{e^{1024}}+\\frac{4}{e^{1024}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**5)\ng = sqrt(x**2)\nseries = f.subs(x, g).series(x, -4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\begin{cases}\n x+\\sqrt[3]{x} & x>0 \\\\\n x-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{x}}}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{y}{2 x^2 \\left(\\frac{y}{x}\\right)^{3/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((y/x))))\ng = sin(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x}+\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = atan(x)\nh = tan((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = z^8$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y)-8 z^7,0,-\\cos (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = z**8\nh = z**8\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cos \\left(y^4\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-4 y^3 \\sin \\left(y^4\\right)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = cos(y**4)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (7 x+7)-\\tan ^{-1}(8 x+7)$\n", - "Output Answer": [ - "$-\\frac{8}{(8 x+7)^2+1}-7 \\sin (7 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(7*x+7)-atan(8*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{1}{\\left(\\frac{y}{z}\\right)^{3/2}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)-\\frac{3}{2 z \\left(\\frac{y}{z}\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (1/((y/z)**(3/2)))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(4-2 x)$\n", - "Output Answer": [ - "$\\frac{8 (x-2)}{\\left(-4 x^2+16 x-15\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(4-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6 x^3+3\\right)$\n", - "Output Answer": [ - "$-36 x \\left(\\sin \\left(6 x^3+3\\right)+9 x^3 \\cos \\left(6 x^3+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6*x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z}$, $g(x,y,z) = \\tanh ^{-1}(z)$, and $h(x,y,z) = y^3 z^3$", - "Output Answer": [ - "$3 y^3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/z)\ng = atanh(z)\nh = y**3*z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z \\text{sech}^2\\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\text{sech}^2\\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(z/y)\ng = (1/z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$-\\frac{3 x^2}{\\sqrt{1-x^6}}-\\frac{1}{2 z^{3/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**3)\ng = y\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(1-5 x^2\\right)-\\tan (4-6 x)$\n", - "Output Answer": [ - "$10 x \\sin \\left(1-5 x^2\\right)+6 \\sec ^2(4-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(1-5*x**2)-tan(4-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}}+\\text{sech}^2(y)+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y/x)\ng = tanh(y)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{y}}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z e^{\\frac{z}{y}}}{y^2} & \\frac{e^{\\frac{z}{y}}}{y} \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/y)\ng = (1/(sqrt(y)))\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\tan \\left(x z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n z^4 \\sec ^2\\left(x z^4\\right) & 0 & 4 x z^3 \\sec ^2\\left(x z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = cos(x)\nh = tan(x*z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{x}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x-y)^5$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 (x-y)^4 & -5 (x-y)^4 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x-y)**5\ng = cbrt(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{5}{2 \\sqrt{-5 x-6}}$\n", - "Output Answer": [ - "$\\sqrt{-5 x-6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(5/(2*sqrt(-5*x-6)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (y)$, $g(x,y,z) = y-x$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\text{sech}^2(y) & 0 \\\\\n -1 & 1 & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(y)\ng = y-x\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-z)^5$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$5 (x-z)^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-z)**5\ng = (1/(sqrt((x/z))))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{x}{2 y^2 \\left(\\frac{x}{y}\\right)^{3/2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((z/y))\ng = (1/(sqrt((x/y))))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log \\left(\\frac{x+y}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & -\\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log(((x+y)/z))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{y}}$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z e^{\\frac{z}{y}}}{y^2} & \\frac{e^{\\frac{z}{y}}}{y} \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/y)\ng = tan(x)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z^4}$, $g(x,y,z) = \\frac{1}{x^2 y^2}$, and $h(x,y,z) = \\cos \\left(\\frac{z^4}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z^4 \\sin \\left(\\frac{z^4}{x}\\right)}{x^2}-\\frac{4 y}{z^5},-\\frac{2}{x^3 y^2}-\\frac{1}{z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(z**4))\ng = (1/(x**2*y**2))\nh = (1/(x**2*y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x-4}-\\sqrt{-3 x^2-5}$\n", - "Output Answer": [ - "$36 e^{6 x-4}-\\frac{15}{\\left(-3 x^2-5\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x-4)-sqrt(-3*x**2-5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\left(y^4+z\\right)^2$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & 0 \\\\\n 0 & 8 y^3 \\left(y^4+z\\right) & 2 \\left(y^4+z\\right) \\\\\n e^x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4\ng = (y**4+z)**2\nh = math.e**x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{1}{z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = x$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = x\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = (x+y+z)^{3/2}$", - "Output Answer": [ - "$\\frac{3}{2} \\sqrt{x+y+z}+\\cos (x)+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = tan(y)\nh = (x+y+z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{\\frac{z}{x^2}}$", - "Output Answer": [ - "$\\frac{1}{2 x^2 \\sqrt{\\frac{z}{x^2}}}+2 e^{x^2} x+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2)\ng = sqrt(y)\nh = sqrt((z/(x**2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y}-\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = sqrt(z)\nh = acos(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = tan(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = (x-z)^4$, and $h(x,y,z) = e^{z-y}$", - "Output Answer": [ - "$\\left\\{4 (x-z)^3-e^{z-y},0,4 (x-z)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (x-z)**4\nh = (x-z)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{x+z}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{-e^{x+z},0,e^{x+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(x+z)\nh = math.e**(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (5-8 x)+\\tan (8-3 x)$\n", - "Output Answer": [ - "$2 \\left(64 \\tan (5-8 x) \\sec ^2(5-8 x)+9 \\tan (8-3 x) \\sec ^2(8-3 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(5-8*x)+tan(8-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^3\\right)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{11731 (x-4)^3}{943296}-\\frac{739 (x-4)^2}{9248}+\\frac{47 (x-4)}{68}+6 \\log (2)-\\tan ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**3)\ng = atan(x)\nseries = f.subs(x, g).series(x, 4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(y^3+z\\right)$", - "Output Answer": [ - "$-6 y \\sin \\left(y^3+z\\right)-9 y^4 \\cos \\left(y^3+z\\right)-\\cos \\left(y^3+z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y**3+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{x-y}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{2 \\sqrt{x-y}}-\\frac{y}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sqrt(x-y)\nh = (y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = -\\sin ^{-1}(y-z)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left\\{z \\cos (y z)-\\frac{1}{\\sqrt{1-(y-z)^2}},\\cos (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = -asin(y-z)\nh = -asin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\tan (x-y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n \\sec ^2(x-y) & -\\sec ^2(x-y) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((z/x))\ng = tan(x-y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^{3/2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**(3/2)\ng = log(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(3 x^5-9\\right)+\\frac{1}{(3 x+4)^3}$\n", - "Output Answer": [ - "$\\frac{5 x^4}{x^5-3}-\\frac{9}{(3 x+4)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x**5-9)+(1/((3*x+4)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 5 y^4 \\sec ^2\\left(y^5\\right) & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = tan(y**5)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(x/y)\nh = tan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}}+\\frac{1}{y+z}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x/y)\ng = log(y+z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+1}-\\sin ^{-1}(2-8 x)$\n", - "Output Answer": [ - "$e^{x+1}+\\frac{8}{\\sqrt{1-4 (1-4 x)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+1)-asin(2-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{\\frac{x+y}{z}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{x+y}{2 z^2 \\sqrt{\\frac{x+y}{z}}},0,\\frac{1}{2 z \\sqrt{\\frac{x+y}{z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(((x+y)/z))\nh = sqrt(((x+y)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = -\\tan \\left(y^2-z\\right)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$x \\cos (x z)-2 y \\sec ^2\\left(y^2-z\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = -tan(y**2-z)\nh = sin(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 3 z^2 \\\\\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**3\ng = sin(x*y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{3 x}{2}-\\frac{9}{2}}-\\sin ^{-1}(7-3 x)$\n", - "Output Answer": [ - "$-\\frac{9 (7-3 x)}{\\left(1-(7-3 x)^2\\right)^{3/2}}-\\frac{9}{16 \\left(-\\frac{3 x}{2}-\\frac{9}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-((3*x)/2)-(9/2))-asin(7-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cosh (x+z)$", - "Output Answer": [ - "$\\sinh (x+z)+\\frac{1}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = log(y)\nh = cosh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\sinh (y)-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cosh(y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{2 x^6}{9}+x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$160 (x+1)^4$\n", - "Output Answer": [ - "$32 (x+1)^5$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 160*(x+1)**4\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$1-\\frac{3}{2 x^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,y e^{x y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(x*y)\nh = math.e**(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y-z)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{1}{3 y \\sqrt[3]{\\frac{z}{y}}^2}-\\sin (y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y-z)\nh = cbrt(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{3 \\tan (6)}{2 \\sqrt{3 x-8}}$\n", - "Output Answer": [ - "$-\\sqrt{3 x-8} \\tan (6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((3*tan(6))/(2*sqrt(3*x-8)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = z\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = log(y*z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^3$, $g(x,y,z) = x y$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{0,3 (x+z)^2-1,y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**3\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^{\\frac{x}{y z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n \\frac{e^{\\frac{x}{y z}}}{y z} & -\\frac{x e^{\\frac{x}{y z}}}{y^2 z} & -\\frac{x e^{\\frac{x}{y z}}}{y z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = cbrt(y)\nh = math.e**(x/(y*z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(5-8 x^2\\right)$\n", - "Output Answer": [ - "$16 \\left(32 x^2 \\tan \\left(5-8 x^2\\right)-1\\right) \\sec ^2\\left(5-8 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(5-8*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^{\\frac{y}{x}}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 y^{3/2}},0,-\\frac{y e^{\\frac{y}{x}}}{x^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**(y/x)\nh = math.e**(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{1-5 x}+\\cos (5-7 x)$\n", - "Output Answer": [ - "$25 e^{1-5 x}-49 \\cos (5-7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(1-5*x)+cos(5-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\cos ^{-1}\\left(7-x^4\\right)}-\\log \\left(x^4-6\\right)$\n", - "Output Answer": [ - "$4 x^3 \\left(\\frac{1}{6-x^4}+\\frac{e^{\\cos ^{-1}\\left(7-x^4\\right)}}{\\sqrt{-x^8+14 x^4-48}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(acos(7-x**4))-log(x**4-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log(y)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\left\\{z e^{y z},0,-\\frac{y \\sec ^2\\left(\\frac{y}{x}\\right)}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan((y/x))\nh = tan((y/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,x \\cos (x z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z)\ng = log(y**5)\nh = log(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y^2}}$, and $h(x,y,z) = \\left(x-y^2-z\\right)^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{y}{\\left(y^2\\right)^{3/2}} & 0 \\\\\n 4 \\left(x-y^2-z\\right)^3 & -8 y \\left(x-y^2-z\\right)^3 & -4 \\left(x-y^2-z\\right)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = (1/(sqrt(y**2)))\nh = (x-y**2-z)**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(y z)^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(y-x)^2}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y*z)**(3/2)))\ng = y\nh = (1/((y-x)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6-3 x}$\n", - "Output Answer": [ - "$-\\frac{9}{4 (6-3 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x^4-y}{z}}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 x^3}{z \\left(\\frac{x^4-y}{z}\\right)^{3/2}},\\frac{1}{2 z \\left(\\frac{x^4-y}{z}\\right)^{3/2}},\\frac{x^4-y}{2 z^2 \\left(\\frac{x^4-y}{z}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(((x**4-y)/z))))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y+z}^2},0,-\\frac{1}{y-x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\sqrt{\\frac{y}{z}}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & \\frac{1}{2 z \\sqrt{\\frac{y}{z}}} & -\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}} \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = sqrt((y/z))\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = x y-z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$x-\\sin (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = x*y-z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{x}}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{1}{2 x \\left(\\frac{y}{x}\\right)^{3/2}}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt((y/x))))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$-\\frac{1}{x^2}+\\frac{1}{2 \\sqrt{x+y}}+x \\sec ^2(x z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sqrt(x+y)\nh = tan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{4 x^3}{\\sqrt{2-2 x^4}}$\n", - "Output Answer": [ - "$\\sqrt{2-2 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((4*x**3)/(sqrt(2-2*x**4)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-2 x-2} \\sin (4 x+6)$\n", - "Output Answer": [ - "$-\\frac{\\sin (4 x+6)+8 (x+1) \\cos (4 x+6)}{\\sqrt{2} \\sqrt{-x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-2*x-2)*sin(4*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(6 x^5+1\\right)-\\frac{x}{2}-1$\n", - "Output Answer": [ - "$120 x^3 \\cos \\left(6 x^5+1\\right)-900 x^8 \\sin \\left(6 x^5+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6*x**5+1)-(x/2)-1\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (z)$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(z)\ng = (y/x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-2 x-\\tan (4-2 x)+4$\n", - "Output Answer": [ - "$2 \\tan ^2(4-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-2*x-tan(4-2*x)+4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^4}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{4}{x^5}+\\frac{1}{y}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**4))\ng = log(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\frac{x^4}{z^4}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/z))\ng = ((x**4)/(z**4))\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left\\{e^{y+z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{y^3}{z^3}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\sin (x)+\\frac{3 y^2}{z^3}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = ((y**3)/(z**3))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5-7 x^2}$\n", - "Output Answer": [ - "$-\\frac{35}{\\left(5-7 x^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5-7*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = sqrt(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\log \\left(\\frac{x^5}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n \\frac{5}{x} & 0 & -\\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = y**(3/2)\nh = log(((x**5)/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(3 x-4)^4}$\n", - "Output Answer": [ - "$\\frac{180}{(4-3 x)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((3*x-4)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = \\sin \\left(y z^5\\right)$, and $h(x,y,z) = z^{25}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & z^5 \\cos \\left(y z^5\\right) & 5 y z^4 \\cos \\left(y z^5\\right) \\\\\n 0 & 0 & 25 z^{24} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y)\ng = sin(y*z**5)\nh = z**25\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{x}{3}-\\frac{17}{3}\\right)^4$\n", - "Output Answer": [ - "$\\frac{4}{27} (x-17)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((x/3)-(17/3))**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x^5+y-z\\right)^3$", - "Output Answer": [ - "$150 x^8 \\left(x^5+y-z\\right)+60 x^3 \\left(x^5+y-z\\right)^2+12 \\left(x^5+y-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**5+y-z)**3\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = sin(z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{y z^2}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{y^2 z^2},-\\frac{2}{y z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y*z**2))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^4}{y^{12} z^4}$", - "Output Answer": [ - "$\\frac{156 x^4}{y^{14} z^4}+\\frac{20 x^4}{y^{12} z^6}+\\frac{12 x^2}{y^{12} z^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(y**12*z**4))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$-\\frac{x}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = math.e**x\nh = (x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin ^{-1}\\left(z^2\\right)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+4 y^3+\\frac{2 z}{\\sqrt{1-z^4}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**4\nh = asin(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$5 e^{-5 x-1}+\\frac{1}{x-1}$\n", - "Output Answer": [ - "$\\log (x-1)-e^{-5 x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 5*math.e**(-5*x-1)+(1/(x-1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x+z},0,\\frac{1}{x+z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(x+z)\nh = log(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{x^2}\\right)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 z \\sin \\left(\\frac{z}{x^2}\\right)}{x^3} & 0 & -\\frac{\\sin \\left(\\frac{z}{x^2}\\right)}{x^2} \\\\\n 0 & \\sinh (y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((z/(x**2)))\ng = cosh(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\sin (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cos((x/z))\nh = sin(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = y\nh = x+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(8-9 x^2\\right)$\n", - "Output Answer": [ - "$18 \\left(\\sin \\left(8-9 x^2\\right)-18 x^2 \\cos \\left(8-9 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8-9*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x y)^{3/2}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x}},-\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)}-\\frac{3}{2} x \\sqrt{x y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y)**(3/2)\ng = atan(y/x)\nh = atan(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^5$, $g(x,y,z) = e^{y z^4}$, and $h(x,y,z) = \\sin \\left(z^4\\right)$", - "Output Answer": [ - "$5 (x+y)^4+z^4 e^{y z^4}+4 z^3 \\cos \\left(z^4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**5\ng = math.e**(y*z**4)\nh = sin(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left\\{e^{y+z},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-3 x^2-6} \\sqrt{x+3}$\n", - "Output Answer": [ - "$-\\frac{e^{-3 \\left(x^2+2\\right)} \\left(12 x^2+36 x-1\\right)}{2 \\sqrt{x+3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-3*x**2-6)*sqrt(x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3+y$, $g(x,y,z) = \\log \\left(\\frac{x^3}{y}\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 1 & 0 \\\\\n \\frac{3}{x} & -\\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3+y\ng = log(((x**3)/y))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-6 x-8}$\n", - "Output Answer": [ - "$-\\frac{9}{(-6 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-6*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(9 x^3-1\\right)^5$\n", - "Output Answer": [ - "$270 x \\left(9 x^3-1\\right)^3 \\left(63 x^3-1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (9*x**3-1)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(x+y),-\\sec ^2(x+y)-1,\\frac{\\cos \\left(\\frac{x}{y}\\right)}{y}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = sin((x/y))\nh = sin((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin \\left(\\frac{z}{y^3}\\right)$, and $h(x,y,z) = \\cos \\left(y^3-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\frac{3 z \\cos \\left(\\frac{z}{y^3}\\right)}{y^4} & \\frac{\\cos \\left(\\frac{z}{y^3}\\right)}{y^3} \\\\\n 0 & -3 y^2 \\sin \\left(y^3-z\\right) & \\sin \\left(y^3-z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sin((z/(y**3)))\nh = cos(y**3-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan (4 x)$\n", - "Output Answer": [ - "$-4 \\sec ^2(4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5-4 x} \\sqrt{-2 x-6}$\n", - "Output Answer": [ - "$\\frac{e^{5-4 x} \\left(64 x^2+368 x+527\\right)}{2 \\sqrt{2} (-x-3)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5-4*x)*sqrt(-2*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x^3+3}$\n", - "Output Answer": [ - "$15 e^{5 x^3+3} x \\left(15 x^3+2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+y+z)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt{x+y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+y+z} & \\frac{1}{x+y+z} & \\frac{1}{x+y+z} \\\\\n 0 & 1 & 1 \\\\\n \\frac{1}{2 \\sqrt{x+y-z}} & \\frac{1}{2 \\sqrt{x+y-z}} & -\\frac{1}{2 \\sqrt{x+y-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+y+z)\ng = y+z\nh = sqrt(x+y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = tan((z/x))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y z}}}$, and $h(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\frac{x}{2 y^2 z \\left(\\frac{x}{y z}\\right)^{3/2}}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(sqrt((x/(y*z)))))\nh = tan((x/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = -\\tan ^{-1}(y-z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{(y-z)^2+1}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y)\nh = -atan(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(9 x^4-2\\right)^2$\n", - "Output Answer": [ - "$216 x^2 \\left(21 x^4-2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (9*x**4-2)**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = y\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((x/z))\ng = sin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x+1} \\log (3 x+4)$\n", - "Output Answer": [ - "$\\frac{e^{4 x+1} (4 (3 x+4) \\log (3 x+4)+3)}{3 x+4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x+1)*log(3*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{e^{x^4+1}}$\n", - "Output Answer": [ - "$4 e^{x^4+e^{x^4+1}+1} x^2 \\left(4 \\left(e^{x^4+1}+1\\right) x^4+3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(math.e**(x**4+1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(z^5\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x^5 z^{25}$", - "Output Answer": [ - "$\\left\\{0,-5 x^4 z^{25}-\\frac{5 z^4}{\\sqrt{1-z^{10}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z**5)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (4 x-6) \\tan (3-4 x)$\n", - "Output Answer": [ - "$4 \\log (4 x-6) \\sec ^2(3-4 x)-\\frac{2 \\tan (3-4 x)}{2 x-3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(4*x-6)*tan(3-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$e^{-x/2}$\n", - "Output Answer": [ - "$-\\frac{1}{3840 e^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(-x/2))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$2 x+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sqrt(y)\nh = x**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y z^3}\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{3 x^2}{4 y^4 z^6 \\sqrt{\\frac{x}{y z^3}}}+\\frac{27 x^2}{4 y^2 z^8 \\sqrt{\\frac{x}{y z^3}}}+\\frac{3 x \\sqrt{\\frac{x}{y z^3}}}{y^3 z^3}+\\frac{3}{4 y^2 z^6 \\sqrt{\\frac{x}{y z^3}}}+\\frac{18 x \\sqrt{\\frac{x}{y z^3}}}{y z^5}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(y*z**3))**(3/2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x-y)$", - "Output Answer": [ - "$\\{\\sin (x-y),\\sin (x-y),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = e^z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-e^z,0,-x\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = math.e**z\nh = math.e**z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y}}$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left\\{\\sin (x+z)+\\frac{1}{y},0,\\frac{x}{2 (x y)^{3/2}}-\\sin (x+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y)))\ng = cos(x+z)\nh = cos(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x z^5\\right)$, $g(x,y,z) = \\left(\\frac{y}{z^5}\\right)^{3/2}$, and $h(x,y,z) = \\sin \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{15 y \\sqrt{\\frac{y}{z^5}}}{2 z^6},-5 x z^4 \\sin \\left(x z^5\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z**5)\ng = (y/(z**5))**(3/2)\nh = (y/(z**5))**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (y-x)^5$", - "Output Answer": [ - "$40 (y-x)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(2-7 x^2\\right)+\\cos (8 x+3)$\n", - "Output Answer": [ - "$14 \\left(28 x^2 \\tan \\left(2-7 x^2\\right)-1\\right) \\sec ^2\\left(2-7 x^2\\right)-64 \\cos (8 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(2-7*x**2)+cos(8*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-5 x-7) \\tan (4-x)$\n", - "Output Answer": [ - "$\\frac{5 \\tan (4-x)}{5 x+7}-\\log (-5 x-7) \\sec ^2(4-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-5*x-7)*tan(4-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2} \\sqrt{x} \\cos (2)$\n", - "Output Answer": [ - "$-\\frac{\\cos (2)}{2 \\sqrt{2} x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2)*sqrt(x)*cos(2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{2-3 x^2} \\sin \\left(9 x^5+4\\right)$\n", - "Output Answer": [ - "$-3 e^{2-3 x^2} x \\left(15 x^3 \\cos \\left(9 x^5+4\\right)-2 \\sin \\left(9 x^5+4\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(2-3*x**2)*sin(9*x**5+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x-6}+\\cos (7-8 x)$\n", - "Output Answer": [ - "$3 e^{3 x-6}+8 \\sin (7-8 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x-6)+cos(7-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{y^6}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$3 x^2-\\frac{6}{y^7}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/(y**6))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = log(z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x+\\sqrt{2-5 x}+2}$\n", - "Output Answer": [ - "$e^{-x+\\sqrt{2-5 x}+2} \\left(-\\frac{5}{2 \\sqrt{2-5 x}}-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x+sqrt(2-5*x)+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\sin ^{-1}(y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(y-z)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = asin(y-z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\sinh ^{-1}(x)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 x^{3/2}}-1,\\frac{1}{\\sqrt{x^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = asinh(x)\nh = asinh(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = (y-z)^5$, and $h(x,y,z) = \\sin \\left(\\frac{x^3}{y}+z\\right)$", - "Output Answer": [ - "$\\left\\{5 (y-z)^4-\\frac{x^3 \\cos \\left(\\frac{x^3}{y}+z\\right)}{y^2},-\\frac{3 x^2 \\cos \\left(\\frac{x^3}{y}+z\\right)}{y},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3)\ng = (y-z)**5\nh = (y-z)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+z}$, $g(x,y,z) = e^{x/y}$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$-\\frac{x e^{x/y}}{y^2}-\\frac{1}{(x+z)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+z))\ng = math.e**(x/y)\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (y-z)$, $g(x,y,z) = \\tan (x-y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\sec ^2(x-y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(y-z)\ng = tan(x-y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{\\sqrt{\\frac{7}{10}} \\sqrt{x}}{\\sqrt{-x}}$ on the interval $x = 0$ to $x = 8$\n", - "Output Answer": [ - "$8$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((sqrt((7/10))*sqrt(x))/(sqrt(-x)))\na = 0\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = \\frac{1}{x^5+y}$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$-\\frac{1}{\\left(x^5+y\\right)^2}+5 x^4 \\sec ^2\\left(x^5\\right)+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = (1/(x**5+y))\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-5}+\\cos (8-5 x)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{2 x-5}}+5 \\sin (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-5)+cos(8-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(y^4\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y^4}{z}\\right)$, and $h(x,y,z) = e^{y^4 z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n 0 & -\\frac{4 y^3}{z \\sqrt{1-\\frac{y^8}{z^2}}} & \\frac{y^4}{z^2 \\sqrt{1-\\frac{y^8}{z^2}}} \\\\\n 0 & 4 y^3 z e^{y^4 z} & y^4 e^{y^4 z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y**4)\ng = acos((y**4)/z)\nh = math.e**(y**4*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6 x) \\tan ^{-1}(7 x+3)$\n", - "Output Answer": [ - "$\\frac{7 \\sin (6 x)}{(7 x+3)^2+1}+6 \\cos (6 x) \\tan ^{-1}(7 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x)*atan(7*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x-8}+e^{7 x-1}$\n", - "Output Answer": [ - "$49 e^{7 x-1}-\\frac{9}{4 (3 x-8)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(3*x-8)+math.e**(7*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{1}{2 \\sqrt{x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z-y\nh = z-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log \\left(y^2\\right)$, and $h(x,y,z) = \\frac{x^2}{z^2}$", - "Output Answer": [ - "$-\\frac{2 x^2}{z^3}+\\frac{2}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y**2)\nh = ((x**2)/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = e^{y^2-z}$", - "Output Answer": [ - "$\\left\\{2 y e^{y^2-z},0,\\cos (x)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = cbrt(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2 \\left(\\frac{z^2}{y^2}+1\\right)},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(5 x-5)^3}-\\sqrt{6 x-1}$\n", - "Output Answer": [ - "$-\\frac{15}{(5 x-5)^4}-\\frac{3}{\\sqrt{6 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((5*x-5)**3))-sqrt(6*x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos ^{-1}(x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n -\\frac{1}{\\sqrt{1-(x-y)^2}} & \\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = acos(x-y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x y z^4\\right)$", - "Output Answer": [ - "$-\\frac{x y^3 z^{12}}{\\left(1-x^2 y^2 z^8\\right)^{3/2}}-\\frac{x^3 y z^{12}}{\\left(1-x^2 y^2 z^8\\right)^{3/2}}-\\frac{16 x^3 y^3 z^{10}}{\\left(1-x^2 y^2 z^8\\right)^{3/2}}-\\frac{12 x y z^2}{\\sqrt{1-x^2 y^2 z^8}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y*z**4)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2 x+2)+\\cos (5-5 x)$\n", - "Output Answer": [ - "$\\frac{1}{x+1}+5 \\sin (5-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2*x+2)+cos(5-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{\\left(z^3\\right)^{3/2}}$", - "Output Answer": [ - "$-\\frac{5 x^4}{\\sqrt{1-x^{10}}}+\\frac{1}{2 \\sqrt{y}}-\\frac{9 z^2}{2 \\left(z^3\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**5)\ng = sqrt(y)\nh = (1/((z**3)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{112 x^3}{\\left(49 x^8-98 x^4+53\\right)^{3/2}}$\n", - "Output Answer": [ - "$-\\frac{7 \\left(x^4-1\\right)}{\\sqrt{49 x^8-98 x^4+53}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((112*x**3)/((49*x**8-98*x**4+53)**(3/2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n y & x & 0 \\\\\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y+z)\ng = x*y\nh = asin(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\cosh \\left(y^5\\right)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,\\cos (z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = cosh(y**5)\nh = cosh(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = y$, and $h(x,y,z) = z (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n 0 & 1 & 0 \\\\\n z & z & x+y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = y\nh = z*(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}(y+z)$", - "Output Answer": [ - "$-\\frac{2 (y+z)}{\\left(1-(y+z)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (4 x+8)+\\tan (\\sin (9 x+5))$\n", - "Output Answer": [ - "$-\\frac{1}{(x+2)^2}-81 \\sec ^2(\\sin (9 x+5)) \\left(\\sin (9 x+5)-2 \\cos ^2(9 x+5) \\tan (\\sin (9 x+5))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x+8)+tan(sin(9*x+5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(x-z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{(x-z)^2+1} & 0 & -\\frac{1}{(x-z)^2+1} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = atan(x-z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((z/x))\ng = y\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(x+z)+1,\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = (x/y)\nh = (x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x y^3 z\\right)$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y^3 z}{\\sqrt{1-x^2 y^6 z^2}} & -\\frac{3 x y^2 z}{\\sqrt{1-x^2 y^6 z^2}} & -\\frac{x y^3}{\\sqrt{1-x^2 y^6 z^2}} \\\\\n 0 & 3 y^2 \\cos \\left(y^3\\right) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x*y**3*z)\ng = sin(y**3)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (5-x)+\\tan (5 x+7)$\n", - "Output Answer": [ - "$5 \\sec ^2(5 x+7)-\\cos (5-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(5-x)+tan(5*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2} & -\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y/z)\ng = y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6 x+3)-\\sin (8 x+4)$\n", - "Output Answer": [ - "$-6 \\sin (6 x+3)-8 \\cos (8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6*x+3)-sin(8*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y/x)\nh = cbrt(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x+2} \\log (4 x+9)$\n", - "Output Answer": [ - "$e^{5 x+2} \\left(\\frac{8 (20 x+43)}{(4 x+9)^2}+25 \\log (4 x+9)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x+2)*log(4*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x^5$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-5 x^4+\\frac{3 \\sqrt{y}}{2}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x**5\ng = y**(3/2)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(y^5\\right)$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x},0,-\\frac{z}{x^2}-\\frac{5}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y**5)\ng = (z/x)\nh = (z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\log \\left(\\frac{x y}{z^4}\\right)$, and $h(x,y,z) = e^{z^4}$", - "Output Answer": [ - "$\\left\\{\\frac{4}{z},0,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = log(((x*y)/(z**4)))\nh = log(((x*y)/(z**4)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(x-y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\cos (x-y) & \\cos (x-y) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{1}{\\sqrt{1-(x-y-z)^2}} & -\\frac{1}{\\sqrt{1-(x-y-z)^2}} & -\\frac{1}{\\sqrt{1-(x-y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -sin(x-y)\ng = asin(y)\nh = asin(x-y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(sqrt(y)))\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{x^3}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n -\\frac{3}{x^4} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = (1/(x**3))\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-x},\\frac{1}{y-x},-\\sin (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x y^3\\right)$\n", - "Output Answer": [ - "$\\left\\{y^3 \\cos \\left(x y^3\\right),3 x y^2 \\cos \\left(x y^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y**3)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{9 x-7} \\tan (8)$\n", - "Output Answer": [ - "$-81 e^{9 x-7} \\tan (8)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(9*x-7)*tan(8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7 x^2+4\\right)$\n", - "Output Answer": [ - "$14 \\left(\\cos \\left(7 x^2+4\\right)-14 x^2 \\sin \\left(7 x^2+4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x**2+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (y-x)^{3/2}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 \\sqrt{y-x}}{2} & \\frac{3 \\sqrt{y-x}}{2} & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n \\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)} & 0 & -\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y-x)**(3/2)\ng = (1/y)\nh = atan(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = x+z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 1 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x)\nh = x+z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x-y)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x-y} & -\\frac{1}{x-y} & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x-y)\ng = (1/(y**(3/2)))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\sqrt{4 x^2+6}\\right)-\\sin (8 x+5)$\n", - "Output Answer": [ - "$\\frac{2 x \\cos \\left(\\sqrt{4 x^2+6}\\right)}{\\sqrt{x^2+\\frac{3}{2}}}-8 \\cos (8 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(sqrt(4*x**2+6))-sin(8*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(x-3)^4$\n", - "Output Answer": [ - "$12 (x-3)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (x-3)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6 x+7} \\tan (6)$\n", - "Output Answer": [ - "$\\frac{3 \\tan (6)}{\\sqrt{6 x+7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6*x+7)*tan(6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{3 x^2+2} \\tan ^{-1}(6 x+1)$\n", - "Output Answer": [ - "$6 e^{3 x^2+2} \\left(-\\frac{1}{(6 x+1)^2+1}-x \\tan ^{-1}(6 x+1)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(3*x**2+2)*atan(6*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x y)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{\\sin (z),0,-\\frac{x}{x^2 y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x*y)\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6 x+3)-\\tan ^{-1}\\left(x^2+6\\right)$\n", - "Output Answer": [ - "$-\\frac{2 x}{\\left(x^2+6\\right)^2+1}-6 \\sin (6 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6*x+3)-atan(x**2+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(x^3+3\\right)+\\frac{1}{(8-8 x)^4}$\n", - "Output Answer": [ - "$\\frac{32}{(8-8 x)^5}-3 x^2 \\sin \\left(x^3+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(x**3+3)+(1/((8-8*x)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(z^2\\right)$, $g(x,y,z) = \\sin \\left(z^2\\right)$, and $h(x,y,z) = \\frac{1}{\\left(z^2-x\\right)^2}$", - "Output Answer": [ - "$-\\frac{4 z}{\\left(z^2-x\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z**2)\ng = sin(z**2)\nh = (1/((z**2-x)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+\\frac{1}{y}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = log(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{21 x}{5}+2}$\n", - "Output Answer": [ - "$\\frac{441}{25} e^{\\frac{21 x}{5}+2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((21*x)/5)+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = tan(y)\nh = (y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(y+z^2\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{15 z^2}{\\left(y+z^2\\right)^{7/2}}-\\frac{3}{\\left(y+z^2\\right)^{5/2}}+\\frac{15}{4 \\left(y+z^2\\right)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y+z**2)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (8-7 x)-\\sin (8-5 x)$\n", - "Output Answer": [ - "$25 \\sin (8-5 x)-49 \\cos (8-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8-7*x)-sin(8-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z (x+y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z*(x+y)\nh = (1/(sqrt(x)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{z-y}$, $g(x,y,z) = x$, and $h(x,y,z) = (x+z)^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -e^{z-y} & e^{z-y} \\\\\n 1 & 0 & 0 \\\\\n 4 (x+z)^3 & 0 & 4 (x+z)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z-y)\ng = x\nh = (x+z)**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{13 x^5}{2}-6\\right)+1$\n", - "Output Answer": [ - "$-\\frac{65 x^3 \\left(13 x^5+48\\right)}{\\left(12-13 x^5\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((13*x**5)/2)-6)+1\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 (x+y)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x+y)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$9 x^2$\n", - "Output Answer": [ - "$18$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 9*x**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\left(4 x^2-7\\right)^4 \\tan ^{-1}\\left(1-8 x^3\\right)$\n", - "Output Answer": [ - "$8 x \\left(4 x^2-7\\right)^3 \\left(\\frac{3 x \\left(4 x^2-7\\right)}{\\left(1-8 x^3\\right)^2+1}-4 \\tan ^{-1}\\left(1-8 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(4*x**2-7)**4*atan(1-8*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{z (x-y)}$", - "Output Answer": [ - "$-\\frac{2 (x-y)}{9 z \\sqrt[3]{z (x-y)}^2}-\\frac{4 z}{9 (x-y) \\sqrt[3]{z (x-y)}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z*(x-y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}},-\\frac{1}{x^2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = (1/(x*y))\nh = (1/(x*y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$7 e^{7 x+3}$\n", - "Output Answer": [ - "$e^{7 x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 7*math.e**(7*x+3)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y+z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y+z)\ng = y\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (\\cos (9-7 x))$\n", - "Output Answer": [ - "$-49 \\sec ^2(9-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(cos(9-7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = sqrt(z)\nh = y**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x y^4\\right)$, $g(x,y,z) = \\frac{x}{y^4}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y^4}{\\sqrt{1-x^2 y^8}} & -\\frac{4 x y^3}{\\sqrt{1-x^2 y^8}} & 0 \\\\\n \\frac{1}{y^4} & -\\frac{4 x}{y^5} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x*y**4)\ng = (x/(y**4))\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x-8)+\\cos ^{-1}(4-x)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{-x^2+8 x-15}}+\\frac{7}{7 x-8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x-8)+acos(4-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{(x+z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n -\\frac{2}{(x+z)^3} & 0 & -\\frac{2}{(x+z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(y)\nh = (1/((x+z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = y**5\nh = cos(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{1-x^2}-\\frac{x}{y^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = (x/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(6 x+\\frac{4}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{36 \\left(6 x+\\frac{4}{5}\\right)}{\\left(1-\\left(6 x+\\frac{4}{5}\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(6*x+(4/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{7-3 x} \\tan (5 x+6)$\n", - "Output Answer": [ - "$\\frac{(60 x+3 \\sin (2 (5 x+6))-140) \\sec ^2(5 x+6)}{4 \\sqrt{7-3 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(7-3*x)*tan(5*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-9 x-5}+\\sin ^{-1}(2-5 x)$\n", - "Output Answer": [ - "$-\\frac{9}{2 \\sqrt{-9 x-5}}-\\frac{5}{\\sqrt{1-(2-5 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-9*x-5)+asin(2-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 z^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2}{x^2 z^3}-\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*z**2))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = \\sin \\left(x^5+y\\right)$, and $h(x,y,z) = \\sin \\left(x^5+z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 \\sec ^2\\left(x^5\\right) & 0 & 0 \\\\\n 5 x^4 \\cos \\left(x^5+y\\right) & \\cos \\left(x^5+y\\right) & 0 \\\\\n 5 x^4 \\cos \\left(x^5+z^3\\right) & 0 & 3 z^2 \\cos \\left(x^5+z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x**5)\ng = sin(x**5+y)\nh = sin(x**5+z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{y}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = log(x*y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left\\{-1,\\frac{1}{3 y \\sqrt[3]{\\frac{z}{y}}^2},\\frac{z}{3 y^2 \\sqrt[3]{\\frac{z}{y}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z/y)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = y\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^4}{y^3}-z$", - "Output Answer": [ - "$\\frac{12 x^4}{y^5}+\\frac{12 x^2}{y^3}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(y**3))-z\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-\\left(4 x^4+2\\right)^2}-\\tan (8 x+5)$\n", - "Output Answer": [ - "$-\\frac{16 \\left(4 x^4+2\\right) x^3}{\\sqrt{1-4 \\left(2 x^4+1\\right)^2}}-8 \\sec ^2(8 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-(4*x**4+2)**2)-tan(8*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{z^3}$, and $h(x,y,z) = \\cos ^{-1}\\left(y+z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{z^2}{\\sqrt[3]{z^3}^2} \\\\\n 0 & -\\frac{1}{\\sqrt{1-\\left(y+z^3\\right)^2}} & -\\frac{3 z^2}{\\sqrt{1-\\left(y+z^3\\right)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cbrt(z**3)\nh = acos(y+z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y)\ng = y**5\nh = log(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = e^{y z^4}$, and $h(x,y,z) = \\sin ^{-1}(x y)$", - "Output Answer": [ - "$\\sec ^2(x)+z^4 e^{y z^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = math.e**(y*z**4)\nh = asin(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y+z}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{1}{2 (x+y+z)^{3/2}} & -\\frac{1}{2 (x+y+z)^{3/2}} & -\\frac{1}{2 (x+y+z)^{3/2}} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(x+y+z)))\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-10 e^{7-2 x^5} x^4$\n", - "Output Answer": [ - "$e^{7-2 x^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -10*math.e**(7-2*x**5)*x**4\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n e^{x-y} & -e^{x-y} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**(x-y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $e^{x^3}$", - "Output Answer": [ - "$\\frac{(x+4) (\\sin (4)+48 \\cos (4))}{e^{64}}+\\frac{\\cos (4)}{e^{64}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = math.e**(x**3)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = e^{y-z}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = math.e**(y-z)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = z^{12}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & 12 z^{11} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = z**12\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x+y^2+z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x+y^2+z}},\\frac{y}{\\sqrt{x+y^2+z}},\\frac{1}{2 \\sqrt{x+y^2+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y**2+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y+z)$, $g(x,y,z) = \\sqrt[3]{\\frac{x z}{y}}$, and $h(x,y,z) = \\tanh \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n \\frac{z}{3 y \\sqrt[3]{\\frac{x z}{y}}^2} & -\\frac{x z}{3 y^2 \\sqrt[3]{\\frac{x z}{y}}^2} & \\frac{x}{3 y \\sqrt[3]{\\frac{x z}{y}}^2} \\\\\n \\frac{\\text{sech}^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\text{sech}^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y+z)\ng = cbrt((x*z)/y)\nh = tanh(x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(9-4 x)^2 \\log (x+1)$\n", - "Output Answer": [ - "$\\frac{(4 x-9) (4 x+8 (x+1) \\log (x+1)-9)}{x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((9-4*x)**2*log(x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^5-x$", - "Output Answer": [ - "$20 z^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5-x\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{5 x-2} \\tan (4 x+9)$\n", - "Output Answer": [ - "$-\\frac{(80 x+5 \\sin (8 x+18)-32) \\sec ^2(4 x+9)}{4 \\sqrt{5 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(5*x-2)*tan(4*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cosh \\left(\\frac{27 x}{5}+\\frac{33}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{729}{25} \\cosh \\left(\\frac{3}{5} (9 x+11)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cosh(((27*x)/5)+(33/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{z^2}{y}}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{z^2}{2 y^2 \\sqrt{\\frac{z^2}{y}}},\\frac{z}{y \\sqrt{\\frac{z^2}{y}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((z**2)/y))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{\\frac{x-y}{z}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\frac{1}{2 z \\sqrt{\\frac{x-y}{z}}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sqrt(((x-y)/z))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = \\cos ^{-1}(x-y-z)$, and $h(x,y,z) = \\sin ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n -\\frac{1}{\\sqrt{1-(x-y-z)^2}} & \\frac{1}{\\sqrt{1-(x-y-z)^2}} & \\frac{1}{\\sqrt{1-(x-y-z)^2}} \\\\\n 0 & \\frac{1}{\\sqrt{1-(y-z)^2}} & -\\frac{1}{\\sqrt{1-(y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y-x)\ng = acos(x-y-z)\nh = asin(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z^5-y}$, $g(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{z^5}\\right)$, and $h(x,y,z) = \\cosh ^{-1}\\left(x-z^5\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{5 x}{z^6 \\left(1-\\frac{x^2}{z^{10}}\\right)},5 z^4 e^{z^5-y}-\\frac{1}{\\sqrt{x-z^5-1} \\sqrt{x-z^5+1}},\\frac{1}{z^5 \\left(1-\\frac{x^2}{z^{10}}\\right)}+e^{z^5-y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z**5-y)\ng = atanh(x/(z**5))\nh = atanh(x/(z**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cosh (z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{-\\sinh (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cosh(z)\nh = cosh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh (x y z)$\n", - "Output Answer": [ - "$\\{y z \\sinh (x y z),x z \\sinh (x y z),x y \\sinh (x y z)\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x*y*z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (9) \\cos \\left(1-3 x^2\\right)$\n", - "Output Answer": [ - "$6 x \\cos (9) \\sin \\left(1-3 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(9)*cos(1-3*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(7 x^4+4\\right)$\n", - "Output Answer": [ - "$\\frac{28 x^2 \\left(49 x^8-56 x^4-45\\right)}{\\left(-49 x^8-56 x^4-15\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(7*x**4+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^4$", - "Output Answer": [ - "$256 (x-4) (\\sin (4)+\\cos (4))+256 \\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**4\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+5 y^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = y**5\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $x^4$", - "Output Answer": [ - "$\\frac{1}{x^3}+\\frac{2 x}{15}-\\frac{1}{3 x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = x**4\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$(3+4 e) (x+1)-e-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-z)$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = e^{y^5}$", - "Output Answer": [ - "$\\cos (x-z)-5 y^4 \\sin \\left(y^5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-z)\ng = cos(y**5)\nh = math.e**(y**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(2 x^2-8\\right)$\n", - "Output Answer": [ - "$-\\frac{4 \\left(4 x^4-63\\right)}{\\left(-4 x^4+32 x^2-63\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x**2-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(7 x-1)^3$\n", - "Output Answer": [ - "$294 (7 x-1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (7*x-1)**3\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (9 x+3)+\\cos ^{-1}(1-8 x)$\n", - "Output Answer": [ - "$\\frac{2}{\\sqrt{x-4 x^2}}+9 \\cos (9 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(9*x+3)+acos(1-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\log (x+y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x+y-z},-\\frac{1}{x+y-z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = x y-z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{1,0,y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = x*y-z\nh = x*y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{35 (x+3)^2}{3^{2/3}}-30 \\sqrt[3]{3} (x+3)+27 \\sqrt[3]{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-3 x)$ on the interval $x = 1$ to $x = 4$\n", - "Output Answer": [ - "$-\\sqrt{2}+\\sqrt{17}+\\tanh ^{-1}\\left(\\sqrt{2}\\right)-\\tanh ^{-1}\\left(\\sqrt{17}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x)\na = 1\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh (8-6 x)+e^2$\n", - "Output Answer": [ - "$-6 \\sinh (8-6 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cosh(8-6*x)+math.e**2, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = sqrt(z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{7 x+9}-\\sin ^{-1}(5-6 x)$\n", - "Output Answer": [ - "$\\frac{6}{\\sqrt{1-(5-6 x)^2}}-\\frac{7}{2 \\sqrt{7 x+9}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(7*x+9)-asin(5-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*z)\ng = log(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (3 x+4) \\tan (7 x+8)$\n", - "Output Answer": [ - "$6 \\sec ^2(3 x+4) \\left(3 \\tan (3 x+4) \\tan (7 x+8)+7 \\sec ^2(7 x+8)\\right)+98 \\tan (3 x+4) \\tan (7 x+8) \\sec ^2(7 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(3*x+4)*tan(7*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$x^3-\\frac{x^5}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x**3\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{45 x^4}{\\sqrt{1-\\left(7-9 x^5\\right)^2}}$\n", - "Output Answer": [ - "$\\sin ^{-1}\\left(7-9 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((45*x**4)/(sqrt(1-(7-9*x**5)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$e^x+4 y^3-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y**4\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x^3}{y}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x^2}{y \\sqrt{1-\\frac{x^6}{y^2}}},-\\frac{x^3}{y^2 \\sqrt{1-\\frac{x^6}{y^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x**3)/y)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(x+y^4\\right)^2$, $g(x,y,z) = \\cos ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 \\left(x+y^4\\right) & 8 y^3 \\left(x+y^4\\right) & 0 \\\\\n 0 & -\\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+y**4)**2\ng = acos(y**4)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-7 x^5-3}$\n", - "Output Answer": [ - "$35 e^{-7 x^5-3} x^3 \\left(35 x^5-4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-7*x**5-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$", - "Output Answer": [ - "$-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(2 x^2\\right)+\\tan (2-3 x)$\n", - "Output Answer": [ - "$\\frac{2}{x}-3 \\sec ^2(2-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2*x**2)+tan(2-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (x-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{-\\sin (x-z),0,-\\sin (x-z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(x-z)\nh = cos(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x-y)$, $g(x,y,z) = y$, and $h(x,y,z) = x-y-z$", - "Output Answer": [ - "$\\sinh (x-y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x-y)\ng = y\nh = x-y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = sqrt(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(x-y^2\\right)$", - "Output Answer": [ - "$-2 \\sinh \\left(x-y^2\\right)+4 y^2 \\cosh \\left(x-y^2\\right)+\\cosh \\left(x-y^2\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x-y**2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{3 x^2}{2}+8\\right)$\n", - "Output Answer": [ - "$3 \\left(\\cos \\left(\\frac{3 x^2}{2}+8\\right)-3 x^2 \\sin \\left(\\frac{3 x^2}{2}+8\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((3*x**2)/2)+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y+z)\ng = (1/(y**2))\nh = sin((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (4 x)$ on the interval $x = 4$ to $x = 5$\n", - "Output Answer": [ - "$\\int_4^5 \\sqrt{16 \\sec ^4(4 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(4*x)\na = 4\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\tan \\left(y z^4\\right)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & z^4 \\sec ^2\\left(y z^4\\right) & 4 y z^3 \\sec ^2\\left(y z^4\\right) \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = tan(y*z**4)\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^3}$, $g(x,y,z) = y$, and $h(x,y,z) = y-z^5$", - "Output Answer": [ - "$-\\frac{3}{x^4}-5 z^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**3))\ng = y\nh = y-z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+4 y^3+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y**4\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = z^6$, and $h(x,y,z) = \\cos \\left(\\frac{x z^3}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & 6 z^5 \\\\\n -\\frac{z^3 \\sin \\left(\\frac{x z^3}{y}\\right)}{y} & \\frac{x z^3 \\sin \\left(\\frac{x z^3}{y}\\right)}{y^2} & -\\frac{3 x z^2 \\sin \\left(\\frac{x z^3}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = z**6\nh = cos(((x*z**3)/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin (4-4 x)}{(-2 x-2)^5}$\n", - "Output Answer": [ - "$-\\frac{5 \\sin (4-4 x)+4 (x+1) \\cos (4-4 x)}{32 (x+1)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(4-4*x))/((-2*x-2)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = x^5 z^5$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)},-5 x^4 z^5,-\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x/y)\ng = atan(z/y)\nh = atan(z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\log (z (x+y))$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x+y},-\\frac{1}{x+y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,2 e^{z^2} z,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z**2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7-6 x^2}+\\cos \\left(2-5 x^5\\right)$\n", - "Output Answer": [ - "$25 x^4 \\sin \\left(2-5 x^5\\right)-12 e^{7-6 x^2} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7-6*x**2)+cos(2-5*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$\\frac{1}{2} \\left(2 \\sqrt{x^4}-x^2\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^2 y}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,x^2 \\left(-e^{x^2 y}\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2*y)\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{z^3}}$, $g(x,y,z) = \\frac{z^3}{y}$, and $h(x,y,z) = \\cos \\left(\\frac{x^3}{y}-z^3\\right)$", - "Output Answer": [ - "$3 z^2 \\sin \\left(\\frac{x^3}{y}-z^3\\right)-\\frac{z^3}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/(z**3)))\ng = ((z**3)/y)\nh = cos(((x**3)/y)-z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3 x+1)-\\log (3-x)$\n", - "Output Answer": [ - "$\\frac{1}{3-x}-3 \\sin (3 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3*x+1)-log(3-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log \\left(z-x^2\\right)$", - "Output Answer": [ - "$\\frac{1}{z-x^2}+2 x \\sec ^2\\left(x^2\\right)+3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2)\ng = y**3\nh = log(z-x**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{45 x^4}{\\sqrt{1-\\left(2-9 x^5\\right)^2}}+\\frac{14 x}{7 x^2+4}$\n", - "Output Answer": [ - "$\\log \\left(7 x^2+4\\right)-\\sin ^{-1}\\left(2-9 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((45*x**4)/(sqrt(1-(2-9*x**5)**2)))+((14*x)/(7*x**2+4))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^4\\right)$ and $g(x) = $e^x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = tan(x**4)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 3 y^2 \\cos \\left(y^3\\right) & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = sin(y**3)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = cos(z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\frac{1}{(x+z)^2}$, and $h(x,y,z) = \\tan ^{-1}(x+z)$", - "Output Answer": [ - "$\\frac{1}{(x+z)^2+1}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = (1/((x+z)**2))\nh = atan(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{7 x+2}}{\\sqrt{-5 x-6}}$\n", - "Output Answer": [ - "$-\\frac{16}{(-5 x-6)^{3/2} \\sqrt{7 x+2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(7*x+2))/(sqrt(-5*x-6))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sqrt{x^2}$", - "Output Answer": [ - "$\\frac{x^3}{\\sqrt{x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = sqrt(x**2)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(z^3 \\left(x+y^5\\right)\\right)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{3 z^3}{2 \\left(z^3 \\left(x+y^5\\right)\\right)^{5/2}},-\\frac{15 y^4 z^3}{2 \\left(z^3 \\left(x+y^5\\right)\\right)^{5/2}},-\\frac{9 z^2 \\left(x+y^5\\right)}{2 \\left(z^3 \\left(x+y^5\\right)\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z**3*(x+y**5))**(3/2)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{x}{5}+\\frac{3}{5}\\right)+\\tan ^{-1}(2-5 x)$\n", - "Output Answer": [ - "$\\frac{1}{-5 x^2+4 x-1}+\\frac{1}{5} \\cos \\left(\\frac{x+3}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin((x/5)+(3/5))+atan(2-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-7 x-8} \\log (7 x-7)$\n", - "Output Answer": [ - "$\\frac{e^{-7 x-8} (1-7 (x-1) \\log (7 (x-1)))}{x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-7*x-8)*log(7*x-7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z^5}}$, $g(x,y,z) = y$, and $h(x,y,z) = x^4 z^5$", - "Output Answer": [ - "$5 x^4 z^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z**5)))\ng = y\nh = x**4*z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$x e^{x z}+e^x-\\sin (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cos(y)\nh = math.e**(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^3$, $g(x,y,z) = \\frac{x^2 z^2}{y^2}$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$3 (x-y)^2-\\frac{2 x^2 z^2}{y^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**3\ng = ((x**2*z**2)/(y**2))\nh = asin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (8-6 x)-\\tan (5-9 x)$\n", - "Output Answer": [ - "$-18 \\left(2 \\sin (8-6 x)+9 \\tan (5-9 x) \\sec ^2(5-9 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(8-6*x)-tan(5-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (x-y+z)$", - "Output Answer": [ - "$\\cos (x-y+z)+\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = y\nh = sin(x-y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{z^3 \\left(x-y^3\\right)}$\n", - "Output Answer": [ - "$\\left\\{\\frac{z^3}{2 \\sqrt{z^3 \\left(x-y^3\\right)}},-\\frac{3 y^2 z^3}{2 \\sqrt{z^3 \\left(x-y^3\\right)}},\\frac{3 z^2 \\left(x-y^3\\right)}{2 \\sqrt{z^3 \\left(x-y^3\\right)}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z**3*(x-y**3))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x^4+5}+\\sin (3 x+4)$\n", - "Output Answer": [ - "$-9 \\left(\\sin (3 x+4)-8 e^{6 x^4+5} x^2 \\left(8 x^4+1\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x**4+5)+sin(3*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(x^4+4\\right)+\\sin (7 x+4)$\n", - "Output Answer": [ - "$7 \\cos (7 x+4)-4 x^3 \\sin \\left(x^4+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(x**4+4)+sin(7*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\tan ^{-1}\\left(x+y^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & 3 y^2 \\cos \\left(y^3\\right) & 0 \\\\\n \\frac{1}{\\left(x+y^3\\right)^2+1} & \\frac{3 y^2}{\\left(x+y^3\\right)^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = sin(y**3)\nh = atan(x+y**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\{z \\cos (y z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(3 x+7)^2-(2-2 x)^3$\n", - "Output Answer": [ - "$6 \\left(4 x^2-5 x+11\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((3*x+7)**2-(2-2*x)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x} \\sin (x+2)$\n", - "Output Answer": [ - "$2 e^{7 x} (24 \\sin (x+2)+7 \\cos (x+2))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x)*sin(x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = x^3 y^3$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 3 x^2 y^3 & 3 x^3 y^2 & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = x**3*y**3\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{1}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/y)\nh = acos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{y^4}{x}\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y^4 \\sec ^2\\left(\\frac{y^4}{x}\\right)}{x^2} & \\frac{4 y^3 \\sec ^2\\left(\\frac{y^4}{x}\\right)}{x} & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(((y**4)/x))\ng = y**4\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{3 \\sqrt{y}}{2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**(3/2)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y+z)$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y+z)\ng = y\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x-1} \\sqrt{6 x-4}$\n", - "Output Answer": [ - "$\\frac{e^{-9 x-1} (39-54 x)}{\\sqrt{6 x-4}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x-1)*sqrt(6*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^4$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$2 x+4 y^3+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y**4\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(2-\\frac{7 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{(4-7 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2-((7*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(6-\\frac{5 x}{2}\\right) \\left(-\\cos \\left(x+\\frac{9}{2}\\right)\\right)$\n", - "Output Answer": [ - "$\\frac{1}{8} \\left(49 \\sin \\left(\\frac{1}{2} (3-7 x)\\right)-9 \\sin \\left(\\frac{3 (x-7)}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6-((5*x)/2))*(-cos(x+(9/2)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x-1}+\\log (-5 x-1)$\n", - "Output Answer": [ - "$-\\frac{25}{(5 x+1)^2}-\\frac{9}{(6 x-1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x-1)+log(-5*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(z^3\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z^{12}$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z^2}{z^6+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z**3)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{3-6 x}$\n", - "Output Answer": [ - "$\\frac{72}{(3-6 x)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(3-6*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\sqrt{x^3 y}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 x^2 y}{2 \\sqrt{x^3 y}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3)\ng = sqrt(x**3*y)\nh = sqrt(x**3*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x/y}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\tan \\left(x+z^2\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2\\left(x+z^2\\right),\\frac{x e^{x/y}}{y^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/y)\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4-4 x}-\\sin ^{-1}(3-2 x)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{-x^2+3 x-2}}-\\frac{1}{\\sqrt{1-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4-4*x)-asin(3-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(y)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y z}\\right)$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$\\frac{x \\sin \\left(\\frac{x}{y z}\\right)}{y^2 z}-\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(y)\ng = cos((x/(y*z)))\nh = cbrt(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(2 x^5\\right)-\\tan ^{-1}(5 x+2)$\n", - "Output Answer": [ - "$10 x^4 \\sin \\left(2 x^5\\right)-\\frac{5}{(5 x+2)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(2*x**5)-atan(5*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh \\left(x^3\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 \\cosh \\left(x^3\\right) & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x**3)\ng = sqrt(y)\nh = sqrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = z^5$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{-5 z^4,0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = z**5\nh = z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\frac{z^2}{y^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{y^2},0,-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = ((z**2)/(y**2))\nh = ((z**2)/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(9-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{9}{4} \\cos \\left(9-\\frac{3 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(9-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(4-\\frac{22 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{968 (11 x-6)}{\\left(-484 x^2+528 x-135\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(4-((22*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(4-4 x^2\\right)$\n", - "Output Answer": [ - "$8 \\left(16 x^2 \\tan \\left(4-4 x^2\\right)-1\\right) \\sec ^2\\left(4-4 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4-4*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$z \\cos (y z)-\\frac{x}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = sin(y*z)\nh = (x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^3\\right)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\frac{3 x^2}{x^6+1}-\\frac{y e^{y/z}}{z^2}+\\cos (y-z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**3)\ng = sin(y-z)\nh = math.e**(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y+z^4$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$1-\\frac{1}{y^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y+z**4\ng = (1/y)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)},y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,-\\sin (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cos(x-y)\nh = cos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y z)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = -\\tanh ^{-1}(x-z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{1-(x-z)^2}+\\frac{y}{\\sqrt{1-y^2 z^2}},-\\frac{z}{\\sqrt{1-y^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y*z)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^2-y+z}$", - "Output Answer": [ - "$-\\frac{x^2}{\\left(x^2-y+z\\right)^{3/2}}+\\frac{1}{\\sqrt{x^2-y+z}}-\\frac{1}{2 \\left(x^2-y+z\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2-y+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$e^y+\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = math.e**y\nh = log((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^3 z^3$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)-\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**3*z**3\ng = sqrt((x/y))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{x+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sqrt(x+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x^2+5}+\\cos \\left(\\frac{13}{2}-3 x\\right)$\n", - "Output Answer": [ - "$3 \\left(2 e^{3 x^2+5} x+\\sin \\left(\\frac{13}{2}-3 x\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x**2+5)+cos((13/2)-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (3-5 x)+\\tan (8 x+8)$\n", - "Output Answer": [ - "$8 \\sec ^2(8 (x+1))-5 \\cos (3-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3-5*x)+tan(8*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x y^5$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\left\\{5 y^4,0,y^5\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = x*y**5\nh = x*y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = x^2$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{x}{2 \\sqrt{x z}}-\\frac{1}{3 \\sqrt[3]{x}^2},2 x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = x**2\nh = x**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x y)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$y \\text{sech}^2(x y)+5 y^4+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*y)\ng = y**5\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y*z)\ng = sin(y)\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-7 x^2-4} \\log (4 x-4)$\n", - "Output Answer": [ - "$\\frac{-7 x^2-7 (x-1) x \\log (4 (x-1))-4}{(x-1) \\sqrt{-7 x^2-4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-7*x**2-4)*log(4*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\cosh (y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sinh(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos ^{-1}\\left(x+y^2\\right)$, and $h(x,y,z) = \\left(y^2\\right)^{3/2}$", - "Output Answer": [ - "$-\\frac{2 y}{\\sqrt{1-\\left(x+y^2\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = acos(x+y**2)\nh = (y**2)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{\\sqrt{\\frac{2}{3}}}{\\sqrt{-x^4}}$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((sqrt((2/3)))/(sqrt(-x**4)))\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\tan ^{-1}(x z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = atan(x*z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = -\\sin ^{-1}(y-z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)-\\frac{1}{\\sqrt{1-(y-z)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = -asin(y-z)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/y)\ng = math.e**y\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(1-3 x^3\\right)-\\sqrt{7 x^2+7}$\n", - "Output Answer": [ - "$\\frac{9 x^2}{\\sqrt{6 x^3-9 x^6}}-\\frac{7 x}{\\sqrt{7 x^2+7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(1-3*x**3)-sqrt(7*x**2+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(z)\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^2}{\\left(x-y^5\\right)^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 z^2}{\\left(x-y^5\\right)^3},\\frac{10 y^4 z^2}{\\left(x-y^5\\right)^3},\\frac{2 z}{\\left(x-y^5\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/((x-y**5)**2))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x+y-z^5\\right)^5$, $g(x,y,z) = \\sqrt{y+z^5}$, and $h(x,y,z) = x+z^5$", - "Output Answer": [ - "$5 \\left(x+y-z^5\\right)^4+\\frac{1}{2 \\sqrt{y+z^5}}+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y-z**5)**5\ng = sqrt(y+z**5)\nh = x+z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{y}-z$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y} & -\\frac{x}{y^2} & -1 \\\\\n 0 & 0 & -\\sin (z) \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/y)-z\ng = cos(z)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{z^2}{x^6}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n -\\frac{6 z^2}{x^7} & 0 & \\frac{2 z}{x^6} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = ((z**2)/(x**6))\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*z)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(9-6 x)^4}$\n", - "Output Answer": [ - "$\\frac{720}{(9-6 x)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((9-6*x)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{y}{3 \\sqrt[3]{x y}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y)\ng = y\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{11}{3}-\\frac{14 x}{3}}$\n", - "Output Answer": [ - "$\\frac{196}{9} e^{\\frac{11}{3}-\\frac{14 x}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**((11/3)-((14*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\frac{e^{-2 x^5}}{x^3}$\n", - "Output Answer": [ - "$-\\frac{10243}{256 e^{2048}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(((math.e**(-2*x**5))/(x**3)))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 x^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(x)))\nh = (1/(sqrt(x)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\frac{z^6}{y^3}$, and $h(x,y,z) = \\sin \\left(z^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{6 z^5}{y^3},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = ((z**6)/(y**3))\nh = ((z**6)/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x-\\frac{22}{3}}$\n", - "Output Answer": [ - "$-\\frac{1}{4 \\left(x-\\frac{22}{3}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x-(22/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = (y/x)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,e^x-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = math.e**x\nh = math.e**x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\log \\left(x^2\\right)$", - "Output Answer": [ - "$9 (x-1)^2+2 (x-1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = log(x**2)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(4 x^2+7\\right)-e^{-7 x-7}$\n", - "Output Answer": [ - "$-64 x^2 \\sin \\left(4 x^2+7\\right)+8 \\cos \\left(4 x^2+7\\right)-49 e^{-7 (x+1)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(4*x**2+7)-math.e**(-7*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^{x/y}$, and $h(x,y,z) = \\frac{x y}{z}$", - "Output Answer": [ - "$-\\frac{x e^{x/y}}{y^2}-\\frac{x y}{z^2}+\\frac{1}{x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = math.e**(x/y)\nh = ((x*y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^2 y}$, $g(x,y,z) = \\cos \\left(\\frac{y}{x^2}\\right)$, and $h(x,y,z) = \\sqrt[3]{x^2+z}$", - "Output Answer": [ - "$2 x y e^{x^2 y}-\\frac{\\sin \\left(\\frac{y}{x^2}\\right)}{x^2}+\\frac{1}{3 \\sqrt[3]{x^2+z}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2*y)\ng = cos((y/(x**2)))\nh = cbrt(x**2+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & \\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2} & -\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z\nh = cos((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos ^{-1}(z-y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(z-y)^2}},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{2 \\sqrt{y}}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^2}{y}$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 x}{y},-\\frac{x^2}{y^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**2)/y)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6-\\frac{13 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{169}{9} \\cos \\left(6-\\frac{13 x}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6-((13*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = z-x$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = z-x\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^{x^3}$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{x^7}{7}+\\frac{x^6}{2}+\\frac{x^5}{5}+\\frac{2 x^3}{3}+x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**3)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = (x y+z)^3$\n", - "Output Answer": [ - "$\\left\\{3 y (x y+z)^2,3 x (x y+z)^2,3 (x y+z)^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y+z)**3\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x+7} \\cos (9 x+6)$\n", - "Output Answer": [ - "$\\frac{4 \\cos (9 x+6)-9 (8 x+7) \\sin (9 x+6)}{\\sqrt{8 x+7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x+7)*cos(9*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = y^3$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = y**3\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$1-\\log \\left(-\\frac{5 x}{2}-\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{25}{(5 x+11)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1-log(-((5*x)/2)-(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = (z-y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -2 (z-y) & 2 (z-y) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y\nh = (z-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cosh (x-z)$", - "Output Answer": [ - "$-\\sinh (x-z)+\\sinh (x)+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = cbrt(y)\nh = cosh(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos \\left(x^3-z\\right)$", - "Output Answer": [ - "$\\sin \\left(x^3-z\\right)+3 x^2+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = tan(y)\nh = cos(x**3-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$y \\sec ^2(y z)+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = sqrt(y)\nh = tan(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^4$", - "Output Answer": [ - "$(x+3)^6-18 (x+3)^5+135 (x+3)^4-540 (x+3)^3+1215 (x+3)^2-1458 (x+3)+729$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**4\nseries = f.subs(x, g).series(x, -3, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x-z$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\{1,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x-z\nh = x-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(2 x-4)^2}+\\cos (6)$\n", - "Output Answer": [ - "$-\\frac{1}{2 (x-2)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((2*x-4)**2))+cos(6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = \\tanh ^{-1}(x y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{x}{1-x^2 y^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = atanh(x*y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x},0,-\\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}}-\\frac{z}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y/x)\ng = (z/x)\nh = (z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sqrt(x)\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = (y-z)^{3/2}$", - "Output Answer": [ - "$2 x-\\frac{3 \\sqrt{y-z}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y\nh = (y-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{x+y}{z}}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{(x+y) e^{\\frac{x+y}{z}}}{z^2},\\frac{1}{x}-\\frac{e^{\\frac{x+y}{z}}}{z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x+y)/z)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+y+z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{(x+y+z)^2+1}+\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y+z)\ng = cbrt(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(3 x-3)^5 \\tan (5 x+6)$\n", - "Output Answer": [ - "$1215 (x-1)^4 \\left(\\tan (5 x+6)+(x-1) \\sec ^2(5 x+6)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((3*x-3)**5*tan(5*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = y\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{32768 x^{20}}+e^{-7 x-3}$\n", - "Output Answer": [ - "$-\\frac{5}{8192 x^{21}}-7 e^{-7 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((1/(32768*x**20))+math.e**(-7*x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(-8 x-4)^5 \\tan ^{-1}\\left(2 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{4096 x (2 x+1)^5}{4 x^4+1}+40 (8 x+4)^4 \\tan ^{-1}\\left(2 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(-8*x-4)**5*atan(2*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (7 x+3)}{(-3 x-2)^5}$\n", - "Output Answer": [ - "$\\frac{(42 x-15 \\sin (14 x+6)+28) \\sec ^2(7 x+3)}{2 (3 x+2)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(7*x+3))/((-3*x-2)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sec ^2(z) \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(z)\ng = tan(x)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{10} z^2}$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{\\frac{y}{z^2},-\\frac{2}{x^{10} z^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**10*z**2))\ng = (y/z)\nh = (y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y-x)$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = (x+y)^5$", - "Output Answer": [ - "$\\left\\{5 (x+y)^4+\\frac{1}{z^2},-5 (x+y)^4,\\frac{1}{\\sqrt{1-(y-x)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y-x)\ng = (1/z)\nh = (1/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-8 x}+\\cos (3-x)$\n", - "Output Answer": [ - "$\\sin (3-x)-\\frac{4}{\\sqrt{1-8 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-8*x)+cos(3-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x^2}{y}-z\\right)$", - "Output Answer": [ - "$-\\frac{x^4 \\left(\\frac{x^2}{y}-z\\right)}{y^4 \\left(\\left(\\frac{x^2}{y}-z\\right)^2+1\\right)^{3/2}}-\\frac{4 x^2 \\left(\\frac{x^2}{y}-z\\right)}{y^2 \\left(\\left(\\frac{x^2}{y}-z\\right)^2+1\\right)^{3/2}}+\\frac{2 x^2}{y^3 \\sqrt{\\left(\\frac{x^2}{y}-z\\right)^2+1}}-\\frac{\\frac{x^2}{y}-z}{\\left(\\left(\\frac{x^2}{y}-z\\right)^2+1\\right)^{3/2}}+\\frac{2}{y \\sqrt{\\left(\\frac{x^2}{y}-z\\right)^2+1}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(((x**2)/y)-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$6-2 x$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 6-2*x\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n 0 & \\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2} & -\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+y)\ng = cbrt(y/z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{14 x^3}{\\sqrt{-7 x^4-6}}$\n", - "Output Answer": [ - "$\\sqrt{-7 x^4-6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((14*x**3)/(sqrt(-7*x**4-6)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(7 x+1)-27 x^3$\n", - "Output Answer": [ - "$\\frac{7}{(7 x+1)^2+1}-81 x^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(7*x+1)-27*x**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^2}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{x-1}{3}-\\frac{1}{81} (x-1)^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**2)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\sqrt{z-x}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n -\\frac{1}{2 \\sqrt{z-x}} & 0 & \\frac{1}{2 \\sqrt{z-x}} \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/z)\ng = sqrt(z-x)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(z)-\\frac{1}{z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sqrt(y)\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-y$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = x^5 z$", - "Output Answer": [ - "$x^5-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-y\ng = acos(y)\nh = x**5*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = y-x$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left\\{0,-3 x^2,-\\frac{1}{3 \\sqrt[3]{x+y}^2}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4-x} \\tan (6 x+5)$\n", - "Output Answer": [ - "$-\\frac{(24 (x-4)+\\sin (2 (6 x+5))) \\sec ^2(6 x+5)}{4 \\sqrt{4-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4-x)*tan(6*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = (y-x)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y-x}}{2},\\frac{3 \\sqrt{y-x}}{2},\\frac{1}{x}-\\frac{1}{2 \\sqrt{x+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y)\ng = log((x/y))\nh = log((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cosh (x z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$e^x+\\sec ^2(z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cosh(x*z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 y^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x^6$ and $g(x) = $x^5$", - "Output Answer": [ - "$30 (x-1)^3+25 (x-1)^2+11 (x-1)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**6\ng = x**5\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$4 x^2+e^{9 x+3}$\n", - "Output Answer": [ - "$8 x+9 e^{9 x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(4*x**2+math.e**(9*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y-z^5$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\frac{1}{x}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y-z**5\nh = cos(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,y \\cos (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{x^4}{y^4}$", - "Output Answer": [ - "$\\left\\{-\\frac{4 x^4}{y^5},-\\frac{4 x^3}{y^4},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left\\{-1,\\frac{1}{2 \\sqrt{z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x^5-y}$", - "Output Answer": [ - "$\\frac{50 x^8}{\\left(x^5-y\\right)^3}-\\frac{20 x^3}{\\left(x^5-y\\right)^2}+\\frac{2}{\\left(x^5-y\\right)^3}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**5-y))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^3\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{x^2}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**3)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\sqrt[3]{x^2}$", - "Output Answer": [ - "$\\frac{7 (x-4)^2}{144\\ 2^{2/3}}+\\frac{7 (x-4)}{3\\ 2^{2/3}}+4 \\sqrt[3]{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = cbrt(x**2)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sqrt[3]{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n -\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)} & \\frac{1}{x \\left(\\frac{y^2}{x^2}+1\\right)} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x-z}^2} & 0 & -\\frac{1}{3 \\sqrt[3]{x-z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = atan(y/x)\nh = cbrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x+z},0,\\frac{1}{x+z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(x+z)\nh = log(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4 x-6} \\sqrt{4-5 x}$\n", - "Output Answer": [ - "$\\frac{e^{4 x-6} \\left(1600 x^2-2160 x+679\\right)}{4 (4-5 x)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4*x-6)*sqrt(4-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\cos ^{-1}(x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x}{z^2},-\\frac{1}{\\sqrt{1-(x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = acos(x-y)\nh = acos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{y}{z^4}\\right)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 z^4 \\left(\\frac{y}{z^4}\\right)^{5/2}},\\frac{6 y}{z^5 \\left(\\frac{y}{z^4}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y/(z**4))**(3/2)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (z (x-y))$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{(x-y) \\sin (z (x-y)),0,-z \\sin (z (x-y))\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cos(z*(x-y))\nh = cos(z*(x-y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = y\nh = sin(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-2 x-6)^4}-\\tan ^{-1}\\left(\\frac{9}{2}-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{5}{4 (x+3)^6}-\\frac{108 (x-3)}{\\left(9 x^2-54 x+85\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-2*x-6)**4))-atan((9/2)-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\tan ^{-1}\\left(y^3\\right)$", - "Output Answer": [ - "$2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = x**4\nh = atan(y**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{8 x-5}}{\\left(-2 x^3-8\\right)^3}$\n", - "Output Answer": [ - "$-\\frac{e^{8 x-5} \\left(8 x^3-9 x^2+32\\right)}{8 \\left(x^3+4\\right)^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(8*x-5))/((-2*x**3-8)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{(y+z)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 (y+z)^{5/2}},-\\frac{3}{2 (y+z)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y+z)**(3/2)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(9-2 x^5\\right)^5}+(4-6 x)^5$\n", - "Output Answer": [ - "$\\frac{50 x^4}{\\left(9-2 x^5\\right)^6}-30 (4-6 x)^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((9-2*x**5)**5))+(4-6*x)**5, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/x))\ng = y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = x y^3$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n y^3 & 3 x y^2 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = x*y**3\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(y^2\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$2 y+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y**2)\ng = y**2\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(8 x+1)-\\tan (5 x+7)$\n", - "Output Answer": [ - "$-\\frac{2}{\\sqrt{-x (4 x+1)}}-5 \\sec ^2(5 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(8*x+1)-tan(5*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = z\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y-x$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n -1 & 1 & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = y-x\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x+3}$\n", - "Output Answer": [ - "$-\\frac{25}{4 (5 x+3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{11}{2}-4 x}-\\cos \\left(8 x^4+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$32 x^3 \\sin \\left(8 x^4+\\frac{17}{2}\\right)-\\frac{2}{\\sqrt{\\frac{11}{2}-4 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((11/2)-4*x)-cos(8*x**4+(17/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(1-5 x^2\\right)-\\cos ^{-1}(7 x-3)$\n", - "Output Answer": [ - "$\\frac{10 x}{5 x^2-1}+\\frac{7}{\\sqrt{1-(3-7 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(1-5*x**2)-acos(7*x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y-x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = cbrt(y-x)\nh = tanh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^2$", - "Output Answer": [ - "$x^{5/2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**2\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{x^2}{z^2}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2 x}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(z)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5-x)+\\cos (2 x+1)$\n", - "Output Answer": [ - "$\\frac{1}{x-5}-2 \\sin (2 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5-x)+cos(2*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-5) \\left(\\frac{1}{5}-\\sin (5)\\right)+(x-5)^2 \\left(-\\frac{1}{50}-\\frac{\\cos (5)}{2}\\right)+\\log (5)+\\cos (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-3 x^2-5}$\n", - "Output Answer": [ - "$\\frac{15}{\\left(-3 x^2-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-3*x**2-5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(y^3+z\\right)$, $g(x,y,z) = \\tan \\left(y^3+z\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3 y^2}{\\sqrt{1-\\left(y^3+z\\right)^2}} & -\\frac{1}{\\sqrt{1-\\left(y^3+z\\right)^2}} \\\\\n 0 & 3 y^2 \\sec ^2\\left(y^3+z\\right) & \\sec ^2\\left(y^3+z\\right) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y**3+z)\ng = tan(y**3+z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5}{y z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4}{y z},-\\frac{x^5}{y^2 z},-\\frac{x^5}{y z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/(y*z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & -\\frac{1}{z \\sqrt{1-\\frac{y^2}{z^2}}} & \\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y+z)\ng = cbrt(y)\nh = acos(y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{z^{3/2}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (1/(z**(3/2)))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\sqrt{\\frac{x^3}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n \\frac{3 x^2}{2 z \\sqrt{\\frac{x^3}{z}}} & 0 & -\\frac{x^3}{2 z^2 \\sqrt{\\frac{x^3}{z}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sin(z)\nh = sqrt(((x**3)/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-8 x^3 \\sin \\left(2 x^4+1\\right)$\n", - "Output Answer": [ - "$\\cos \\left(2 x^4+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -8*x**3*sin(2*x**4+1)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{6}{\\sqrt{1-4 (3 x+2)^2}}$\n", - "Output Answer": [ - "$\\sin ^{-1}(6 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (6/(sqrt(1-4*(3*x+2)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(3 x^3+7\\right)+\\sqrt{7 x-3}$\n", - "Output Answer": [ - "$-81 x^4 \\sin \\left(3 x^3+7\\right)+18 x \\cos \\left(3 x^3+7\\right)-\\frac{49}{4 (7 x-3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(3*x**3+7)+sqrt(7*x-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(8-\\frac{x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{9} \\cos \\left(8-\\frac{x}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8-(x/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(\\log (2)+i \\pi ) \\log (6 x+6)$\n", - "Output Answer": [ - "$-\\frac{\\log (2)+i \\pi }{(x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (log(2)+1j*pi)*log(6*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{15 x}{2}-4}$\n", - "Output Answer": [ - "$\\frac{225}{4} e^{\\frac{15 x}{2}-4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((15*x)/2)-4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = cbrt(x*y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan(x)\nh = sin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y$, and $h(x,y,z) = x$", - "Output Answer": [ - "$3 x^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = y\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(5 x+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-25 \\cos \\left(5 x+\\frac{15}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5*x+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = atanh(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin \\left(y+z^2\\right)$", - "Output Answer": [ - "$\\left\\{\\cos \\left(y+z^2\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (1-2 x)$\n", - "Output Answer": [ - "$8 \\tan (1-2 x) \\sec ^2(1-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(1-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n \\frac{1}{z \\sqrt{\\frac{x}{z}-1} \\sqrt{\\frac{x}{z}+1}} & 0 & -\\frac{x}{z^2 \\sqrt{\\frac{x}{z}-1} \\sqrt{\\frac{x}{z}+1}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = acosh(x/z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{y^2 z}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{y^2}{3 \\sqrt[3]{y^2 z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(y**2*z)\nh = cbrt(y**2*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\cos (x)-\\frac{1}{2 y^{3/2}}+\\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(sqrt(y)))\nh = tan((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-\\frac{9 x}{2}-\\frac{7}{2}\\right)-\\log \\left(-2 x-\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{19 (72 x+37)}{(4 x+1)^2 (9 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((9*x)/2)-(7/2))-log(-2*x-(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z^{15}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & 15 z^{14} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = tan(y)\nh = z**15\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y z^4}$, and $h(x,y,z) = z^{16}$", - "Output Answer": [ - "$\\frac{z^4}{2 \\sqrt{y z^4}}+16 z^{15}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y*z**4)\nh = z**16\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = x y^2+z^5$\n", - "Output Answer": [ - "$\\left\\{y^2,2 x y,5 z^4\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y**2+z**5\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\frac{5 x^5}{3}-2}$\n", - "Output Answer": [ - "$\\frac{25}{9} e^{-\\frac{5 x^5}{3}-2} x^3 \\left(25 x^5-12\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-((5*x**5)/3)-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tanh (z)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\text{sech}^2(z),1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = tanh(z)\nh = tanh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y+z^4}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2 z^3}{\\left(x y+z^4\\right)^{3/2}},\\frac{x}{2 \\left(x y+z^4\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y+z**4)))\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^4$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**4\ng = y**4\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x-4) (8 \\sin (4)+16 \\cos (4))+16 \\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**2\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sqrt{4 x^2-4}-\\sin (8-6 x)$\n", - "Output Answer": [ - "$\\frac{2}{\\left(x^2-1\\right)^{3/2}}+36 \\sin (8-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sqrt(4*x**2-4)-sin(8-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^2$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = x^4 y^4$", - "Output Answer": [ - "$2 (x-y)-\\frac{z}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**2\ng = (z/y)\nh = x**4*y**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$-e^{y-x}+\\sin (x-z)+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = y\nh = cos(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^5}$, $g(x,y,z) = \\tan ^{-1}\\left(x^5\\right)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{5 x^4}{x^{10}+1}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**5)\ng = atan(x**5)\nh = atan(x**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\left\\{2 y-\\frac{3 \\sqrt{z}}{2},3 z^2,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3\ng = z**(3/2)\nh = z**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -4 x$ on the interval $x = 3$ to $x = 7$\n", - "Output Answer": [ - "$4 \\sqrt{17}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -4*x\na = 3\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{37 (x-5)^3}{13182}-\\frac{5}{338} (x-5)^2+\\frac{x-5}{13}+2 \\tan ^{-1}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 5, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (2 x)$ on the interval $x = 2$ to $x = 11$\n", - "Output Answer": [ - "$\\int_2^{11} \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x)\na = 2\nb = 11\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{3 \\sqrt[3]{y z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(y*z)\nh = cbrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^2 z}$, $g(x,y,z) = \\tan \\left(y^2\\right)$, and $h(x,y,z) = x^{16}$", - "Output Answer": [ - "$2 y \\sec ^2\\left(y^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**2*z)\ng = tan(y**2)\nh = x**16\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^6$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{952}{9} 2^{2/3} (x-2)^2+\\frac{272}{3} 2^{2/3} (x-2)+32\\ 2^{2/3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**6\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-x-4)^2-\\tan (6 x+8)$\n", - "Output Answer": [ - "$2 \\left(x-3 \\sec ^2(6 x+8)+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-x-4)**2-tan(6*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-8 x}-\\tan (3 x+3)$\n", - "Output Answer": [ - "$-8 e^{-8 x}-3 \\sec ^2(3 (x+1))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-8*x)-tan(3*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x y^5}{z^5}\\right)$, $g(x,y,z) = z^5$, and $h(x,y,z) = x^2 z^{10}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & \\frac{5}{y} & -\\frac{5}{z} \\\\\n 0 & 0 & 5 z^4 \\\\\n 2 x z^{10} & 0 & 10 x^2 z^9 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(((x*y**5)/(z**5)))\ng = z**5\nh = x**2*z**10\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^2}$, $g(x,y,z) = \\frac{x^2 z}{y}$, and $h(x,y,z) = \\log \\left(x^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x^2}{y},-\\frac{2}{x},\\frac{2 x z}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**2)\ng = ((x**2*z)/y)\nh = ((x**2*z)/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sinh (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+3)^2 \\left(270-\\frac{\\sinh (3)}{2}\\right)+(x+3) (\\cosh (3)-405)+243-\\sinh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sinh(x)\ng = x**5\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\log (y-x)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = log(y-x)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = (1/((x+y)**(3/2)))\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = cos(y)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{y}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = log(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z-\\sin (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = cos(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = (y+z)^4$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-4 (y+z)^3,0,-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = (y+z)**4\nh = (y+z)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,e^{x+z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{x^4}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 x^3}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(1-\\frac{11 x}{2}\\right)-\\log \\left(\\frac{17 x^2}{2}-6\\right)$\n", - "Output Answer": [ - "$\\frac{34 x}{12-17 x^2}-\\frac{22}{121 x^2-44 x+8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(1-((11*x)/2))-log(((17*x**2)/2)-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((z/x))\ng = sin(x+y)\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{1}{\\left(y^4\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & -\\frac{6 y^3}{\\left(y^4\\right)^{5/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y**4\nh = (1/((y**4)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+z)\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{4 x}{\\sqrt{4 x^2-9}}$\n", - "Output Answer": [ - "$\\sqrt{4 x^2-9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((4*x)/(sqrt(4*x**2-9)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(5-x^4\\right)+(-2 x-5)^2$\n", - "Output Answer": [ - "$4 \\left(x^3 \\sin \\left(5-x^4\\right)+2 x+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5-x**4)+(-2*x-5)**2, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y-x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\sqrt{y-x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y-x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-7 x^5}+e^{5 x+9}$\n", - "Output Answer": [ - "$5 e^{5 x+9}-\\frac{35 x^4}{2 \\sqrt{8-7 x^5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-7*x**5)+math.e**(5*x+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (y+z)^{3/2}$", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{y+z}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**(3/2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = (y+z)^4$", - "Output Answer": [ - "$\\left\\{4 (y+z)^3,0,\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/y))\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{0,\\sin (x)-1,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^2\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{3 x^2}{2}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**2)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{7 x-7}}{(1-5 x)^2}$\n", - "Output Answer": [ - "$\\frac{\\sqrt{7} (19-15 x)}{2 \\sqrt{x-1} (5 x-1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(7*x-7))/((1-5*x)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-3 x-2) \\sin \\left(5-3 x^5\\right)$\n", - "Output Answer": [ - "$225 (3 x+2) x^8 \\sin \\left(5-3 x^5\\right)+30 (9 x+4) x^3 \\cos \\left(5-3 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-3*x-2)*sin(5-3*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2 y^2 z^2}$, $g(x,y,z) = \\tanh (y z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3 y^2 z^2} & -\\frac{2}{x^2 y^3 z^2} & -\\frac{2}{x^2 y^2 z^3} \\\\\n 0 & z \\text{sech}^2(y z) & y \\text{sech}^2(y z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2*y**2*z**2))\ng = tanh(y*z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tanh ^{-1}(x-z)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z-\\frac{1}{1-(x-z)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atanh(x-z)\ng = log(z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{-\\sin (y)-\\sec ^2(z),0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^{15}$", - "Output Answer": [ - "$\\frac{220 (x+3)^3}{1594323}+\\frac{55 (x+3)^2}{531441}+\\frac{10 (x+3)}{177147}+\\frac{1}{59049}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**15\nseries = f.subs(x, g).series(x, -3, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(-9 x-3)^2}-\\tan (4-5 x)$\n", - "Output Answer": [ - "$5 \\sec ^2(4-5 x)-\\frac{2}{3 (3 x+1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((-9*x-3)**2))-tan(4-5*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{2}{x^3}+\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = cbrt(y)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{3 x^2}{\\left(x^3-5\\right)^2+1}$\n", - "Output Answer": [ - "$-\\tan ^{-1}\\left(5-x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((3*x**2)/((x**3-5)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sinh ^{-1}(y)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\frac{1}{2 x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sqrt(y)\nh = asinh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4-9 x^4}$\n", - "Output Answer": [ - "$\\frac{54 x^2 \\left(3 x^4-4\\right)}{\\left(4-9 x^4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4-9*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3 x^2+4\\right)+\\tan ^{-1}(6-2 x)$\n", - "Output Answer": [ - "$-\\frac{36 x^2}{\\left(3 x^2+4\\right)^2}+\\frac{6}{3 x^2+4}-\\frac{8 (6-2 x)}{\\left(4 (x-3)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x**2+4)+atan(6-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\tan (x-z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/z)\ng = tan(x-z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = e^{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n 0 & -\\frac{z e^{\\frac{z}{y}}}{y^2} & \\frac{e^{\\frac{z}{y}}}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = sin(y+z)\nh = math.e**(z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(z^2\\right)$, $g(x,y,z) = \\cosh ^{-1}(x)$, and $h(x,y,z) = \\tan \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{2}{z} \\\\\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & 0 & 2 z \\sec ^2\\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z**2)\ng = acosh(x)\nh = tan(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = e^{y-x^2}$, and $h(x,y,z) = \\sqrt{y-x^2}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-x^2}},\\frac{x}{\\sqrt{y-x^2}},-2 x e^{y-x^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2)\ng = math.e**(y-x**2)\nh = math.e**(y-x**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-4 x}-\\frac{1}{(2 x-8)^3}$\n", - "Output Answer": [ - "$\\frac{3}{8 (x-4)^4}-\\frac{2}{\\sqrt{1-4 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-4*x)-(1/((2*x-8)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x z^4\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{x-z^4}$", - "Output Answer": [ - "$\\left\\{0,4 x z^3 \\cos \\left(x z^4\\right)-\\frac{1}{3 \\sqrt[3]{x-z^4}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z**4)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sin (3 x)-\\tan ^{-1}(5 x)$\n", - "Output Answer": [ - "$\\frac{9 \\sin (12)}{2}-\\frac{500}{160801}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sin(3*x)-atan(5*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x^2-9} \\cos \\left(3-x^2\\right)$\n", - "Output Answer": [ - "$\\frac{2 x \\left(\\left(8 x^2-9\\right) \\sin \\left(3-x^2\\right)+4 \\cos \\left(3-x^2\\right)\\right)}{\\sqrt{8 x^2-9}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x**2-9)*cos(3-x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\cos (y-z)$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & -\\sin (y-z) & \\sin (y-z) \\\\\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = cos(y-z)\nh = sqrt(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(y^2-x^5\\right)^2$, $g(x,y,z) = y^2$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$-10 x^4 \\left(y^2-x^5\\right)+2 y+\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y**2-x**5)**2\ng = y**2\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, $g(x,y,z) = x^5 z^5$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n -\\frac{1}{2 y \\left(\\frac{x}{y}\\right)^{3/2}} & \\frac{x}{2 y^2 \\left(\\frac{x}{y}\\right)^{3/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+y)**(3/2)))\ng = x**5*z**5\nh = (1/(sqrt((x/y))))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = x z$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n z & 0 & x \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = x*z\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{2 \\sqrt{x z}} & 0 & \\frac{x}{2 \\sqrt{x z}} \\\\\n 0 & \\frac{5}{y} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*z)\ng = log(y**5)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^6$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 6 z^5 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{z^2}{\\sqrt[3]{z^3}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**6\ng = y\nh = cbrt(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = log(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(y z)$, $g(x,y,z) = \\sinh \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{\\cosh \\left(\\frac{z}{x}\\right)}{x},\\frac{y}{1-y^2 z^2},-\\frac{z \\cosh \\left(\\frac{z}{x}\\right)}{x^2}-\\frac{z}{1-y^2 z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(y*z)\ng = sinh(z/x)\nh = sinh(z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z^3$, $g(x,y,z) = \\frac{1}{\\left(x+y^5\\right)^{3/2}}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$-\\frac{15 y^4}{2 \\left(x+y^5\\right)^{5/2}}+3 z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z**3\ng = (1/((x+y**5)**(3/2)))\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (x+8)$\n", - "Output Answer": [ - "$\\frac{1}{x+8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = x y z$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$x z-\\frac{1}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = x*y*z\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z-x)$, $g(x,y,z) = (z-y)^{3/2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{z-x} & 0 & \\frac{1}{z-x} \\\\\n 0 & -\\frac{3 \\sqrt{z-y}}{2} & \\frac{3 \\sqrt{z-y}}{2} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z-x)\ng = (z-y)**(3/2)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\sqrt{x^2}$", - "Output Answer": [ - "$\\frac{1}{2} (-x-1)-\\frac{\\pi }{4}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = sqrt(x**2)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7 x^2+\\frac{2}{5}\\right)+\\log \\left(\\frac{17 x}{5}-\\frac{28}{5}\\right)$\n", - "Output Answer": [ - "$-196 x^2 \\sin \\left(7 x^2+\\frac{2}{5}\\right)+14 \\cos \\left(7 x^2+\\frac{2}{5}\\right)-\\frac{289}{(28-17 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x**2+(2/5))+log(((17*x)/5)-(28/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\cos (y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sin(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^5\\right)^{3/2}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**5)**(3/2)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{512} \\cos (6-3 x)$\n", - "Output Answer": [ - "$\\frac{3}{512} \\sin (6-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/512)*cos(6-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^2}{y^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{y^2} & -\\frac{2 x^2}{y^3} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2} & 0 & -\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**2)/(y**2))\ng = cos(y)\nh = cbrt(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{y^2-z}$\n", - "Output Answer": [ - "$\\left\\{0,2 y e^{y^2-z},-e^{y^2-z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**2-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = e^{z-y}$, and $h(x,y,z) = e^{x^2+z}$", - "Output Answer": [ - "$e^{x^2+z}-e^{z-y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = math.e**(z-y)\nh = math.e**(x**2+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\sin (x+y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y)\ng = tan(x+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = z\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x+y}{z}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\frac{1}{1-y^2}+\\frac{1}{(y+z)^2+1}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/z)\ng = atanh(y)\nh = atan(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^{12}$", - "Output Answer": [ - "$(x+1) \\left(1+\\tan ^2(1)-12 \\tan (1)\\right)-\\tan (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**12\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x+z}},\\frac{y}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(x*y)\nh = sqrt(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$i \\sqrt{\\frac{11}{5}}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1j*sqrt((11/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt[3]{x-z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{3 \\sqrt[3]{x-z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x-9}+\\log (4 x-3)$\n", - "Output Answer": [ - "$\\frac{4}{4 x-3}-4 e^{-4 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x-9)+log(4*x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}-z\\right)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{y}-z\\right)}{y} & \\frac{x \\sin \\left(\\frac{x}{y}-z\\right)}{y^2} & \\sin \\left(\\frac{x}{y}-z\\right) \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = cos((x/y)-z)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+3)^5-15 (x+3)^4+90 (x+3)^3-269 (x+3)^2+399 (x+3)-234$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**5\nseries = f.subs(x, g).series(x, -3, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-6 x-2} \\tan (6 x+4)$\n", - "Output Answer": [ - "$-\\frac{3 \\left(\\tan (6 x+4)+4 (3 x+1) \\sec ^2(6 x+4)\\right)}{\\sqrt{-6 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-6*x-2)*tan(6*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{15 x^4}{\\sqrt{9-6 x^5}}$\n", - "Output Answer": [ - "$\\sqrt{9-6 x^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((15*x**4)/(sqrt(9-6*x**5)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{(x+y)^3}{z^9}$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 (x+y)^2}{z^9},\\frac{3 (x+y)^2}{z^9},-\\frac{9 (x+y)^3}{z^{10}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x+y)**3)/(z**9))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\left(\\frac{x}{y^3}-z^4\\right)^{3/2}}$, and $h(x,y,z) = \\left(\\frac{x}{z^4}\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{6 z^3}{\\left(\\frac{x}{y^3}-z^4\\right)^{5/2}},-\\frac{3 \\sqrt{\\frac{x}{z^4}}}{2 z^4},-\\frac{3}{2 y^3 \\left(\\frac{x}{y^3}-z^4\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(((x/(y**3))-z**4)**(3/2)))\nh = (1/(((x/(y**3))-z**4)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\log \\left(4 x^4\\right)$\n", - "Output Answer": [ - "$-\\frac{4}{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(4*x**4))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(y+z)^{3/2}}$, $g(x,y,z) = \\sin \\left(\\frac{x}{y z}\\right)$, and $h(x,y,z) = \\tanh \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{x \\cos \\left(\\frac{x}{y z}\\right)}{y^2 z}-\\frac{x \\text{sech}^2\\left(\\frac{x}{z}\\right)}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y+z)**(3/2)))\ng = sin((x/(y*z)))\nh = tanh(x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}+z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{x}{y}+z\\right)}{y},-\\frac{x \\sec ^2\\left(\\frac{x}{y}+z\\right)}{y^2},\\sec ^2\\left(\\frac{x}{y}+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y)+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x-y}{z}\\right)$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{1}{z \\sqrt{1-\\frac{(x-y)^2}{z^2}}}-e^{x-y}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos((x-y)/z)\ng = math.e**(x-y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$\\left(-\\frac{1}{9}-\\frac{1}{4 \\sqrt{2}}\\right) (x-1)^2+\\left(\\frac{1}{3}+\\frac{1}{\\sqrt{2}}\\right) (x-1)+1+\\sinh ^{-1}(1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = asinh(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\frac{1}{x^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**5\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x+y^4\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$-\\sin \\left(x+y^4\\right)+\\frac{4 y^3}{\\sqrt{1-y^8}}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y**4)\ng = asin(y**4)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^4\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+3) \\left(-\\frac{4}{3}-\\sin (3)\\right)+(x+3)^2 \\left(\\frac{\\cos (3)}{2}-\\frac{2}{9}\\right)+4 \\log (3)-\\cos (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**4)\ng = cos(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = acos(y)\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-5}+\\frac{1}{(5 x+7)^2}$\n", - "Output Answer": [ - "$\\frac{4}{\\sqrt{8 x-5}}-\\frac{10}{(5 x+7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-5)+(1/((5*x+7)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan \\left(x-y^5\\right)$, $g(x,y,z) = \\frac{1}{y^5}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\sec ^2\\left(x-y^5\\right)-\\frac{5}{y^6}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-y**5)\ng = (1/(y**5))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$4 y^3+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**4\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x^5+4}+e^{-3 x-5}$\n", - "Output Answer": [ - "$10 e^{2 x^5+4} x^4-3 e^{-3 x-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x**5+4)+math.e**(-3*x-5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{y+z}^2}-\\sin (y+z),0,-\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = cbrt(y+z)\nh = cbrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{y}+\\text{sech}^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tanh(y)\nh = (z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}-\\frac{1}{y^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = (1/y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\{\\cos (y),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-3} \\log (7 x+7)$\n", - "Output Answer": [ - "$\\frac{8 x+4 (x+1) \\log (7 (x+1))-3}{(x+1) \\sqrt{8 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-3)*log(7*x+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x+y}$, $g(x,y,z) = y$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x+y)^2} & -\\frac{1}{(x+y)^2} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x+y))\ng = y\nh = y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(1-\\frac{x}{2}\\right)+\\log \\left(7 x-\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{28 x-41}{(x-2) (14 x-13)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(1-(x/2))+log(7*x-(13/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\frac{1}{2 x \\sqrt{\\frac{z}{x}}}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = asin(y)\nh = sqrt((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{\\left(\\frac{15}{2}-\\frac{5 x}{2}\\right)^3}-\\tan (9 x+3)$\n", - "Output Answer": [ - "$-\\frac{24}{125 (x-3)^4}-9 \\sec ^2(9 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(((15/2)-((5*x)/2))**3))-tan(9*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z^5}{y}}$, $g(x,y,z) = \\frac{1}{\\left(\\frac{y}{z^5}\\right)^{3/2}}$, and $h(x,y,z) = \\frac{z^5}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z^5 e^{\\frac{z^5}{y}}}{y^2} & \\frac{5 z^4 e^{\\frac{z^5}{y}}}{y} \\\\\n 0 & -\\frac{3}{2 z^5 \\left(\\frac{y}{z^5}\\right)^{5/2}} & \\frac{15 y}{2 z^6 \\left(\\frac{y}{z^5}\\right)^{5/2}} \\\\\n -\\frac{z^5}{x^2} & 0 & \\frac{5 z^4}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**((z**5)/y)\ng = (1/((y/(z**5))**(3/2)))\nh = ((z**5)/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y-z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z (x-y)$", - "Output Answer": [ - "$x+3 y^2-y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y-z)\ng = y**3\nh = z*(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-\\sin (5 x+8))-\\sqrt{5-6 x}$\n", - "Output Answer": [ - "$\\frac{9}{(5-6 x)^{3/2}}-25 \\csc ^2(5 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-sin(5*x+8))-sqrt(5-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\{\\cos (y+z),0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x^5 z}{y}\\right)$", - "Output Answer": [ - "$\\frac{x^{15} z^3}{y^5 \\left(1-\\frac{x^{10} z^2}{y^2}\\right)^{3/2}}+\\frac{x^{15} z}{y^3 \\left(1-\\frac{x^{10} z^2}{y^2}\\right)^{3/2}}+\\frac{25 x^{13} z^3}{y^3 \\left(1-\\frac{x^{10} z^2}{y^2}\\right)^{3/2}}+\\frac{2 x^5 z}{y^3 \\sqrt{1-\\frac{x^{10} z^2}{y^2}}}+\\frac{20 x^3 z}{y \\sqrt{1-\\frac{x^{10} z^2}{y^2}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x**5*z)/y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x+z^3\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\sin \\left(x+z^3\\right),0,-3 z^2 \\sin \\left(x+z^3\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z**3)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\frac{x^3}{z^2}$, and $h(x,y,z) = \\log \\left(z^2\\right)$", - "Output Answer": [ - "$3 e^{x^3} x^2+\\frac{2}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3)\ng = ((x**3)/(z**2))\nh = log(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^3\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x^3+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 x^2}{\\sqrt{1-x^6}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 3 x^2 e^{x^3+z} & 0 & e^{x^3+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x**3)\ng = y\nh = math.e**(x**3+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x z)$, $g(x,y,z) = \\sqrt{x+y-z}$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{x^2 z^2+1} & 0 & \\frac{x}{x^2 z^2+1} \\\\\n \\frac{1}{2 \\sqrt{x+y-z}} & \\frac{1}{2 \\sqrt{x+y-z}} & -\\frac{1}{2 \\sqrt{x+y-z}} \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x*z)\ng = sqrt(x+y-z)\nh = log(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log (5) \\tan \\left(8 x^2+8\\right)$\n", - "Output Answer": [ - "$-16 \\log (5) \\left(32 x^2 \\tan \\left(8 \\left(x^2+1\\right)\\right)+1\\right) \\sec ^2\\left(8 \\left(x^2+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(5)*tan(8*x**2+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = x-y$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$4 x^3-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = x-y\nh = x+y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8 x-3)^2}$\n", - "Output Answer": [ - "$\\frac{384}{(3-8 x)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8*x-3)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^3}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{55 (x-4)^2}{72 \\sqrt[3]{2}}+\\frac{11}{3} 2^{2/3} (x-4)+8\\ 2^{2/3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**3)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{-6 x-2}}{\\sqrt{7 x+9}}$\n", - "Output Answer": [ - "$-\\frac{e^{-6 x-2} (84 x+115)}{2 (7 x+9)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(-6*x-2))/(sqrt(7*x+9))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\frac{\\text{sech}^2\\left(\\frac{x}{z}\\right)}{z}+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x/z)\ng = sin(y)\nh = acos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x-y}$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = y\nh = math.e**(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{18}{5}-\\frac{23 x}{5}}-\\sqrt{\\frac{29}{5}} \\sqrt{-x}$\n", - "Output Answer": [ - "$\\frac{\\frac{\\sqrt{29}}{\\sqrt{-x}}-\\frac{23}{\\sqrt{18-23 x}}}{2 \\sqrt{5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((18/5)-((23*x)/5))-sqrt((29/5))*sqrt(-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (x+y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n -\\sin (x+y+z) & -\\sin (x+y+z) & -\\sin (x+y+z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cos(x+y+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{-5 x^4-4}-\\sin ^{-1}(8-4 x)$\n", - "Output Answer": [ - "$-\\frac{800 x^6}{\\left(5 x^4+4\\right)^3}+\\frac{60 x^2}{\\left(5 x^4+4\\right)^2}+\\frac{64 (x-2)}{\\left(-16 x^2+64 x-63\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(-5*x**4-4))-asin(8-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y}}{2}-\\frac{1}{z^2+1},\\frac{1}{z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = atan(z)\nh = atan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{-9 x-5}-\\tan (1)$\n", - "Output Answer": [ - "$-\\frac{162}{(9 x+5)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(-9*x-5))-tan(1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{64}{5} x \\cos \\left(\\frac{8}{5} \\left(4 x^2-3\\right)\\right)$\n", - "Output Answer": [ - "$\\sin \\left(\\frac{8}{5} \\left(4 x^2-3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (64/5)*x*cos((8/5)*(4*x**2-3))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y-z)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\sqrt{\\frac{x-y}{z}}$", - "Output Answer": [ - "$x \\cos (x y)-\\frac{x-y}{2 z^2 \\sqrt{\\frac{x-y}{z}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y-z)\ng = sin(x*y)\nh = sqrt(((x-y)/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin ^{-1}(x y)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{\\sqrt{1-x^2 y^2}},-\\frac{y}{\\sqrt{1-x^2 y^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}},0,\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = acos(z/x)\nh = acos(z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x+4}-\\frac{1}{(x+8)^3}$\n", - "Output Answer": [ - "$\\frac{3}{(x+8)^4}+\\frac{7}{2 \\sqrt{7 x+4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x+4)-(1/((x+8)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = x-y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = x-y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}-z\\right)^{3/2}}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{3}{2 y \\left(\\frac{x}{y}-z\\right)^{5/2}}+\\frac{1}{3 \\sqrt[3]{y}^2}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x/y)-z)**(3/2)))\ng = cbrt(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (8) \\tan (4 x+4)$\n", - "Output Answer": [ - "$4 \\log (8) \\sec ^2(4 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8)*tan(4*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^{25} (x-y)^5$", - "Output Answer": [ - "$40 z^{25} (x-y)^3+600 z^{23} (x-y)^5$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**25*(x-y)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(4 x-\\frac{32}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{25}{(8-5 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x-(32/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(3-4 x)-\\tan (2 x+7)$\n", - "Output Answer": [ - "$-\\frac{16 (3-4 x)}{\\left(1-(3-4 x)^2\\right)^{3/2}}-8 \\tan (2 x+7) \\sec ^2(2 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(3-4*x)-tan(2*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x-3} \\tan (x+8)$\n", - "Output Answer": [ - "$e^{-9 x-3} \\left(\\sec ^2(x+8)-9 \\tan (x+8)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x-3)*tan(x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y z}\\right)$, and $h(x,y,z) = \\sqrt{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n \\frac{1}{y z \\left(\\frac{x^2}{y^2 z^2}+1\\right)} & -\\frac{x}{y^2 z \\left(\\frac{x^2}{y^2 z^2}+1\\right)} & -\\frac{x}{y z^2 \\left(\\frac{x^2}{y^2 z^2}+1\\right)} \\\\\n 0 & -\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}} & \\frac{1}{2 y \\sqrt{\\frac{z}{y}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y/x)\ng = atan(x/(y*z))\nh = sqrt((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (6-3 x)-\\tan (6 x+4)$\n", - "Output Answer": [ - "$-9 \\left(\\sin (6-3 x)+8 \\tan (6 x+4) \\sec ^2(6 x+4)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6-3*x)-tan(6*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^4$", - "Output Answer": [ - "$(x+1) (\\cos (1)-4)+1-\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**4\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^5$", - "Output Answer": [ - "$-160 (x+4)^3+641 (x+4)^2-1288 (x+4)+1040$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**5\nseries = f.subs(x, g).series(x, -4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8-7 x^2}$\n", - "Output Answer": [ - "$-\\frac{56}{\\left(8-7 x^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8-7*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x y)$, $g(x,y,z) = y$, and $h(x,y,z) = x y z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{1-x^2 y^2} & \\frac{x}{1-x^2 y^2} & 0 \\\\\n 0 & 1 & 0 \\\\\n y z & x z & x y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x*y)\ng = y\nh = x*y*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = (y-x)^{3/2}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3 \\sqrt{y-x}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = (y-x)**(3/2)\nh = (y-x)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = asin(y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\tan ^{-1}(x+z)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x+z)^2+1},1,\\frac{1}{(x+z)^2+1}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = atan(x+z)\nh = atan(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(2 x+1)^3+\\tan (7-2 x)$\n", - "Output Answer": [ - "$8 \\left(6 x+\\tan (7-2 x) \\sec ^2(7-2 x)+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (2*x+1)**3+tan(7-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$16 x^4-1$\n", - "Output Answer": [ - "$-64$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(16*x**4-1)\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y+z}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\frac{1}{2 (y+z)^{3/2}} & -\\frac{1}{2 (y+z)^{3/2}} \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (1/(sqrt(y+z)))\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4-z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4-z\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-7 x}-\\tan (x+7)$\n", - "Output Answer": [ - "$-\\frac{49}{4 (1-7 x)^{3/2}}-2 \\tan (x+7) \\sec ^2(x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-7*x)-tan(x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^3\\right)^{3/2}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{2 \\sqrt{y z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**3)**(3/2)\ng = sqrt(y*z)\nh = sqrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\log \\left(x^4\\right)$", - "Output Answer": [ - "$\\frac{1}{2} (x+2)^2+3 (x+2)-2-4 \\log (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = log(x**4)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\log \\left(y^3\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{3}{y} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = log(y**3)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-5 x^5-3} \\cosh \\left(6-3 x^4\\right)$\n", - "Output Answer": [ - "$\\frac{x^3 \\left(24 \\left(5 x^5+3\\right) \\sinh \\left(6-3 x^4\\right)-25 x \\cosh \\left(6-3 x^4\\right)\\right)}{2 \\sqrt{-5 x^5-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-5*x**5-3)*cosh(6-3*x**4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{\\frac{x}{y^4}-z}$, and $h(x,y,z) = \\frac{z^4}{x^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\frac{e^{\\frac{x}{y^4}-z}}{y^4} & -\\frac{4 x e^{\\frac{x}{y^4}-z}}{y^5} & -e^{\\frac{x}{y^4}-z} \\\\\n -\\frac{4 z^4}{x^5} & 0 & \\frac{4 z^3}{x^4} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = math.e**((x/(y**4))-z)\nh = ((z**4)/(x**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{9}{2} x^2 \\sin \\left(\\frac{1}{2} \\left(17-3 x^3\\right)\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{1}{2} \\left(17-3 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (9/2)*x**2*sin((1/2)*(17-3*x**3))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (3)-\\sin (7-9 x)$\n", - "Output Answer": [ - "$81 \\sin (7-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(3)-sin(7-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2}+\\sec ^2(y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x/z)\ng = tan(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$-\\frac{7}{162} (x-1)^4+\\frac{1}{9} (x-1)^3-\\frac{1}{3} (x-1)^2+2 (x-1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+y+z)$, $g(x,y,z) = \\frac{1}{x+z}$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$-\\sin (x+y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y+z)\ng = (1/(x+z))\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-z}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{(x-y-z)^2}$", - "Output Answer": [ - "$\\left\\{\\frac{2}{(x-y-z)^3},\\frac{2}{(x-y-z)^3}-\\frac{1}{3 \\sqrt[3]{x-z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-z)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(6-2 x^3\\right)+\\cos (7 x+6)$\n", - "Output Answer": [ - "$6 x^2 \\sin \\left(6-2 x^3\\right)-7 \\sin (7 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6-2*x**3)+cos(7*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^5$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(x+z)$", - "Output Answer": [ - "$5 (x+z)^4+\\frac{1}{(x+z)^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**5\ng = y\nh = atan(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$e^{x+y}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = sqrt(y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n e^{x+y} & e^{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(z)\ng = tanh(y)\nh = math.e**(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh \\left(y^3-z^5\\right)$", - "Output Answer": [ - "$25 z^8 \\sinh \\left(y^3-z^5\\right)+9 y^4 \\sinh \\left(y^3-z^5\\right)-20 z^3 \\cosh \\left(y^3-z^5\\right)+6 y \\cosh \\left(y^3-z^5\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(y**3-z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin \\left(\\frac{21 x}{5}\\right)$ on the interval $x = 3$ to $x = 3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(((21*x)/5))\na = 3\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{6 x}{5}+\\frac{44}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{36}{25} \\sin \\left(\\frac{2}{5} (3 x+22)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((6*x)/5)+(44/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (x-z)$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & \\frac{1}{2 z \\sqrt{\\frac{y}{z}}} & -\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = tan(x-z)\nh = sqrt((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\frac{1}{y^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/z))\ng = (1/(y**5))\nh = (1/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (y)$, $g(x,y,z) = y^2$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cosh (y) & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(y)\ng = y**2\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\frac{y^4}{x^4}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n -\\frac{4 y^4}{x^5} & \\frac{4 y^3}{x^4} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = ((y**4)/(x**4))\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = -\\sin \\left(y-z^5\\right)$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & -\\cos \\left(y-z^5\\right) & 5 z^4 \\cos \\left(y-z^5\\right) \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = -sin(y-z**5)\nh = (y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{4 (x-1)}{\\pi }-\\frac{2 (4+\\pi ) (x-1)^2}{\\pi ^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(x^2+z\\right)^4$, $g(x,y,z) = \\frac{1}{\\left(y^2\\right)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 8 x \\left(x^2+z\\right)^3 & 0 & 4 \\left(x^2+z\\right)^3 \\\\\n 0 & -\\frac{3 y}{\\left(y^2\\right)^{5/2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x**2+z)**4\ng = (1/((y**2)**(3/2)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(3-3 x) \\cosh (8-6 x)$\n", - "Output Answer": [ - "$-\\frac{3 \\cosh (8-6 x)}{9 (x-1)^2+1}-6 \\tan ^{-1}(3-3 x) \\sinh (8-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(3-3*x)*cosh(8-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{x-z^3}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\left(x-z^3\\right)^2},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n y & x & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = x*y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{8 x \\left(56 x^3+63 x+10\\right)}{\\left(5-8 x^3\\right)^4}$\n", - "Output Answer": [ - "$\\frac{-8 x^2-7}{\\left(8 x^3-5\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((8*x*(56*x**3+63*x+10))/((5-8*x**3)**4))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{17}{2}-\\frac{7 x}{2}\\right)-\\cosh \\left(\\frac{11}{2}-3 x\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{4} \\cos \\left(\\frac{1}{2} (17-7 x)\\right)-9 \\cosh \\left(\\frac{11}{2}-3 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((17/2)-((7*x)/2))-cosh((11/2)-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(3-7 x^2\\right)-\\frac{1}{(-7 x-7)^4}$\n", - "Output Answer": [ - "$14 \\left(14 x^2 \\sin \\left(3-7 x^2\\right)+\\cos \\left(3-7 x^2\\right)-\\frac{70}{(-7 x-7)^6}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3-7*x**2)-(1/((-7*x-7)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$4 x^3+\\frac{1}{3 \\sqrt[3]{y+z}^2}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cbrt(y+z)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\frac{1}{y}+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = log(y)\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{5 x^3}{2}-\\frac{17}{2}\\right)-\\sin \\left(\\frac{11 x^4}{2}+\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$x^2 \\left(\\frac{15}{5 x^3-17}-22 x \\cos \\left(\\frac{1}{2} \\left(11 x^4+1\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((5*x**3)/2)-(17/2))-sin(((11*x**4)/2)+(1/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(7 x^5+2\\right)$\n", - "Output Answer": [ - "$-35 x^3 \\left(4 \\sin \\left(7 x^5+2\\right)+35 x^5 \\cos \\left(7 x^5+2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7*x**5+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x}-\\tan ^{-1}(7-7 x)$\n", - "Output Answer": [ - "$\\frac{7}{(7-7 x)^2+1}+\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x)-atan(7-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & -\\frac{1}{y} & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((x/y))\ng = y**3\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z^2}$, $g(x,y,z) = \\log \\left(y z^2\\right)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{z},\\frac{2 z}{3 \\sqrt[3]{x+z^2}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z**2)\ng = log(y*z**2)\nh = log(y*z**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(7 x^5-3\\right)^5$\n", - "Output Answer": [ - "$700 x^3 \\left(7 x^5-3\\right)^3 \\left(42 x^5-3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (7*x**5-3)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (5 x+5)-e^{2 x+3}$\n", - "Output Answer": [ - "$5 \\sec ^2(5 (x+1))-2 e^{2 x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(5*x+5)-math.e**(2*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^2}{x^2}$, $g(x,y,z) = \\frac{y^4}{z^4}$, and $h(x,y,z) = \\sin ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2 y^2}{x^3} & \\frac{2 y}{x^2} & 0 \\\\\n 0 & \\frac{4 y^3}{z^4} & -\\frac{4 y^4}{z^5} \\\\\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**2)/(x**2))\ng = ((y**4)/(z**4))\nh = asin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = x-y-z$", - "Output Answer": [ - "$\\sinh (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(y)\nh = x-y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = log((z/x))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\left(405+\\frac{1}{3\\ 3^{2/3}}\\right) (x+3)-\\sqrt[3]{3}-243$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = x**5\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2},-\\frac{\\sec ^2\\left(\\frac{x}{z}\\right)}{z},\\frac{\\cos \\left(\\frac{x}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sin((x/z))\nh = sin((x/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(y)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n 0 & -1 & 1 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+z)\ng = z-y\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (x+y-z)$", - "Output Answer": [ - "$\\left\\{\\cos (x+y-z),-\\cos (x+y-z),-\\sec ^2(x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{2 \\sqrt{x^5}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**5)\ng = math.e**y\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2}-\\frac{y}{2 \\sqrt{y z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y*z)\nh = sqrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x-y^3\\right)$, $g(x,y,z) = \\frac{1}{\\left(y^3\\right)^{3/2}}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y^3}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin \\left(x-y^3\\right) & 3 y^2 \\sin \\left(x-y^3\\right) & 0 \\\\\n 0 & -\\frac{9 y^2}{2 \\left(y^3\\right)^{5/2}} & 0 \\\\\n 0 & -\\frac{3 y^2}{2 \\left(y^3\\right)^{3/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-y**3)\ng = (1/((y**3)**(3/2)))\nh = (1/(sqrt(y**3)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$2 x \\cos \\left(x^2\\right)+3 y^2+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = y**3\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{y^4}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n 0 & \\frac{4 y^3}{z \\sqrt{1-\\frac{y^8}{z^2}}} & -\\frac{y^4}{z^2 \\sqrt{1-\\frac{y^8}{z^2}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = asin(y**4)\nh = asin((y**4)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\left(z^2\\right)^{3/2}$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{2 \\sqrt{y}}+3 z \\sqrt{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(y)\nh = (z**2)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (4)}{e^3}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((tan(4))/(math.e**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(3 x-2) \\sqrt{9 x^4+9}$\n", - "Output Answer": [ - "$\\frac{3 \\left(9 x^4-4 x^3+3\\right)}{\\sqrt{x^4+1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((3*x-2)*sqrt(9*x**4+9), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{6 x-3} \\tan (8 x+2)$\n", - "Output Answer": [ - "$-e^{6 x-3} (3 \\sin (16 x+4)+8) \\sec ^2(8 x+2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(6*x-3)*tan(8*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-5}+\\sin ^{-1}(1-4 x)$\n", - "Output Answer": [ - "$5 e^{5 x-5}-\\frac{\\sqrt{2}}{\\sqrt{(1-2 x) x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-5)+asin(1-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\sqrt{(1-9 x)^2+1}}$\n", - "Output Answer": [ - "$\\frac{81 \\left(162 x^2-36 x+1\\right)}{\\left(81 x^2-18 x+2\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(sqrt((1-9*x)**2+1)))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$, $g(x,y,z) = y^4$, and $h(x,y,z) = (y+z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 z \\left(\\frac{x}{z}\\right)^{3/2}} & 0 & \\frac{x}{2 z^2 \\left(\\frac{x}{z}\\right)^{3/2}} \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt((x/z))))\ng = y**4\nh = (y+z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{x^2 y^2}$", - "Output Answer": [ - "$\\cos (x)+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = log(y)\nh = (1/(x**2*y**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-1)^2 \\left(1-\\frac{\\sin (1)}{2}\\right)+(x-1) (2+\\cos (1))+1+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = sin(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & \\frac{e^{y/z}}{z} & -\\frac{y e^{y/z}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = y**3\nh = math.e**(y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{x-y}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left\\{\\cos (y),0,\\frac{1}{3 \\sqrt[3]{x-y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(x-y)\nh = cbrt(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\{\\cos (y),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{15}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 15 x^{14} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**15\ng = atan(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$4 x^3-\\frac{2}{y^3}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = (1/(y**2))\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,\\cos (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-7 x-4} \\log \\left(-2 x^3-4\\right)$\n", - "Output Answer": [ - "$\\frac{-6 (7 x+4) x^2-7 \\left(x^3+2\\right) \\log \\left(-2 \\left(x^3+2\\right)\\right)}{2 \\sqrt{-7 x-4} \\left(x^3+2\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-7*x-4)*log(-2*x**3-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-4 x-7)^2}$\n", - "Output Answer": [ - "$\\frac{96}{(4 x+7)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-4*x-7)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\tan ^{-1}(z (x+y))$", - "Output Answer": [ - "$\\frac{x+y}{z^2 (x+y)^2+1}-\\sin (x+y)-\\sin (x+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z)\ng = cos(x+y)\nh = atan(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{1-2 x} (5 x+8)^2$\n", - "Output Answer": [ - "$2 e^{1-2 x} \\left(50 x^2+60 x-7\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(1-2*x)*(5*x+8)**2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x-y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{x-y}{z^2 \\left(\\frac{(x-y)^2}{z^2}+1\\right)}+\\cos (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = sin(y)\nh = atan((x-y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x-1} \\cos (2-3 x)$\n", - "Output Answer": [ - "$e^{-2 x-1} (3 \\sin (2-3 x)-2 \\cos (2-3 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x-1)*cos(2-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{y+z^3}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{y+z^3}},\\frac{3 z^2}{2 \\sqrt{y+z^3}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z**3)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$7 \\sin (1-7 x)$\n", - "Output Answer": [ - "$7 \\left(\\frac{1}{7} \\sin (1) \\sin (7 x)+\\frac{1}{7} \\cos (1) \\cos (7 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 7*sin(1-7*x)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\frac{1}{(x+z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n -\\frac{3}{2 (x+z)^{5/2}} & 0 & -\\frac{3}{2 (x+z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = (y/z)\nh = (1/((x+z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = -\\tanh (y-z)$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\cos (x-z)+\\frac{1}{x}-\\text{sech}^2(y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = -tanh(y-z)\nh = -sin(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^2\\right)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x-1) (e-2 \\sin (1))+(x-1)^2 \\left(\\frac{e}{2}-\\sin (1)-2 \\cos (1)\\right)+e+\\cos (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x**2)\ng = math.e**x\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh \\left(7 x^5+1\\right)+\\sqrt{2 x+3}$\n", - "Output Answer": [ - "$35 x^4 \\sinh \\left(7 x^5+1\\right)+\\frac{1}{\\sqrt{2 x+3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cosh(7*x**5+1)+sqrt(2*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{11 x^4}{2}-2\\right)+\\sin (2 x+1)$\n", - "Output Answer": [ - "$-\\frac{44 \\left(11 x^4+12\\right) x^2}{\\left(4-11 x^4\\right)^2}-4 \\sin (2 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((11*x**4)/2)-2)+sin(2*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x y}{z}$, $g(x,y,z) = \\log (x z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{y}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x*y)/z)\ng = log(x*z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n -\\frac{y \\cos \\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\cos \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = sin((y/x))\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z^5}$", - "Output Answer": [ - "$\\frac{5 z^4}{2 \\sqrt{z^5}}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = sqrt(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x-2} \\log \\left(\\sqrt{\\frac{9 x}{2}+\\frac{11}{2}}\\right)$\n", - "Output Answer": [ - "$\\frac{e^{-9 x-2} \\left(9-18 (9 x+11) \\log \\left(\\sqrt{\\frac{9 x}{2}+\\frac{11}{2}}\\right)\\right)}{2 (9 x+11)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x-2)*log(sqrt(((9*x)/2)+(11/2))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-y}$, $g(x,y,z) = -\\sin (x-z)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-y}^2} & -\\frac{1}{3 \\sqrt[3]{x-y}^2} & 0 \\\\\n -\\cos (x-z) & 0 & \\cos (x-z) \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-y)\ng = -sin(x-z)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y+z\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\frac{1}{y^2 z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n 0 & -\\frac{2}{y^3 z^2} & -\\frac{2}{y^2 z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = cosh(y)\nh = (1/(y**2*z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^5\\right)$ and $g(x) = $\\log \\left(x^5\\right)$", - "Output Answer": [ - "$(x-3) \\left(\\frac{1220}{3}+405 \\tan ^2(243)\\right)+5 \\log (3)+\\tan (243)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**5)\ng = log(x**5)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = z^4$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^4}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n 0 & 0 & -\\frac{2 z^3}{\\left(z^4\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = z**4\nh = (1/(sqrt(z**4)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{3 \\sqrt{z}}{2},0,\\frac{x}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = z**(3/2)\nh = z**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^5\\right)^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(z-y)$", - "Output Answer": [ - "$\\frac{15}{2} \\sqrt{x^5} x^4-\\frac{1}{\\sqrt{1-(z-y)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**5)**(3/2)\ng = y\nh = acos(z-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(4 x-5)^3}+\\tan (9-7 x)$\n", - "Output Answer": [ - "$-\\frac{12}{(5-4 x)^4}-7 \\sec ^2(9-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((4*x-5)**3))+tan(9-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\tanh (x)$", - "Output Answer": [ - "$(x+4) \\left(-\\frac{\\tanh (4)}{17}-\\tan ^{-1}(4) \\left(1-\\tanh ^2(4)\\right)\\right)+\\tan ^{-1}(4) \\tanh (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = tanh(x)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = tan(x)\nh = x+y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & z e^{y z} & y e^{y z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = sin((y/z))\nh = math.e**(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3-4 x) \\cos \\left(2-6 x^5\\right)$\n", - "Output Answer": [ - "$30 x^4 \\sin \\left(2-6 x^5\\right) \\cos (3-4 x)+4 \\sin (3-4 x) \\cos \\left(2-6 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3-4*x)*cos(2-6*x**5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-x-9}-\\sin (7 x)$\n", - "Output Answer": [ - "$e^{-x-9}+49 \\sin (7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-x-9)-sin(7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n e^{x+z} & 0 & e^{x+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log((x/z))\nh = math.e**(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x+3) (\\sin (3)-\\sinh (3))+\\frac{1}{2} (x+3)^2 (\\cosh (3)-\\cos (3))+\\cos (3)+\\cosh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cosh(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\tan \\left(x y^4\\right)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2}-1,y^4 \\sec ^2\\left(x y^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = tan(x*y**4)\nh = tan(x*y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^3}$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{x^5}{120}+\\frac{x^4}{24}+\\frac{x^3}{6}+\\frac{x^2}{2}+\\sqrt{x^3}+x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^2-y+z}$, $g(x,y,z) = x^2-y-z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{1,\\frac{1}{2 \\sqrt{x^2-y+z}},\\frac{1}{2 \\sqrt{x^2-y+z}}+2 x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2-y+z)\ng = x**2-y-z\nh = x**2-y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(\\frac{23 x}{3}+\\frac{20}{3}\\right)^4}+\\log (2 x+1)$\n", - "Output Answer": [ - "$\\frac{856980}{(23 x+20)^6}-\\frac{4}{(2 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((((23*x)/3)+(20/3))**4))+log(2*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n e^x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cbrt(z)\nh = math.e**x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^4 y z$", - "Output Answer": [ - "$12 x^2 y z$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4*y*z\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = math.e**y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{x-y}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 (x-y)^{3/2}}-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = (1/(sqrt(x-y)))\nh = (1/(sqrt(x-y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^{3/2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = (y-z)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y-z}}{2},\\frac{3 \\sqrt{z-x}}{2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**(3/2)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sqrt{3} \\sqrt{x^5}$ on the interval $x = 0$ to $x = 8$\n", - "Output Answer": [ - "$8 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{3};\\frac{4}{3};-9600\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3)*sqrt(x**5)\na = 0\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = y$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\left\\{1,1-\\frac{1}{2 z^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = y^5 z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 5 y^4 z^5 & 5 y^5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(y)\nh = y**5*z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = atan(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$e^x-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = acos(y)\nh = atan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = sqrt(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\tan (x y)$", - "Output Answer": [ - "$\\left\\{x \\sec ^2(x y),-y \\sec ^2(x y),\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cbrt(x+y)\nh = cbrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x^4-5}$\n", - "Output Answer": [ - "$\\frac{18 x^2 \\left(x^4-5\\right)}{\\left(3 x^4-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x**4-5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\frac{3 z^2}{2 \\sqrt{z^3}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**3\nh = sqrt(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{y \\cos \\left(\\frac{y}{x}\\right)}{x^2}+\\frac{1}{\\sqrt{1-(y+z)^2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((y/x))\ng = asin(y+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cosh (y+z)$, and $h(x,y,z) = \\sqrt[3]{x^4 y}$", - "Output Answer": [ - "$4 x^3+\\sinh (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cosh(y+z)\nh = cbrt(x**4*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = (x-y)^5$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 5 (x-y)^4 & -5 (x-y)^4 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*y)\ng = (x-y)**5\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{x^7}{5040}+\\frac{x^6}{720}+\\frac{x^5}{120}+\\frac{x^4}{24}+\\frac{x^3}{6}+\\frac{x^2}{2}+x+\\log (x)+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^4$, $g(x,y,z) = \\cosh \\left(\\frac{y^2}{x}\\right)$, and $h(x,y,z) = x+y^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 4 z^3 \\\\\n -\\frac{y^2 \\sinh \\left(\\frac{y^2}{x}\\right)}{x^2} & \\frac{2 y \\sinh \\left(\\frac{y^2}{x}\\right)}{x} & 0 \\\\\n 1 & 2 y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**4\ng = cosh((y**2)/x)\nh = x+y**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}\\left(x^3\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n x^3+\\sqrt[3]{x} & x>0 \\\\\n x^3-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x**3)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z^3}{x}\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(y z^3\\right)$, and $h(x,y,z) = \\sqrt[3]{z^3}$", - "Output Answer": [ - "$\\left\\{\\frac{3 y z^2}{\\sqrt{1-y^2 z^6}},\\frac{3}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((z**3)/x))\ng = acos(y*z**3)\nh = acos(y*z**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-1}-\\frac{1}{(x-2)^3}$\n", - "Output Answer": [ - "$\\frac{3}{(x-2)^4}+\\frac{4}{\\sqrt{8 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-1)-(1/((x-2)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$1-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = y\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{z}}{2}-\\frac{1}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = (1/y)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x-z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{(x-z)^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x-z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos \\left(z^3\\right)$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = cos(z**3)\nh = cos(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin \\left(x-z^4\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x^2}+4 z^3 \\cos \\left(x-z^4\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-z**4)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (x+z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sin(x+z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,-\\cos (x+y)-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y)\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{13}{18} e (x-1)^2+\\frac{4}{3} e (x-1)+e$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{y^2 \\left(\\frac{z^2}{y^2}+1\\right)} & \\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)} \\\\\n 0 & 1 & 0 \\\\\n -\\frac{1}{2 \\sqrt{z-x}} & 0 & \\frac{1}{2 \\sqrt{z-x}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z/y)\ng = y\nh = sqrt(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}\\left(x y^3\\right)$, and $h(x,y,z) = e^{y^3-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{y^3}{\\sqrt{1-x^2 y^6}} & -\\frac{3 x y^2}{\\sqrt{1-x^2 y^6}} & 0 \\\\\n -e^{y^3-x} & 3 y^2 e^{y^3-x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = acos(x*y**3)\nh = math.e**(y**3-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(8-x)$\n", - "Output Answer": [ - "$\\frac{2 (x-8)}{\\left(x^2-16 x+65\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(8-x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tanh \\left(x y^4\\right)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,0,y^4 \\text{sech}^2\\left(x y^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = tanh(x*y**4)\nh = tanh(x*y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{y^3}{x^3}$", - "Output Answer": [ - "$\\sec ^2(x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x+y\nh = ((y**3)/(x**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{z-y^4}$, $g(x,y,z) = \\cosh ^{-1}(x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -4 y^3 e^{z-y^4} & e^{z-y^4} \\\\\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z-y**4)\ng = acosh(x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos ^{-1}(y+z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y+z)^2}} & -\\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = acos(y+z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x y^5\\right)$, $g(x,y,z) = \\frac{1}{y^5}$, and $h(x,y,z) = \\frac{1}{x y^5+z}$", - "Output Answer": [ - "$\\left\\{-\\frac{5 x y^4}{\\left(x y^5+z\\right)^2},\\frac{y^5}{\\left(x y^5+z\\right)^2},-\\frac{5}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y**5)\ng = (1/(y**5))\nh = (1/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (\\sin (4 x+8))$\n", - "Output Answer": [ - "$-16 \\left(\\sin (\\sin (4 (x+2))) \\cos ^2(4 (x+2))+\\sin (4 (x+2)) \\cos (\\sin (4 (x+2)))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(sin(4*x+8))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3+y+z\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(x^3+y\\right)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x^3}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z \\cos \\left(\\frac{z}{x^3}\\right)}{x^4}-\\frac{1}{\\sqrt{1-\\left(x^3+y+z\\right)^2}},\\frac{1}{\\sqrt{1-\\left(x^3+y+z\\right)^2}}+\\frac{3 x^2}{\\sqrt{1-\\left(x^3+y\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**3+y+z)\ng = asin(x**3+y)\nh = asin(x**3+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x-1} \\sin \\left(\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{9 \\sin \\left(\\frac{13}{2}\\right)}{4 (3 x-1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x-1)*sin((13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-9 x^3-4}+\\log \\left(e^{x^4+1}\\right)$\n", - "Output Answer": [ - "$-\\frac{729 x^4}{4 \\left(-9 x^3-4\\right)^{3/2}}+12 x^2-\\frac{27 x}{\\sqrt{-9 x^3-4}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(-9*x**3-4)+log(math.e**(x**4+1))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (3-4 x)-\\tan \\left(5-3 x^4\\right)$\n", - "Output Answer": [ - "$4 \\left(\\left(9 x^2-72 x^6 \\tan \\left(5-3 x^4\\right)\\right) \\sec ^2\\left(5-3 x^4\\right)-\\frac{4}{(3-4 x)^2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3-4*x)-tan(5-3*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$3 x^2+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = math.e**y\nh = sqrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = e^{y^5}$", - "Output Answer": [ - "$\\left\\{5 e^{y^5} y^4,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = tan(y**5)\nh = tan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\cos (y)-\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = sin(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x z$, and $h(x,y,z) = e^{y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n z & 0 & x \\\\\n 0 & 5 e^{y^5} y^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = x*z\nh = math.e**(y**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{y^3}{z}\\right)^{3/2}}$, $g(x,y,z) = \\tan \\left(\\frac{x y^3}{z}\\right)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{\\frac{x y^3 \\sec ^2\\left(\\frac{x y^3}{z}\\right)}{z^2},\\frac{3 y^3}{2 z^2 \\left(\\frac{y^3}{z}\\right)^{5/2}}-\\frac{1}{2 \\sqrt{x}},\\frac{y^3 \\sec ^2\\left(\\frac{x y^3}{z}\\right)}{z}+\\frac{9 y^2}{2 z \\left(\\frac{y^3}{z}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((y**3)/z)**(3/2)))\ng = tan(((x*y**3)/z))\nh = tan(((x*y**3)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$-\\sin (x)-\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = z\nh = cbrt(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x-y}^2}-\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-y)\ng = y\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left\\{\\cos (y)-\\frac{x}{3 \\sqrt[3]{x z}^2},0,\\frac{z}{3 \\sqrt[3]{x z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cbrt(x*z)\nh = cbrt(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x-y-z)^2}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{2}{(x-y-z)^3},-\\frac{2}{(x-y-z)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x-y-z)**2))\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**y\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2 \\sqrt{\\frac{z^2}{x^2}+1}} & 0 & \\frac{1}{x \\sqrt{\\frac{z^2}{x^2}+1}} \\\\\n \\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(z/x)\ng = log(x*y)\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(z-y^3\\right)$, $g(x,y,z) = \\frac{1}{y^6}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z-y^3},\\frac{3 y^2}{z-y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z-y**3)\ng = (1/(y**6))\nh = (1/(y**6))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{z^2}{x}\\right)$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{z^2}{y}\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{3 z}{y \\left(\\frac{z^2}{y}\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan((z**2)/x)\nh = (1/(((z**2)/y)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = log(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (\\tan (3))-\\tan (1-8 x)$\n", - "Output Answer": [ - "$8 \\sec ^2(1-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(tan(3))-tan(1-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = tan(y)\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^4}{y^3}$", - "Output Answer": [ - "$\\frac{12 x^4}{y^5}+\\frac{12 x^2}{y^3}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(y**3))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = e^{x/y}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = z\nh = math.e**(x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = log(x)\nseries = f.subs(x, g).series(x, -1, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (\\tan (6-8 x))$\n", - "Output Answer": [ - "$-64 \\left(\\sec ^4(6-8 x) \\cos (\\tan (6-8 x))+2 \\tan (6-8 x) \\sec ^2(6-8 x) \\sin (\\tan (6-8 x))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(tan(6-8*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-6 x}+\\frac{1}{(7 x+7)^4}$\n", - "Output Answer": [ - "$-\\frac{28}{(7 x+7)^5}-\\frac{3}{\\sqrt{8-6 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-6*x)+(1/((7*x+7)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},\\frac{1}{\\sqrt{1-z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y**5\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (x)$ on the interval $x = 0$ to $x = 7$\n", - "Output Answer": [ - "$\\int_0^7 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x)\na = 0\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z)\ng = math.e**y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan ^{-1}(y-z)$, $g(x,y,z) = -\\sin (x-y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(y-z)^2+1},\\frac{1}{(y-z)^2+1}-\\cos (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atan(y-z)\ng = -sin(x-y)\nh = -sin(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(7-2 x)^4 \\sqrt{9 x-1}$\n", - "Output Answer": [ - "$\\frac{(2 x-7)^3 (162 x-79)}{2 \\sqrt{9 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((7-2*x)**4*sqrt(9*x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x^4\\right)$\n", - "Output Answer": [ - "$\\left\\{-4 x^3 \\sin \\left(x^4\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**4)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt[3]{x+z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{3 \\sqrt[3]{x+z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\frac{5}{32} (x+2)^3+\\frac{5}{32} (x+2)^2+\\frac{x+2}{8}+\\frac{1}{16}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = x**5\nseries = f.subs(x, g).series(x, -2, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (5-3 x)-\\sin (1-8 x)$\n", - "Output Answer": [ - "$8 \\cos (1-8 x)-3 \\sec ^2(5-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(5-3*x)-sin(1-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{9 x}{\\sqrt{9 x^2-\\frac{7}{2}}}+\\frac{2 x}{x^2+13}$\n", - "Output Answer": [ - "$\\sqrt{9 x^2-\\frac{7}{2}}+\\log \\left(x^2+13\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((9*x)/(sqrt(9*x**2-(7/2))))+((2*x)/(x**2+13))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan ^{-1}(4 x+3)}{(8 x-9)^4}$\n", - "Output Answer": [ - "$\\frac{4 \\left(8 \\tan ^{-1}(4 x+3)-\\frac{8 x-9}{(4 x+3)^2+1}\\right)}{(8 x-9)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((atan(4*x+3))/((8*x-9)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 2 \\sqrt{-x^4}$ on the interval $x = 1$ to $x = 5$\n", - "Output Answer": [ - "$\\frac{1}{8} i \\left(-4 \\sqrt{15}+20 \\sqrt{399}+\\log \\left(4+\\sqrt{15}\\right)-\\log \\left(20+\\sqrt{399}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 2*sqrt(-x**4)\na = 1\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(\\frac{1}{26}+\\frac{1}{2 \\sqrt{5}}\\right) (x-5)+\\sqrt{5}+\\tan ^{-1}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 4 x^3 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = x**4\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left\\{-\\sin (y+z),0,\\frac{1}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\frac{1}{\\left(y^4\\right)^{3/2}}$, and $h(x,y,z) = (x-z)^4$", - "Output Answer": [ - "$-4 (x-z)^3+2 x-\\frac{6 y^3}{\\left(y^4\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = (1/((y**4)**(3/2)))\nh = (x-z)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$e^{5 x}$\n", - "Output Answer": [ - "$\\frac{3125 e^5}{144}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(5*x))\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{9 x^5-x+2}$\n", - "Output Answer": [ - "$e^{9 x^5-x+2} \\left(45 x^4-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(9*x**5-x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = x z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n z & 0 & x \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+z)\ng = x*z\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{z^3}{y^3}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{-\\frac{3 z^2}{y^3},-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = ((z**3)/(y**3))\nh = ((z**3)/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{y^4}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{4}{y^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sin (x-y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\cos (x-y) & \\cos (x-y) & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n \\cos (x-y-z) & -\\cos (x-y-z) & -\\cos (x-y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -sin(x-y)\ng = tan(x)\nh = sin(x-y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = \\cosh ^{-1}\\left(x^5\\right)$, and $h(x,y,z) = \\sin ^{-1}\\left(x^5 y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{2 \\sqrt{x^5}} & 0 & 0 \\\\\n \\frac{5 x^4}{\\sqrt{x^5-1} \\sqrt{x^5+1}} & 0 & 0 \\\\\n \\frac{5 x^4 y}{\\sqrt{1-x^{10} y^2}} & \\frac{x^5}{\\sqrt{1-x^{10} y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**5)\ng = acosh(x**5)\nh = asin(x**5*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x-7) \\log (8 x-2)$\n", - "Output Answer": [ - "$\\frac{4 \\log (7 (x-1))}{4 x-1}+\\frac{\\log (8 x-2)}{x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x-7)*log(8*x-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = x y+z$", - "Output Answer": [ - "$\\left\\{x+\\frac{1}{y z^2},-y,-x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = (1/(y*z))\nh = (1/(y*z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{\\cos \\left(\\frac{x}{z}\\right)}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^2\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-2) (\\sin (2)-4 \\sin (4))+\\cos (4)-\\cos (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**2)\ng = cos(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x y)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y)\ng = sin(z)\nh = (1/(x**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x y)$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{y}{\\sqrt{x y-1} \\sqrt{x y+1}}-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x*y)\ng = cos(y+z)\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\tan ^{-1}(x+y+z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{(x+y+z)^2+1}+\\frac{3 \\sqrt{x}}{2}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = atan(x+y+z)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = e^{x^3}$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{e^{27} (x-3) (81 \\log (3)-1)}{3 \\log ^2(3)}+\\frac{e^{27}}{\\log (3)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**3)\ng = log(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(2 x^3+3\\right)$\n", - "Output Answer": [ - "$-12 x \\left(\\sin \\left(2 x^3+3\\right)+3 x^3 \\cos \\left(2 x^3+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2*x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2},\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2}+y,-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(x-y+z^2\\right)$\n", - "Output Answer": [ - "$\\left\\{\\sinh \\left(x-y+z^2\\right),-\\sinh \\left(x-y+z^2\\right),2 z \\sinh \\left(x-y+z^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x-y+z**2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x^5 z\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4 z}{1-x^{10} z^2} & 0 & \\frac{x^5}{1-x^{10} z^2} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x**5*z)\ng = sqrt(y)\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cosh ^{-1}(x+z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z}-\\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cosh ^{-1}\\left(y z^2\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{z^2}{\\sqrt{y z^2-1} \\sqrt{y z^2+1}},0,-\\frac{x \\sin \\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/y))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y\nh = acos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = -\\sin (x-z)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n -\\cos (x-z) & 0 & \\cos (x-z) \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = -sin(x-z)\nh = asinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\sin ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^3\\right)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\log \\left(x^3\\right)-\\sqrt{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**3)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y^3}{z}\\right)$, $g(x,y,z) = y^3+z$, and $h(x,y,z) = \\tan ^{-1}\\left(y^3\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{3 y^2}{y^6+1}-1,-\\frac{y^3 \\sec ^2\\left(\\frac{y^3}{z}\\right)}{z^2},-\\frac{3 y^2 \\sec ^2\\left(\\frac{y^3}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((y**3)/z))\ng = y**3+z\nh = y**3+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (\\cos (3))}{(4 x-6)^4}$\n", - "Output Answer": [ - "$-\\frac{16 \\cos (\\cos (3))}{(4 x-6)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(cos(3)))/((4*x-6)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x-y)$, $g(x,y,z) = \\frac{z^2}{x^2}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{x^2},-\\frac{1}{2 \\sqrt{x}},\\frac{1}{(x-y)^2+1}-\\frac{2 z^2}{x^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x-y)\ng = ((z**2)/(x**2))\nh = ((z**2)/(x**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\left\\{\\cos (y+z),0,-\\frac{3}{2 x^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(x**(3/2)))\nh = (1/(x**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^3\\right)$ and $g(x) = $\\cos \\left(x^4\\right)$", - "Output Answer": [ - "$x^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**3)\ng = cos(x**4)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y^4}+z^3\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^4 \\sqrt{1-\\left(\\frac{x}{y^4}+z^3\\right)^2}},\\frac{4 x}{y^5 \\sqrt{1-\\left(\\frac{x}{y^4}+z^3\\right)^2}},-\\frac{3 z^2}{\\sqrt{1-\\left(\\frac{x}{y^4}+z^3\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos((x/(y**4))+z**3)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = cbrt(y/x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y+z)$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\cos (y+z),\\sec ^2(x+y)-\\cos (y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y+z)\ng = tan(x+y)\nh = tan(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\log (z-y)$, and $h(x,y,z) = (z-y)^2$", - "Output Answer": [ - "$2 (z-y)-\\frac{1}{z-y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = log(z-y)\nh = (z-y)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4-5 x} \\cos (9-7 x)$\n", - "Output Answer": [ - "$e^{4-5 x} (7 \\sin (9-7 x)-5 \\cos (9-7 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4-5*x)*cos(9-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin \\left(3-2 x^2\\right)}{\\left(-x^2-2\\right)^2}$\n", - "Output Answer": [ - "$\\frac{4 x \\left(\\sin \\left(3-2 x^2\\right)+\\left(x^2+2\\right) \\cos \\left(3-2 x^2\\right)\\right)}{\\left(x^2+2\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(3-2*x**2))/((-x**2-2)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$22 x^3 \\cos \\left(9-\\frac{11 x^4}{2}\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(9-\\frac{11 x^4}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 22*x**3*cos(9-((11*x**4)/2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (3 x+9) \\tan (5-2 x)$\n", - "Output Answer": [ - "$\\frac{1}{8} (-9 \\sin (6-9 x)-9 \\sin (24-3 x)+71 \\sin (x+14)+25 \\sin (5 x+4)) \\sec ^3(5-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3*x+9)*tan(5-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = z^4$, and $h(x,y,z) = \\left(\\frac{x}{y}-z\\right)^5$", - "Output Answer": [ - "$\\sec ^2(x)-5 \\left(\\frac{x}{y}-z\\right)^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = z**4\nh = ((x/y)-z)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x^5$", - "Output Answer": [ - "$-19 (x+4)^4+144 (x+4)^3-544 (x+4)^2+1024 (x+4)-768$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x**5\nseries = f.subs(x, g).series(x, -4, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x-7}+\\cos ^{-1}(4-3 x)$\n", - "Output Answer": [ - "$9 e^{3 x-7}-\\frac{9 (4-3 x)}{\\left(1-(4-3 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x-7)+acos(4-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+y}}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y)\ng = x+y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos ^{-1}(z-y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(z-y)^2}} & -\\frac{1}{\\sqrt{1-(z-y)^2}} \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = acos(z-y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x^4+y-z\\right)^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{8 x^3}{\\left(x^4+y-z\\right)^3},-\\frac{2}{\\left(x^4+y-z\\right)^3},\\frac{2}{\\left(x^4+y-z\\right)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**4+y-z)**2))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt{x z}$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{2 \\sqrt{x z}},0,\\frac{z}{2 \\sqrt{x z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = sqrt(x*z)\nh = sqrt(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{-y,\\sec ^2(x+z)-\\sec ^2(x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-14 x \\cos \\left(8-7 x^2\\right)$\n", - "Output Answer": [ - "$\\sin \\left(8-7 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -14*x*cos(8-7*x**2)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^4}{x^4}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sinh ^{-1}\\left(z^2\\right)$", - "Output Answer": [ - "$-\\frac{4 y^4}{x^5}+\\frac{1}{y^2+1}+\\frac{2 z}{\\sqrt{z^4+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**4)/(x**4))\ng = atan(y)\nh = asinh(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin \\left(\\frac{5 x}{2}+2\\right)}{\\sqrt{x-9}}$\n", - "Output Answer": [ - "$\\frac{\\sin \\left(\\frac{5 x}{2}+2\\right)-5 (x-9) \\cos \\left(\\frac{5 x}{2}+2\\right)}{2 (x-9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(((5*x)/2)+2))/(sqrt(x-9))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\sin (x+z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}-\\frac{z \\text{sech}^2\\left(\\frac{z}{x}\\right)}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(z/x)\ng = sin(x+z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\tanh ^{-1}(y z)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\frac{z}{1-y^2 z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/y)\ng = atanh(y*z)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$1-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-6 x-1) \\cos (5-x)$\n", - "Output Answer": [ - "$\\frac{6 \\cos (5-x)}{6 x+1}+\\log (-6 x-1) \\sin (5-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-6*x-1)*cos(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (8-8 x)-\\sqrt{7 x^3-5}$\n", - "Output Answer": [ - "$\\frac{1}{x-1}-\\frac{21 x^2}{2 \\sqrt{7 x^3-5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8-8*x)-sqrt(7*x**3-5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\sqrt[3]{y-z}$, and $h(x,y,z) = \\cos ^{-1}(x-z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x-z)^2}}+\\cosh (x)+\\frac{1}{3 \\sqrt[3]{y-z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = cbrt(y-z)\nh = acos(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z^4}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 x}{z^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(z**4))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = e^{x y z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$x z e^{x y z}+\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = math.e**(x*y*z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{z^5}{y^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & -\\frac{5 z^5}{y^6} & \\frac{5 z^4}{y^5} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = ((z**5)/(y**5))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(x-y^5-z\\right)$", - "Output Answer": [ - "$\\frac{25 y^8 \\left(x-y^5-z\\right)}{\\left(1-\\left(x-y^5-z\\right)^2\\right)^{3/2}}-\\frac{20 y^3}{\\sqrt{1-\\left(x-y^5-z\\right)^2}}+\\frac{2 \\left(x-y^5-z\\right)}{\\left(1-\\left(x-y^5-z\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x-y**5-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\cos (x)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = acos(x)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+y+z)^2}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$-\\frac{2}{(x+y+z)^3}+\\frac{1}{y^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y+z)**2))\ng = atan(y)\nh = z-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{17}{2}-3 x\\right)-\\tan \\left(\\frac{11 x^2}{2}+1\\right)$\n", - "Output Answer": [ - "$-11 x \\sec ^2\\left(\\frac{11 x^2}{2}+1\\right)-3 \\cos \\left(\\frac{17}{2}-3 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin((17/2)-3*x)-tan(((11*x**2)/2)+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = math.e**y\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{1-3 x} \\tan ^{-1}(7-3 x)$\n", - "Output Answer": [ - "$3 e^{1-3 x} \\left(\\frac{1}{(7-3 x)^2+1}+\\tan ^{-1}(7-3 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(1-3*x)*atan(7-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = cos(x)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\cos \\left(\\frac{z}{y}\\right)}{y} \\\\\n \\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((z/y))\ng = log(x*y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{0,0,5 z^4 \\cos \\left(z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z**5)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = tan(y**4)\nh = tan(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-9 x-7)^4 \\sqrt{5 x^3-8}$\n", - "Output Answer": [ - "$\\frac{3 (9 x+7)^3 \\left(165 x^3+35 x^2-192\\right)}{2 \\sqrt{5 x^3-8}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-9*x-7)**4*sqrt(5*x**3-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n \\frac{z}{2 \\sqrt{x z}} & 0 & \\frac{x}{2 \\sqrt{x z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = (z/y)\nh = sqrt(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{x^5}\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\frac{5 z \\cos \\left(\\frac{z}{x^5}\\right)}{x^6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((z/(x**5)))\ng = z\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 16 x^4$ on the interval $x = 0$ to $x = 4$\n", - "Output Answer": [ - "$4 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{6};\\frac{7}{6};-16777216\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 16*x**4\na = 0\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cosh (x-z)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n \\sinh (x-z) & 0 & -\\sinh (x-z) \\\\\n y & x & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = cosh(x-z)\nh = x*y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (x y z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},-\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{x}{3}+\\frac{2}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{9} \\sin \\left(\\frac{x+2}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((x/3)+(2/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(y^5\\right)$, $g(x,y,z) = \\sin \\left(x+y^5\\right)$, and $h(x,y,z) = \\left(y^5\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{15}{2} y^4 \\sqrt{y^5},0,\\cos \\left(x+y^5\\right)-\\frac{5 y^4}{\\sqrt{y^{10}+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(y**5)\ng = sin(x+y**5)\nh = sin(x+y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\frac{x^5}{y^{25}}$", - "Output Answer": [ - "$\\left\\{1-\\frac{25 x^5}{y^{26}},-\\frac{5 x^4}{y^{25}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x-z\nh = x-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{z \\left(x+y^4\\right)}$", - "Output Answer": [ - "$-\\frac{4 y^6 z^2}{\\left(z \\left(x+y^4\\right)\\right)^{3/2}}-\\frac{z^2}{4 \\left(z \\left(x+y^4\\right)\\right)^{3/2}}+\\frac{6 y^2 z}{\\sqrt{z \\left(x+y^4\\right)}}-\\frac{\\left(x+y^4\\right)^2}{4 \\left(z \\left(x+y^4\\right)\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z*(x+y**4))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x}-\\tan ^{-1}\\left(3 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{3 \\left(54 x^4+3 e^{3 x} \\left(9 x^4+1\\right)^2-2\\right)}{\\left(9 x^4+1\\right)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x)-atan(3*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z^2-x$\n", - "Output Answer": [ - "$\\{-1,0,2 z\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2-x\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x+z)^2}$, $g(x,y,z) = (x+y+z)^5$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{(x+z)^3} & 0 & -\\frac{2}{(x+z)^3} \\\\\n 5 (x+y+z)^4 & 5 (x+y+z)^4 & 5 (x+y+z)^4 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+z)**2))\ng = (x+y+z)**5\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(2 x+6)-\\sqrt{7 x+6}$\n", - "Output Answer": [ - "$\\frac{49}{4 (7 x+6)^{3/2}}-\\frac{8 (x+3)}{\\left(1-4 (x+3)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x+6)-sqrt(7*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & -1 \\\\\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-z\ng = cos(x-y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{32768 x^5}-e^{2 x-3}$\n", - "Output Answer": [ - "$-\\frac{5}{32768 x^6}-2 e^{2 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((1/(32768*x**5))-math.e**(2*x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)}-\\frac{1}{\\sqrt{1-y^2}},0,\\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = atan(x/z)\nh = atan(x/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{y+z}}$", - "Output Answer": [ - "$\\frac{3}{2 (y+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y+z)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\left(\\frac{x}{y}\\right)^{3/2}$, and $h(x,y,z) = \\left(z^5\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 \\sqrt{\\frac{x}{y}}}{2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (x/y)**(3/2)\nh = (x/y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sqrt{y-z}$", - "Output Answer": [ - "$\\cos (x)-\\frac{1}{2 \\sqrt{y-z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**z\nh = sqrt(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = (z-y)^2$, and $h(x,y,z) = x^4 y^4$", - "Output Answer": [ - "$\\left\\{4 x^4 y^3-2 (z-y),-4 x^3 y^4,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (z-y)**2\nh = (z-y)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(y+z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{\\sqrt{1-(y+z)^2}} & -\\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y+z)\ng = y**2\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (x-y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\sec ^2(x-y)-\\sin (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(x-y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$x \\cos (x z)+\\frac{1}{2 \\sqrt{x}}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y)\nh = sin(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = (x y)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2} x \\sqrt{x y},-\\frac{3}{2} y \\sqrt{x y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = x+y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 1 & 1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = atanh(y)\nh = x+y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{\\left(x^4+y\\right)^5}{z^5}$", - "Output Answer": [ - "$\\frac{320 x^6 \\left(x^4+y\\right)^3}{z^5}+\\frac{60 x^2 \\left(x^4+y\\right)^4}{z^5}+\\frac{20 \\left(x^4+y\\right)^3}{z^5}+\\frac{30 \\left(x^4+y\\right)^5}{z^7}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x**4+y)**5)/(z**5))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{x+y}{z}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{\\frac{x+y}{z^2},0,\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = ((x+y)/z)\nh = ((x+y)/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = log(z)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\cos ^{-1}(8-x)}{3125 x^5}$\n", - "Output Answer": [ - "$-\\frac{\\frac{x}{\\sqrt{-x^2+16 x-63}}-5 \\cos ^{-1}(8-x)}{3125 x^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((acos(8-x))/(3125*x**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cbrt(y)\nh = (y/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**(3/2)\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(y/z)\ng = sqrt(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$e^{10 x}$\n", - "Output Answer": [ - "$\\frac{2500}{3 e^{10}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(10*x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\sin ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 1 & 1 & 0 \\\\\n \\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = x+y\nh = asin(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$1-\\sqrt{3 x-6}$\n", - "Output Answer": [ - "$-\\frac{3}{2 \\sqrt{3 x-6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(1-sqrt(3*x-6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y^3}-z\\right)^2$", - "Output Answer": [ - "$\\frac{18 x^2}{y^8}+\\frac{24 x \\left(\\frac{x}{y^3}-z\\right)}{y^5}+\\frac{2}{y^6}+2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/(y**3))-z)**2\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = \\frac{1}{(x-y-z)^{3/2}}$, and $h(x,y,z) = \\tan (x-y)$", - "Output Answer": [ - "$\\frac{3}{2 (x-y-z)^{5/2}}-\\sin (x+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z)\ng = (1/((x-y-z)**(3/2)))\nh = tan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\frac{x^5}{y^5}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{5 x^4}{y^5}-\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = ((x**5)/(y**5))\nh = ((x**5)/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$", - "Output Answer": [ - "$(x+4)^3-12 (x+4)^2+48 (x+4)-64$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x\nseries = f.subs(x, g).series(x, -4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{5-8 x}$\n", - "Output Answer": [ - "$\\frac{128}{(5-8 x)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(5-8*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{-3 z^2,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = z**3\nh = z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^4}{x^4}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{4 z^3}{x^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**4)/(x**4))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{z}}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & -\\frac{1}{2 z \\left(\\frac{y}{z}\\right)^{3/2}} & \\frac{y}{2 z^2 \\left(\\frac{y}{z}\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = cos(y)\nh = (1/(sqrt((y/z))))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(2 x^4+1\\right)$\n", - "Output Answer": [ - "$24 x^2 \\cos \\left(2 x^4+1\\right)-64 x^6 \\sin \\left(2 x^4+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2*x**4+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = y\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(x+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -1 & 1 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z-y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x y-z)^2}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{(x y-z)^3}-\\sin (y),0,-\\frac{2 y}{(x y-z)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((x*y-z)**2))\nh = (1/((x*y-z)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^3 y^3 z^6$", - "Output Answer": [ - "$30 x^3 y^3 z^4+6 x^3 y z^6+6 x y^3 z^6$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y**3*z**6\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (5) (-\\log (1-5 x))$\n", - "Output Answer": [ - "$\\frac{25 \\tan (5)}{(1-5 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(5)*(-log(1-5*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(z-x)$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-(z-x)^2}} & 0 & -\\frac{1}{\\sqrt{1-(z-x)^2}} \\\\\n 0 & -1 & 1 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z-x)\ng = z-y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x+z^5\\right)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}-\\sin \\left(x+z^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z**5)\ng = acosh(y)\nh = x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = x^{20}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,20 x^{19}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = x**20\nh = x**20\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan \\left(x^2\\right)$", - "Output Answer": [ - "$(x+5)^2 \\left(-16-\\tan ^2(25)-100 \\tan ^3(25)-100 \\tan (25)\\right)+(x+5) \\left(85+10 \\tan ^2(25)\\right)-125-\\tan (25)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = tan(x**2)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = cos(y)\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x-y-z^5}$", - "Output Answer": [ - "$\\frac{50 z^8}{\\left(x-y-z^5\\right)^3}+\\frac{20 z^3}{\\left(x-y-z^5\\right)^2}+\\frac{4}{\\left(x-y-z^5\\right)^3}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y-z**5))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (6 x+7)$\n", - "Output Answer": [ - "$72 \\tan (6 x+7) \\sec ^2(6 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(6*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x z}$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{x^2 z}-2 y \\sin \\left(y^2\\right)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x*z))\ng = cos(y**2)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(x^4\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(y+z^3\\right)$, and $h(x,y,z) = \\frac{x^8}{z^6}$", - "Output Answer": [ - "$\\left\\{\\frac{3 z^2}{\\sqrt{1-\\left(y+z^3\\right)^2}},-\\frac{8 x^7}{z^6},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x**4)\ng = acos(y+z**3)\nh = acos(y+z**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 y \\sqrt{\\frac{x}{y}}}+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/y))\ng = sqrt(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$16 x^4$\n", - "Output Answer": [ - "$864$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(16*x**4)\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{y^2+1}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = atan(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(3 x^2+7\\right)-5 x-3$\n", - "Output Answer": [ - "$-6 x \\sec ^2\\left(3 x^2+7\\right)-5$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(3*x**2+7)-5*x-3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\frac{1}{\\sqrt{x y z}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{x y}{2 (x y z)^{3/2}},0,\\frac{1}{\\sqrt{1-y^2}}-\\frac{y z}{2 (x y z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = (1/(sqrt(x*y*z)))\nh = (1/(sqrt(x*y*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y^5$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = y**5\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-x)^3$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-3 (y-x)^2-\\frac{1}{\\sqrt{1-y^2}}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**3\ng = acos(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y^2}$, and $h(x,y,z) = x y^2$", - "Output Answer": [ - "$\\frac{2 y}{3 \\sqrt[3]{y^2}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y**2)\nh = x*y**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\frac{125 x^3}{27}-\\frac{243}{32768 x^5}$\n", - "Output Answer": [ - "$\\frac{15309}{17179869184}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(((125*x**3)/27)-(243/(32768*x**5)))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{9 x}{2}+\\frac{7}{2}}$\n", - "Output Answer": [ - "$-\\frac{81}{16 \\left(\\frac{9 x}{2}+\\frac{7}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((9*x)/2)+(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{y}{z^2}\\right)^{3/2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = (x+y)^2$", - "Output Answer": [ - "$-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(z**2))**(3/2)\ng = cos(y)\nh = (x+y)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^4\\right)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = x^4+y^5$", - "Output Answer": [ - "$\\frac{4 x^3}{\\sqrt{x^8+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x**4)\ng = log(z)\nh = x**4+y**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x+2} \\log (7 x-6)$\n", - "Output Answer": [ - "$e^{2 x+2} \\left(\\frac{7 (28 x-31)}{(6-7 x)^2}+4 \\log (7 x-6)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x+2)*log(7*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log \\left(4 x^4+9\\right)-\\tan \\left(8 x^4+5\\right)$\n", - "Output Answer": [ - "$16 x^3 \\left(\\frac{1}{-4 x^4-9}-2 \\sec ^2\\left(8 x^4+5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(4*x**4+9)-tan(8*x**4+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x-z^5}$", - "Output Answer": [ - "$\\frac{50 z^8}{\\left(x-z^5\\right)^3}+\\frac{20 z^3}{\\left(x-z^5\\right)^2}+\\frac{2}{\\left(x-z^5\\right)^3}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-z**5))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x^2 y\\right)$, $g(x,y,z) = x^2 z$, and $h(x,y,z) = x^2 y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x y}{1-x^4 y^2} & \\frac{x^2}{1-x^4 y^2} & 0 \\\\\n 2 x z & 0 & x^2 \\\\\n 2 x y & x^2 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x**2*y)\ng = x**2*z\nh = x**2*y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{y}+z^3\\right)$", - "Output Answer": [ - "$\\frac{2 x^2 \\left(\\frac{x}{y}+z^3\\right)}{y^4 \\left(1-\\left(\\frac{x}{y}+z^3\\right)^2\\right)^2}+\\frac{2 x}{y^3 \\left(1-\\left(\\frac{x}{y}+z^3\\right)^2\\right)}+\\frac{2 \\left(\\frac{x}{y}+z^3\\right)}{y^2 \\left(1-\\left(\\frac{x}{y}+z^3\\right)^2\\right)^2}+\\frac{18 z^4 \\left(\\frac{x}{y}+z^3\\right)}{\\left(1-\\left(\\frac{x}{y}+z^3\\right)^2\\right)^2}+\\frac{6 z}{1-\\left(\\frac{x}{y}+z^3\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh((x/y)+z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-5 x-8)^5$\n", - "Output Answer": [ - "$-500 (5 x+8)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-5*x-8)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(6-\\frac{22 x}{3}\\right)+\\log (6-6 x)$\n", - "Output Answer": [ - "$-\\frac{1}{(x-1)^2}-\\frac{121}{(9-11 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6-((22*x)/3))+log(6-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{y}{\\sqrt{1-x^2 y^2}}-\\sin (y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y)\ng = cos(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(x+y)\nh = sqrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{(z-y)^{3/2}}$", - "Output Answer": [ - "$\\frac{15}{2 (z-y)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z-y)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^5}{z^5}$, $g(x,y,z) = y^2$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\left\\{5 y^4,-\\frac{5 x^5}{z^6},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/(z**5))\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{22 x^5}{5}-\\frac{11}{5}}-e^{-2 x-\\frac{32}{5}}$\n", - "Output Answer": [ - "$44 e^{\\frac{11}{5} \\left(2 x^5-1\\right)} x^3 \\left(11 x^5+2\\right)-4 e^{-2 x-\\frac{32}{5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((22*x**5)/5)-(11/5))-math.e**(-2*x-(32/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\sqrt{x-y-z}$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{x-y-z}}-\\frac{1}{y-z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = sqrt(x-y-z)\nh = log(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x z^4\\right)$, $g(x,y,z) = \\sin (x-y)$, and $h(x,y,z) = \\tan ^{-1}\\left(x z^4\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z^4}{x^2 z^8+1}-4 x z^3 \\sin \\left(x z^4\\right),\\cos (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z**4)\ng = sin(x-y)\nh = sin(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}\\left(2 x^2+1\\right)-e^{5 x+2}$\n", - "Output Answer": [ - "$-\\frac{2 x}{\\sqrt{-x^2 \\left(x^2+1\\right)}}-5 e^{5 x+2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-asin(2*x**2+1)-math.e**(5*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$2 x-\\frac{\\pi }{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = acos(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+z)\ng = tanh(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = (x-z)^4$, and $h(x,y,z) = \\sqrt{y^2}$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*z)\ng = (x-z)**4\nh = sqrt(y**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$(x-5)^2 \\left(\\frac{1}{50}-\\frac{\\sin (5)}{2}\\right)+(x-5) \\left(\\cos (5)-\\frac{1}{5}\\right)-\\log (5)+\\sin (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{y^4}{x}\\right)$, $g(x,y,z) = \\left(y^4\\right)^{3/2}$, and $h(x,y,z) = \\frac{x^5}{y^{20} z^5}$", - "Output Answer": [ - "$-\\frac{5 x^5}{y^{20} z^6}+\\frac{y^4 \\sin \\left(\\frac{y^4}{x}\\right)}{x^2}+6 y^3 \\sqrt{y^4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((y**4)/x))\ng = (y**4)**(3/2)\nh = ((x**5)/(y**20*z**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cosh (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{x^2}{2}-x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cosh(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left\\{0,-\\text{sech}^2(x),-\\cos (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\tanh ^{-1}(y-z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\sinh (x)+\\frac{1}{1-(y-z)^2}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = atanh(y-z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(6 x^4-2\\right)^3+\\cos (4-6 x)$\n", - "Output Answer": [ - "$-36 \\left(\\cos (4-6 x)-24 \\left(33 x^{10}-14 x^6+x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (6*x**4-2)**3+cos(4-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = y z$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{-y,0,-\\frac{1}{y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(7 x-5)^4+\\log (4 x+1)$\n", - "Output Answer": [ - "$588 (5-7 x)^2-\\frac{16}{(4 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (7*x-5)**4+log(4*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^5 z^5$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left\\{-5 y^5 z^4,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**5*z**5\nh = y**5*z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\cos ^{-1}(x+z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z\ng = acos(x+z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x z$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{-x,-\\frac{1}{\\sqrt{1-x^2}},z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = x*z\nh = x*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{x+y}^2},\\frac{1}{z^2+1}-\\frac{1}{3 \\sqrt[3]{x+y}^2},y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\cosh (y+z)$, and $h(x,y,z) = \\sin (x-y-z)$", - "Output Answer": [ - "$\\{-\\cos (x-y-z)-\\sinh (y+z),-\\cos (x-y-z),-\\sin (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = cosh(y+z)\nh = cosh(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{3}{2 x^{5/2}},\\frac{1}{y \\left(\\frac{x^2}{y^2}+1\\right)}-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = atan(x/y)\nh = atan(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x+1} \\sqrt{6-7 x}$\n", - "Output Answer": [ - "$\\frac{e^{4 x+1} (41-56 x)}{2 \\sqrt{6-7 x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x+1)*sqrt(6-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\cos (x)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y)\nh = cbrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(7 x-3)^3}$\n", - "Output Answer": [ - "$\\frac{588}{(7 x-3)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x-3)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = sin(z)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(y^2\\right)$, $g(x,y,z) = \\frac{y^2}{x}$, and $h(x,y,z) = \\sin \\left(x+z^5\\right)$", - "Output Answer": [ - "$\\frac{2 y}{x}+5 z^4 \\cos \\left(x+z^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y**2)\ng = ((y**2)/x)\nh = sin(x+z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4 x-3} \\log (7 x)$\n", - "Output Answer": [ - "$\\frac{e^{4 x-3} \\left(16 x^2 \\log (7 x)+8 x-1\\right)}{x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4*x-3)*log(7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8 x+2)^5}-\\sqrt{-4 x-6}$\n", - "Output Answer": [ - "$\\frac{15}{(4 x+1)^7}+\\frac{4}{(-4 x-6)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8*x+2)**5))-sqrt(-4*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z$, and $h(x,y,z) = y^{12}$", - "Output Answer": [ - "$\\left\\{12 y^{11}-1,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y+z)$, $g(x,y,z) = -\\sin ^{-1}(x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n -\\frac{1}{\\sqrt{1-(x-y)^2}} & \\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y+z)\ng = -asin(x-y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos \\left(\\frac{10 x}{3}+\\frac{23}{3}\\right)}{5 x-1}$\n", - "Output Answer": [ - "$-\\frac{5 \\left(2 (5 x-1) \\sin \\left(\\frac{1}{3} (10 x+23)\\right)+3 \\cos \\left(\\frac{1}{3} (10 x+23)\\right)\\right)}{3 (1-5 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(((10*x)/3)+(23/3)))/(5*x-1)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$-x \\sin (x y)+y \\cos (x y)-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = cos(x*y)\nh = cos(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{x^3+y-z}$", - "Output Answer": [ - "$-\\frac{2 x^4}{\\left(x^3+y-z\\right) \\sqrt[3]{x^3+y-z}^2}+\\frac{2 x}{\\sqrt[3]{x^3+y-z}^2}-\\frac{4}{9 \\left(x^3+y-z\\right) \\sqrt[3]{x^3+y-z}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**3+y-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^3\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+5)^2 (-15 \\cos (5) \\cos (125)+75 \\sin (5) \\cos (125)+2813 \\sin (125) \\cos (5))+(x+5) (75 \\cos (5) \\cos (125)-\\sin (5) \\sin (125))-\\sin (125) \\cos (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**3)\ng = cos(x)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\sqrt{4 x+2}\\right)$\n", - "Output Answer": [ - "$-\\frac{2}{(2 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(sqrt(4*x+2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(7 x^5+7\\right)-\\tan \\left(8-8 x^3\\right)$\n", - "Output Answer": [ - "$-140 x^3 \\sin \\left(7 \\left(x^5+1\\right)\\right)-1225 x^8 \\cos \\left(7 \\left(x^5+1\\right)\\right)-48 x \\left(24 x^3 \\tan \\left(8-8 x^3\\right)-1\\right) \\sec ^2\\left(8-8 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7*x**5+7)-tan(8-8*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (y+z)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\text{sech}^2(y+z) & \\text{sech}^2(y+z) \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(y+z)\ng = y**(3/2)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{y^2 z}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{2}{y^3 z},-\\frac{1}{y^2 z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2*z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y-z)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z-x}}+\\sin (y-z),\\frac{y}{3 \\sqrt[3]{x y}^2}+\\sin (y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y-z)\ng = cbrt(x*y)\nh = cbrt(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^2-x$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\frac{x^4}{z^4}$", - "Output Answer": [ - "$-\\frac{4 x^4}{z^5}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**2-x\ng = sqrt(z)\nh = ((x**4)/(z**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x^4}-\\tan ^{-1}(4-3 x)$\n", - "Output Answer": [ - "$3 \\left(\\frac{1}{(4-3 x)^2+1}-8 e^{-6 x^4} x^3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x**4)-atan(4-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y z}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{y z \\left(\\frac{x^2}{y^2 z^2}+1\\right)},-\\frac{x}{y^2 z \\left(\\frac{x^2}{y^2 z^2}+1\\right)},-\\frac{x}{y z^2 \\left(\\frac{x^2}{y^2 z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x/(y*z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(z^5\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{\\frac{x z^5}{y}}$", - "Output Answer": [ - "$\\frac{5 x z^4}{3 y \\sqrt[3]{\\frac{x z^5}{y}}^2}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z**5)\ng = sqrt(y)\nh = cbrt((x*z**5)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x z}{y}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x},\\frac{y}{x^2}+\\frac{x}{2 y \\sqrt{\\frac{x z}{y}}},\\frac{x z}{2 y^2 \\sqrt{\\frac{x z}{y}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x*z)/y))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y^4}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$e^x+\\frac{4 y^3}{3 \\sqrt[3]{y^4}^2}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y**4)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = cbrt(y*z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(y)\nh = (x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = x^{12} y^8 z^4$\n", - "Output Answer": [ - "$\\left\\{12 x^{11} y^8 z^4,8 x^{12} y^7 z^4,4 x^{12} y^8 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**12*y**8*z**4\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n -\\frac{1}{2 (x+y)^{3/2}} & -\\frac{1}{2 (x+y)^{3/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((x/z))\ng = (1/(sqrt(x+y)))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x^2}$", - "Output Answer": [ - "$\\frac{1}{2^{2/3}}-\\frac{x-4}{12\\ 2^{2/3}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x**2)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x+9}+\\log (6 x-5)$\n", - "Output Answer": [ - "$-\\frac{36}{(5-6 x)^2}-\\frac{16}{(8 x+9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x+9)+log(6*x-5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (y z)$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = (z-x)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\text{sech}^2(y z) & y \\text{sech}^2(y z) \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n -2 (z-x) & 0 & 2 (z-x) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(y*z)\ng = log(x)\nh = (z-x)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)},0,-x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = atan(z/y)\nh = atan(z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+2}+\\cos ^{-1}\\left(\\sqrt{6-x}\\right)$\n", - "Output Answer": [ - "$e^{x+2}+\\frac{1}{2 \\sqrt{-((x-6) (x-5))}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+2)+acos(sqrt(6-x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^{16}$", - "Output Answer": [ - "$x-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**16\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin \\left(\\frac{y^4}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{y^4+z}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{1}{3 \\sqrt[3]{y^4+z}^2}+\\frac{4 y^3 \\cos \\left(\\frac{y^4}{z}\\right)}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sin(((y**4)/z))\nh = cbrt(y**4+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x+y^5-z^3$", - "Output Answer": [ - "$20 y^3-6 z$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y**5-z**3\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5+z}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos ^{-1}\\left(x^5\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{x^5+z}^2}+\\frac{5 x^4}{\\sqrt{1-x^{10}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5+z)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8 x^2+3\\right)+\\sqrt{4 x-1}$\n", - "Output Answer": [ - "$-\\frac{256 x^2}{\\left(8 x^2+3\\right)^2}+\\frac{16}{8 x^2+3}-\\frac{4}{(4 x-1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8*x**2+3)+sqrt(4*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^2}{x^2}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sinh ^{-1}\\left(y^2 z\\right)$", - "Output Answer": [ - "$-\\frac{2 z^2}{x^3}+\\frac{y^2}{\\sqrt{y^4 z^2+1}}+2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/(x**2))\ng = y**2\nh = asinh(y**2*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6 x-3}+\\cos ^{-1}(8 x+6)$\n", - "Output Answer": [ - "$\\frac{3}{\\sqrt{6 x-3}}-\\frac{8}{\\sqrt{1-4 (4 x+3)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6*x-3)+acos(8*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x+z^5\\right)^2$\n", - "Output Answer": [ - "$\\left\\{2 \\left(x+z^5\\right),0,10 z^4 \\left(x+z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z**5)**2\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = e^{\\frac{z^2}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & -\\frac{z^2 e^{\\frac{z^2}{y}}}{y^2} & \\frac{2 z e^{\\frac{z^2}{y}}}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = cbrt(x)\nh = math.e**((z**2)/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,-\\frac{x}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{z^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (y/z)\nh = (y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin ^{-1}(y z)$", - "Output Answer": [ - "$\\left\\{\\frac{z}{\\sqrt{1-y^2 z^2}},\\frac{1}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{x z}}+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = sin(y)\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = (x+z)^{3/2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$y e^{x y}+\\cos (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = (x+z)**(3/2)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos ^{-1}(x+y)$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$e^x-\\frac{1}{\\sqrt{1-(x+y)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = acos(x+y)\nh = math.e**(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(-\\frac{7 x}{2}-\\frac{1}{2}\\right)+8$\n", - "Output Answer": [ - "$\\frac{7}{\\sqrt{-49 x^2-14 x+3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(-((7*x)/2)-(1/2))+8, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (6-8 x)}{(5 x+7)^2}$\n", - "Output Answer": [ - "$-\\frac{(40 x+5 \\sin (12-16 x)+56) \\sec ^2(6-8 x)}{(5 x+7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(6-8*x))/((5*x+7)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(6-x^5\\right)+\\tan \\left(8-5 x^2\\right)$\n", - "Output Answer": [ - "$-\\frac{5 x^4}{\\left(x^5-6\\right)^2+1}-10 x \\sec ^2\\left(8-5 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(6-x**5)+tan(8-5*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = x^3 z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 3 x^2 z^3 & 0 & 3 x^3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((y/x))\ng = (1/(y**2))\nh = x**3*z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = cos(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^4\\right)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = x^{12} z^3$", - "Output Answer": [ - "$3 x^{12} z^2+4 x^3 \\cos \\left(x^4\\right)+\\text{sech}^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4)\ng = tanh(y)\nh = x**12*z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sin((y/z))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-2 x)$ on the interval $x = 1$ to $x = 1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-2*x)\na = 1\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y+z)^2}} & -\\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = y\nh = acos(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tanh \\left(\\frac{x y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x \\text{sech}^2\\left(\\frac{x y}{z}\\right)}{z},-\\frac{y \\text{sech}^2\\left(\\frac{x y}{z}\\right)}{z},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(x^3\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 \\sinh \\left(x^3\\right) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x**3)\ng = cos(y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+z^4}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x+z^4}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 z^3}{\\left(x+z^4\\right)^2}-\\frac{1}{2 \\sqrt{x+z^4}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+z**4))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x-y\nh = cos((x/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x y^5 z$", - "Output Answer": [ - "$20 x y^3 z$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y**5*z\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$x^4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(x**4)\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^5$", - "Output Answer": [ - "$462 (x-4)^3+1584 (x-4)^2+2816 (x-4)+2048$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**5\nseries = f.subs(x, g).series(x, 4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3 (x+y)^3$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$3 z^3 (x+y)^2+e^{x+z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3*(x+y)**3\ng = y\nh = math.e**(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\sec ^2(y)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = tan(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x-y-z)$, $g(x,y,z) = \\tan (y-z)$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\sec ^2(x-y-z)+\\sec ^2(y-z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x-y-z)\ng = tan(y-z)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\log (z-x)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n -\\frac{1}{z-x} & 0 & \\frac{1}{z-x} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = log(z-x)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x y}{z}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{y \\cos \\left(\\frac{x y}{z}\\right)}{z},\\frac{x \\cos \\left(\\frac{x y}{z}\\right)}{z},-\\frac{x y \\cos \\left(\\frac{x y}{z}\\right)}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((x*y)/z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-4 x^2}-\\frac{1}{(9 x-5)^4}$\n", - "Output Answer": [ - "$\\frac{36}{(9 x-5)^5}-8 e^{1-4 x^2} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-4*x**2)-(1/((9*x-5)**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**(3/2)\ng = cbrt(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{(x z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 1 & 1 & 0 \\\\\n -\\frac{3 z}{2 (x z)^{5/2}} & 0 & -\\frac{3 x}{2 (x z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = x+y\nh = (1/((x*z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(8 x-3)-\\cos (6-8 x)$\n", - "Output Answer": [ - "$64 \\cos (6-8 x)-\\frac{64 (8 x-3)}{\\left(1-(3-8 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(8*x-3)-cos(6-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6)-\\log (3 x+2)$\n", - "Output Answer": [ - "$-\\frac{3}{3 x+2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6)-log(3*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5-8 x}+\\log (5-x)$\n", - "Output Answer": [ - "$\\frac{1}{x-5}-\\frac{4}{\\sqrt{5-8 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5-8*x)+log(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = acos(y)\nh = tan(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{z}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (z/y)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = (1/(y**(3/2)))\nh = sin(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(5 x+\\frac{16}{3}\\right)+\\tan (9 x+2)$\n", - "Output Answer": [ - "$9 \\sec ^2(9 x+2)-5 \\sin \\left(5 x+\\frac{16}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5*x+(16/3))+tan(9*x+2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x-y-z$", - "Output Answer": [ - "$\\{-1,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = y+z$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n 0 & 1 & 1 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z)\ng = y+z\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (4 x+5)-\\cos ^{-1}\\left(3 x^2+8\\right)$\n", - "Output Answer": [ - "$\\frac{6 \\sqrt{3} \\left(x^4-7\\right)}{\\left(-3 x^4-16 x^2-21\\right)^{3/2}}-16 \\sin (4 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(4*x+5)-acos(3*x**2+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y} & e^{x+y} & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y)\ng = math.e**y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x+y^4}{z}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{x+y^4}{z}\\right)}{z},\\frac{4 y^3 \\sec ^2\\left(\\frac{x+y^4}{z}\\right)}{z},-\\frac{\\left(x+y^4\\right) \\sec ^2\\left(\\frac{x+y^4}{z}\\right)}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((x+y**4)/z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{x-y^4+z}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\left(x-y^4+z\\right)^{3/2}},\\frac{2 y^3}{\\left(x-y^4+z\\right)^{3/2}},-\\frac{1}{2 \\left(x-y^4+z\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x-y**4+z)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(7 x+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$49 \\sin \\left(7 x+\\frac{17}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7*x+(17/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z (x+y)}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{2 \\sqrt{z (x+y)}} & \\frac{z}{2 \\sqrt{z (x+y)}} & \\frac{x+y}{2 \\sqrt{z (x+y)}} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{\\sin \\left(\\frac{y}{z}\\right)}{z} & \\frac{y \\sin \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z*(x+y))\ng = sqrt(y)\nh = cos((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$\\frac{1}{x}+4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**4\nh = log(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh ^{-1}(y)$", - "Output Answer": [ - "$\\frac{2 y}{\\left(1-y^2\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\frac{1}{\\sqrt{z-y}}$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (z-y)^{3/2}},-\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (1/(sqrt(z-y)))\nh = (1/(sqrt(z-y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x y+z^5\\right)^3$", - "Output Answer": [ - "$6 x^2 \\left(x y+z^5\\right)+6 y^2 \\left(x y+z^5\\right)+150 z^8 \\left(x y+z^5\\right)+60 z^3 \\left(x y+z^5\\right)^2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y+z**5)**3\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(-6 x^2-5\\right)^5}-e^{-x-1}$\n", - "Output Answer": [ - "$\\frac{60 x}{\\left(6 x^2+5\\right)^6}+e^{-x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((1/((-6*x**2-5)**5))-math.e**(-x-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x^5$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 5 x^4 & 0 & 0 \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = x**5\nh = sin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x}{z}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{2 z \\sqrt{\\frac{x}{z}}}+\\frac{1}{y}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/z))\ng = log(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-z^5}$, $g(x,y,z) = y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y-z^5}} & -\\frac{5 z^4}{2 \\sqrt{y-z^5}} \\\\\n 0 & 1 & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-z**5)\ng = y\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$3 x-\\cos ^{-1}(5 x-7)-6$\n", - "Output Answer": [ - "$\\frac{25 (5 x-7)}{\\left(1-(7-5 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 3*x-acos(5*x-7)-6\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^3\\right)$ and $g(x) = $\\sqrt{x^3}$", - "Output Answer": [ - "$\\frac{1}{128} (x-4)^3+\\frac{3}{32} (x-4)^2+\\frac{15 (x-4)}{4}+8+6 \\log (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**3)\ng = sqrt(x**3)\nseries = f.subs(x, g).series(x, 4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^5 (x+y)^5$", - "Output Answer": [ - "$20 z^3 (x+y)^5+40 z^5 (x+y)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5*(x+y)**5\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{x^5+y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{5 x^4}{2 \\sqrt{x^5+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(x**5+y)\nh = sqrt(x**5+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{y}{z^4}$, and $h(x,y,z) = \\cos \\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{4 y}{z^5},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (y/(z**4))\nh = (y/(z**4))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z^2$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & 2 z \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z**2\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\sqrt{5} \\sqrt{x}$\n", - "Output Answer": [ - "$\\frac{\\sqrt{5}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt(5)*sqrt(x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$4 x^3+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^5$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 5 z^4 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**5\ng = y\nh = sqrt(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cosh (x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$(x+1)^2 \\left(-3 \\sinh (1)-\\frac{7 \\cosh (1)}{2}\\right)+(x+1) (\\sinh (1)+3 \\cosh (1))-\\cosh (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cosh(x)\ng = x**3\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^2 z\\right)^{3/2}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x^2}{z}\\right)$, and $h(x,y,z) = \\sin \\left(\\frac{y^4}{x^2}\\right)$", - "Output Answer": [ - "$3 x z \\sqrt{x^2 z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**2*z)**(3/2)\ng = acos((x**2)/z)\nh = sin(((y**4)/(x**2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (8-8 x)$\n", - "Output Answer": [ - "$-128 \\tan (8-8 x) \\sec ^2(8-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(8-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4-z$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y^4}-z}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & -1 \\\\\n \\frac{1}{3 y^4 \\sqrt[3]{\\frac{x}{y^4}-z}^2} & -\\frac{4 x}{3 y^5 \\sqrt[3]{\\frac{x}{y^4}-z}^2} & -\\frac{1}{3 \\sqrt[3]{\\frac{x}{y^4}-z}^2} \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4-z\ng = cbrt((x/(y**4))-z)\nh = (z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (x/z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh \\left(x^4 z^2\\right)$", - "Output Answer": [ - "$4 x^8 z^2 \\sinh \\left(x^4 z^2\\right)+16 x^6 z^4 \\sinh \\left(x^4 z^2\\right)+2 x^4 \\cosh \\left(x^4 z^2\\right)+12 x^2 z^2 \\cosh \\left(x^4 z^2\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x**4*z**2)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\frac{1}{y^2 z^2}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{\\frac{2}{y^2 z^3}+1,0,-\\sin (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = (1/(y**2*z**2))\nh = (1/(y**2*z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y z}\\right)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y z \\sqrt{1-\\frac{x^2}{y^2 z^2}}} & -\\frac{x}{y^2 z \\sqrt{1-\\frac{x^2}{y^2 z^2}}} & -\\frac{x}{y z^2 \\sqrt{1-\\frac{x^2}{y^2 z^2}}} \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x/(y*z))\ng = (1/(y**2))\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n y & x & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x*y\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^2-z}$, $g(x,y,z) = e^{x^2 z}$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y)-x^2 e^{x^2 z},-\\frac{1}{2 \\sqrt{x^2-z}},2 x z e^{x^2 z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2-z)\ng = math.e**(x**2*z)\nh = math.e**(x**2*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$\\left(1-\\frac{1}{4 \\sqrt{2}}\\right) (x-1)^2+\\left(2+\\frac{1}{\\sqrt{2}}\\right) (x-1)+1+\\sinh ^{-1}(1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = asinh(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = z-y\nh = asin(y/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(5 x-2)^3+1$\n", - "Output Answer": [ - "$15 (2-5 x)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((5*x-2)**3+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\cos (x)-\\sin (y)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\tan \\left(z^4\\right)$, and $h(x,y,z) = \\sin \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n 0 & 0 & 4 z^3 \\sec ^2\\left(z^4\\right) \\\\\n 0 & 0 & 4 z^3 \\cos \\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+y)\ng = tan(z**4)\nh = sin(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n 0 & -\\frac{2}{(y+z)^3} & -\\frac{2}{(y+z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*y)\ng = sqrt(y*z)\nh = (1/((y+z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/(y**2))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\tan \\left(\\frac{7 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{343}{81} \\left(1+4 \\tan ^2(7)+3 \\tan ^4(7)\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(tan(((7*x)/3)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = (x-y-z)^2$", - "Output Answer": [ - "$-2 (x-y-z)-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(z)\nh = (x-y-z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y^2 z}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{y z}{\\left(y^2 z\\right)^{3/2}} & -\\frac{y^2}{2 \\left(y^2 z\\right)^{3/2}} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(y**2*z)))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*z)\ng = cbrt(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7-6 x}-e^{-2 x^2}$\n", - "Output Answer": [ - "$4 e^{-2 x^2} x-6 e^{7-6 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7-6*x)-math.e**(-2*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z-x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-x},\\frac{1}{y-x}+e^{z-x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z-x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+y)^4$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 (x+y)^3 & 4 (x+y)^3 & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+y)**4\ng = (x/z)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (2 x+2)+\\log (6 x+6)$\n", - "Output Answer": [ - "$-\\frac{2}{(x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x+2)+log(6*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+3 y^2-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**3\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x z^3\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{y^2+1}+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*z**3)\ng = atan(y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-2 x-9)^4}$\n", - "Output Answer": [ - "$\\frac{80}{(2 x+9)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-2*x-9)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{-1,x \\cos (x z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(4-5 x^5\\right)+\\sqrt{8-6 x}$\n", - "Output Answer": [ - "$-25 x^4 \\cos \\left(4-5 x^5\\right)-\\frac{3}{\\sqrt{8-6 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4-5*x**5)+sqrt(8-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y+z),0,\\frac{1}{2 y^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2-\\frac{z}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((15*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{13}{2}-\\frac{x}{2}\\right)+\\cos ^{-1}\\left(2 x-\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{x-13}-\\frac{4}{\\sqrt{-16 x^2+24 x-5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log((13/2)-(x/2))+acos(2*x-(3/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x+5}$\n", - "Output Answer": [ - "$-\\frac{25}{4 (5 x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\cos (y-z) & \\cos (y-z) \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = -sin(y-z)\nh = tan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(7-9 x^4\\right)$\n", - "Output Answer": [ - "$108 x^2 \\left(\\sin \\left(7-9 x^4\\right)-12 x^4 \\cos \\left(7-9 x^4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7-9*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh \\left(x-y-z^3\\right)$", - "Output Answer": [ - "$9 z^4 \\sinh \\left(x-y-z^3\\right)+2 \\sinh \\left(x-y-z^3\\right)-6 z \\cosh \\left(x-y-z^3\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x-y-z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x y}{z}\\right)$, $g(x,y,z) = \\tanh (y z)$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left\\{-y \\text{sech}^2(y z),-\\frac{x y}{z^2 \\sqrt{1-\\frac{x^2 y^2}{z^2}}}-\\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2},-\\frac{x}{z \\sqrt{1-\\frac{x^2 y^2}{z^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x*y)/z)\ng = tanh(y*z)\nh = tanh(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\sec ^2(x)+\\cos (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(y)\nh = math.e**(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x-z)\ng = tan(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-4) (\\sin (4)+4 \\cos (4))+4 \\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = sin(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(y-z)^2}$, $g(x,y,z) = \\frac{1}{(x-z)^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y-z)**2))\ng = (1/((x-z)**(3/2)))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y^4}\\right)$", - "Output Answer": [ - "$\\frac{16 z^3}{y^{14} \\left(1-\\frac{z^2}{y^8}\\right)^{3/2}}+\\frac{20 z}{y^6 \\sqrt{1-\\frac{z^2}{y^8}}}+\\frac{z}{y^{12} \\left(1-\\frac{z^2}{y^8}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/(y**4))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{(x-z)^2}$", - "Output Answer": [ - "$\\frac{2}{(x-z)^3}+\\frac{1}{2 \\sqrt{x}}+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cbrt(y)\nh = (1/((x-z)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{40 x^4}{\\sqrt{1-\\left(5-8 x^5\\right)^2}}$\n", - "Output Answer": [ - "$\\sin ^{-1}\\left(5-8 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((40*x**4)/(sqrt(1-(5-8*x**5)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sinh \\left(x^4\\right)$", - "Output Answer": [ - "$\\frac{x^2}{720}+\\frac{1}{2 x^2}+\\frac{1}{x^3}+\\frac{1}{x^4}+\\frac{x}{120}+\\frac{1}{6 x}+\\frac{1}{24}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = sinh(x**4)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^{10}}$, $g(x,y,z) = \\sin \\left(y^5\\right)$, and $h(x,y,z) = \\frac{1}{z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{10}{z^{11}} \\\\\n 0 & 5 y^4 \\cos \\left(y^5\\right) & 0 \\\\\n 0 & 0 & -\\frac{5}{z^6} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**10))\ng = sin(y**5)\nh = (1/(z**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y)))\ng = sin(x+y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$e^{4 x/5}$\n", - "Output Answer": [ - "$\\frac{8}{25 e^{8/5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(4*x/5))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = (1/(sqrt(y)))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh \\left(\\frac{z}{x^3}\\right)$, $g(x,y,z) = x^3+y^3$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x^3 z}{y^3}\\right)$", - "Output Answer": [ - "$\\frac{x^3}{y^3 \\left(\\frac{x^6 z^2}{y^6}+1\\right)}-\\frac{3 z \\text{sech}^2\\left(\\frac{z}{x^3}\\right)}{x^4}+3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(z/(x**3))\ng = x**3+y**3\nh = atan((x**3*z)/(y**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}+3 z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acosh(y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6-9 x}-\\log (6)$\n", - "Output Answer": [ - "$-\\frac{9}{2 \\sqrt{6-9 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6-9*x)-log(6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(2-8 x^2\\right)$\n", - "Output Answer": [ - "$16 \\left(1-32 x^2 \\tan \\left(2-8 x^2\\right)\\right) \\sec ^2\\left(2-8 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2-8*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z^2}-\\frac{x}{y^2},-\\frac{1}{y},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (1/z)\nh = (1/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{z^5}{y}}$", - "Output Answer": [ - "$\\frac{z^{10} e^{\\frac{z^5}{y}}}{y^4}+\\frac{25 z^8 e^{\\frac{z^5}{y}}}{y^2}+\\frac{2 z^5 e^{\\frac{z^5}{y}}}{y^3}+\\frac{20 z^3 e^{\\frac{z^5}{y}}}{y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((z**5)/y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{x \\sec ^2\\left(\\frac{x}{y}+z\\right)}{y^2}-\\sin (x-y)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = tan((x/y)+z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{y^5}{z}\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{15 y^{10}}{4 z^4 \\left(\\frac{y^5}{z}\\right)^{7/2}}+\\frac{375 y^8}{4 z^2 \\left(\\frac{y^5}{z}\\right)^{7/2}}-\\frac{3 y^5}{z^3 \\left(\\frac{y^5}{z}\\right)^{5/2}}-\\frac{30 y^3}{z \\left(\\frac{y^5}{z}\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((y**5)/z)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 1 & 1 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(z)\ng = y+z\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(8-6 x)$\n", - "Output Answer": [ - "$-\\frac{36 (8-6 x)}{\\left(1-4 (4-3 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(8-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x-y^5\\right)$, $g(x,y,z) = \\cos \\left(x-y^5+z\\right)$, and $h(x,y,z) = \\log \\left(x-y^5-z\\right)$", - "Output Answer": [ - "$\\left\\{\\sin \\left(x-y^5+z\\right)-\\frac{5 y^4}{x-y^5-z},-\\frac{1}{x-y^5-z},\\frac{5 y^4}{\\left(x-y^5\\right)^2+1}-\\sin \\left(x-y^5+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x-y**5)\ng = cos(x-y**5+z)\nh = cos(x-y**5+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = math.e**y\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\sqrt[3]{\\frac{y^2}{x}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2},-\\frac{y^2}{3 x^2 \\sqrt[3]{\\frac{y^2}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = cbrt((y**2)/x)\nh = cbrt((y**2)/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,-\\cos (y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\frac{4}{81 x^2}$\n", - "Output Answer": [ - "$\\frac{4}{27}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S((4/(81*x**2)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh \\left(y^5 z\\right)$", - "Output Answer": [ - "$25 y^8 z^2 \\sinh \\left(y^5 z\\right)+y^{10} \\sinh \\left(y^5 z\\right)+20 y^3 z \\cosh \\left(y^5 z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(y**5*z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{1}{(x-y+z)^{3/2}}$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2 (x-y+z)^{5/2}}-1,\\frac{3}{2 (x-y+z)^{5/2}}-\\frac{1}{y-z},-\\frac{1}{y-z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x-z)^2}$, $g(x,y,z) = z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-1,\\frac{2}{(x-z)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x-z)**2))\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{y^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = (1/y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 512 x^{9/2}$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 512*x**(9/2)\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x+y+z}$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left\\{e^{x+y}-\\frac{1}{3 \\sqrt[3]{x+y+z}^2},-e^{x+y},\\frac{1}{3 \\sqrt[3]{x+y+z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = cbrt(x+y+z)\nh = cbrt(x+y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan ^{-1}(x+z)$, and $h(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x+z)^2+1},-\\frac{1}{x},\\frac{1}{(x+z)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = atan(x+z)\nh = atan(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x+y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x-z)$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x-z)\ng = sin((y/z))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x-4}+\\log (6 x+5)$\n", - "Output Answer": [ - "$-\\frac{36}{(6 x+5)^2}-\\frac{25}{4 (5 x-4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x-4)+log(6*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = \\sqrt[3]{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 0 & -\\frac{1}{3 \\sqrt[3]{z-y}^2} & \\frac{1}{3 \\sqrt[3]{z-y}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = cos(x*y)\nh = cbrt(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\cos (x-z)+\\cos (x)-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(y**(3/2)))\nh = -sin(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-12 x^3 \\cos \\left(3 \\left(x^4+2\\right)\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(3 \\left(x^4+2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -12*x**3*cos(3*(x**4+2))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y-x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin (x-y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(y-x)^2} & -\\frac{1}{(y-x)^2} & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n \\cos (x-y+z) & -\\cos (x-y+z) & \\cos (x-y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y-x))\ng = (1/(y**(3/2)))\nh = sin(x-y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{45 x^4}{\\left(1-9 x^5\\right)^2+1}$\n", - "Output Answer": [ - "$\\tan ^{-1}\\left(1-9 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((45*x**4)/((1-9*x**5)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$-\\frac{y}{\\left(1-y^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y+z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y+z)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+\\frac{1}{3 \\sqrt[3]{y+z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y-z\nh = cbrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-z^2}},e^z,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = asin(z)\nh = asin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}-z^5\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3}+\\frac{5 z^4}{\\sqrt{1-\\left(\\frac{x}{y}-z^5\\right)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y\nh = acos((x/y)-z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = cos(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{x-3} \\sin (6 x+7)$\n", - "Output Answer": [ - "$e^{x-3} (12 \\cos (6 x+7)-35 \\sin (6 x+7))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x-3)*sin(6*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{5}{y}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3\ng = log(y**5)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = \\sinh \\left(x^3 z\\right)$", - "Output Answer": [ - "$\\left\\{0,-3 x^2 z \\cosh \\left(x^3 z\\right)-\\sin (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = log(y**5)\nh = log(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(8-2 x^2\\right)-\\tan ^{-1}(x+6)$\n", - "Output Answer": [ - "$4 x \\sec ^2\\left(8-2 x^2\\right)-\\frac{1}{(x+6)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(8-2*x**2)-atan(x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = -\\sin ^{-1}(y-z)$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y+z}^2}-\\frac{1}{\\sqrt{1-(y-z)^2}},0,-x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = -asin(y-z)\nh = -asin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-14 x \\sin \\left(7 x^2+4\\right)$\n", - "Output Answer": [ - "$\\cos \\left(7 x^2+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -14*x*sin(7*x**2+4)\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^3\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-5) (-75 \\sin (125)-\\cos (5))-\\sin (5)+\\cos (125)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**3)\ng = sin(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{(x-y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{17}{2}-6 x^5\\right)$\n", - "Output Answer": [ - "$120 x^3 \\sin \\left(\\frac{17}{2}-6 x^5\\right)-900 x^8 \\cos \\left(\\frac{17}{2}-6 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((17/2)-6*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(x-y^2-z^4\\right)^{3/2}$, $g(x,y,z) = \\sin \\left(x-y^2\\right)$, and $h(x,y,z) = \\tan \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3}{2} \\sqrt{x-y^2-z^4} & -3 y \\sqrt{x-y^2-z^4} & -6 z^3 \\sqrt{x-y^2-z^4} \\\\\n \\cos \\left(x-y^2\\right) & -2 y \\cos \\left(x-y^2\\right) & 0 \\\\\n 0 & 0 & 4 z^3 \\sec ^2\\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x-y**2-z**4)**(3/2)\ng = sin(x-y**2)\nh = tan(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-2} (-2 x-4)^2$\n", - "Output Answer": [ - "$8 e^{4 x-2} \\left(2 x^2+9 x+10\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-2)*(-2*x-4)**2, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y z^4\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan \\left(z^4\\right)$", - "Output Answer": [ - "$4 z^3 \\sec ^2\\left(z^4\\right)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y*z**4)\ng = cos(y)\nh = tan(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan ^{-1}(x y)$, and $h(x,y,z) = \\sqrt[3]{z^3}$", - "Output Answer": [ - "$\\frac{x}{x^2 y^2+1}+2 x+\\frac{z^2}{\\sqrt[3]{z^3}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = atan(x*y)\nh = cbrt(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 1, 5)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x z)$, $g(x,y,z) = x z$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-x,\\frac{x}{1-x^2 z^2},z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x*z)\ng = x*z\nh = x*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*z)\ng = math.e**y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\sin (x)+e^y-\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**y\nh = log((x/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z-x}}$, $g(x,y,z) = x+y^3$, and $h(x,y,z) = \\frac{y^3}{z}$", - "Output Answer": [ - "$\\frac{1}{2 (z-x)^{3/2}}-\\frac{y^3}{z^2}+3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z-x)))\ng = x+y**3\nh = ((y**3)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & e^{y+z} & e^{y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y)\ng = sin(y)\nh = math.e**(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8-6 x}-e^{\\frac{15 x}{2}-1}$\n", - "Output Answer": [ - "$36 e^{8-6 x}-\\frac{225}{4} e^{\\frac{15 x}{2}-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8-6*x)-math.e**(((15*x)/2)-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log (z (x-y))$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{x-y},-\\frac{1}{x-y},\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z*(x-y))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = z\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{x}{y^2}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/z))\ng = (x/y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-5 x-5} \\sin (\\cos (7 x+4))$\n", - "Output Answer": [ - "$-e^{-5 (x+1)} (7 \\sin (7 x+4) \\cos (\\cos (7 x+4))+5 \\sin (\\cos (7 x+4)))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-5*x-5)*sin(cos(7*x+4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(2 x+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$4 \\sin \\left(2 x+\\frac{11}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(2*x+(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = e^{x^2}$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-2) \\left(e^4 \\left(-1-\\cot ^2(2)\\right)+4 e^4 \\cot (2)\\right)+e^4 \\cot (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**2)\ng = tan(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(9 x^2+4\\right)-(-2 x-3)^5$\n", - "Output Answer": [ - "$-324 x^2 \\sin \\left(9 x^2+4\\right)+18 \\cos \\left(9 x^2+4\\right)+80 (2 x+3)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(9*x**2+4)-(-2*x-3)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (6-9 x)}{\\sqrt{6 x-7}}$\n", - "Output Answer": [ - "$\\frac{3 (6 x-7)+(6-9 x) \\log (6-9 x)}{(3 x-2) (6 x-7)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(6-9*x))/(sqrt(6*x-7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y-x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{3 \\sqrt[3]{y-x}^2}+\\frac{1}{z^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y-x)\ng = y\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\cos ^{-1}(x+y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y}{z^2},-\\frac{1}{\\sqrt{1-(x+y)^2}}-\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = acos(x+y)\nh = acos(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt[3]{x y}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{3 \\sqrt[3]{x y}^2},-\\frac{y}{3 \\sqrt[3]{x y}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\cos (y-z)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(y-z)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{(x-y)^5}{z^5}$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$\\frac{5 (x-y)^4}{z^5}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x-y)**5)/(z**5))\ng = y-x\nh = sqrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y+z)\ng = y**3\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\tan ^{-1}(x+z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/x)\ng = atan(x+z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\tan ^{-1}(x z)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = atan(x*z)\nh = sin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\cos ^{-1}(-3)}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(acos(-3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7 x+\\frac{9}{2}}$\n", - "Output Answer": [ - "$-\\frac{49}{4 \\left(7 x+\\frac{9}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7*x+(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-\\frac{3}{2 z^{5/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = x+y\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\log (-4 x) \\log (-3 x)$\n", - "Output Answer": [ - "$\\frac{5}{1458}+\\frac{-2 \\log (2)-\\log (3)}{1215}-\\frac{2 \\log (3)}{1215}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(-4*x)*log(-3*x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{x+y+z^5}$", - "Output Answer": [ - "$-\\frac{50 z^8}{9 \\left(x+y+z^5\\right) \\sqrt[3]{x+y+z^5}^2}+\\frac{20 z^3}{3 \\sqrt[3]{x+y+z^5}^2}-\\frac{4}{9 \\left(x+y+z^5\\right) \\sqrt[3]{x+y+z^5}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y+z**5)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$4 x^3-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = tan(x+z)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\tan ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n 0 & \\frac{5 y^4}{y^{10}+1} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z)\ng = atan(y**5)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sqrt{\\frac{7}{2}} \\sqrt{x}$\n", - "Output Answer": [ - "$-\\frac{i \\sqrt{7}}{32}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt((7/2))*sqrt(x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\{1,1,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (5-8 x)}{\\log \\left(6 x^2+7\\right)}$\n", - "Output Answer": [ - "$\\frac{4 \\left(2 \\log \\left(6 x^2+7\\right) \\sin (5-8 x)-\\frac{3 x \\cos (5-8 x)}{6 x^2+7}\\right)}{\\log ^2\\left(6 x^2+7\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(5-8*x))/(log(6*x**2+7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (2-3 x) \\tan (7-2 x)$\n", - "Output Answer": [ - "$6 \\sec ^2(2-3 x) \\left(3 \\tan (2-3 x) \\tan (7-2 x)+2 \\sec ^2(7-2 x)\\right)+8 \\tan (2-3 x) \\tan (7-2 x) \\sec ^2(7-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(2-3*x)*tan(7-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\sec ^2(x)+e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^4 z^2}$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$4 y^3 \\cos \\left(y^4\\right)+2 z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**4*z**2)\ng = sin(y**4)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y-z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y-z) & \\sin (y-z) \\\\\n 0 & e^y & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y-z)\ng = math.e**y\nh = (x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = \\left(\\frac{x}{z}\\right)^{3/2}$", - "Output Answer": [ - "$-\\frac{3 x \\sqrt{\\frac{x}{z}}}{2 z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = cbrt(x+z)\nh = (x/z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x},\\frac{y}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (4 x+6)}{e^4}$\n", - "Output Answer": [ - "$\\frac{4 \\sec ^2(4 x+6)}{e^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((tan(4*x+6))/(math.e**4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{z}{2 \\sqrt{x z}} & 0 & \\frac{x}{2 \\sqrt{x z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*y)\ng = y\nh = sqrt(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sinh (z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sinh(z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3) \\cos (x+1)$\n", - "Output Answer": [ - "$-\\log (3) \\sin (x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3)*cos(x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = y\nh = log((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-z}$, $g(x,y,z) = y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(x-z)^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-z))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = e^{y-x}$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x},\\frac{y}{x^2},-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = math.e**(y-x)\nh = math.e**(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = x+z\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{y^2+1}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = atan(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sin ^{-1}(x y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n \\frac{y}{\\sqrt{1-(x y-z)^2}} & \\frac{x}{\\sqrt{1-(x y-z)^2}} & -\\frac{1}{\\sqrt{1-(x y-z)^2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = asin(x*y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5-x)+\\sin (7-9 x)$\n", - "Output Answer": [ - "$\\frac{1}{x-5}-9 \\cos (7-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5-x)+sin(7-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}-z\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{x-y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\sec ^2\\left(\\frac{x}{y}-z\\right)-\\frac{\\sec ^2\\left(\\frac{x-y}{z}\\right)}{z},-\\frac{\\sec ^2\\left(\\frac{x-y}{z}\\right)}{z},\\frac{\\sec ^2\\left(\\frac{x}{y}-z\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan((x/y)-z)\nh = tan((x/y)-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+y)^2}$, $g(x,y,z) = (x y)^{3/2}$, and $h(x,y,z) = y^2 z^4$", - "Output Answer": [ - "$\\left\\{2 y z^4,0,\\frac{3}{2} y \\sqrt{x y}+\\frac{2}{(x+y)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y)**2))\ng = (x*y)**(3/2)\nh = (x*y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = y\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-5)^2 \\left(1250-\\tan ^3(5)-\\tan (5)\\right)+(x-5) \\left(3124-\\tan ^2(5)\\right)+3125-\\tan (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = tan(x)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x^4}$", - "Output Answer": [ - "$\\begin{cases}\n x^{4/3}+\\sqrt[3]{x} & x>0 \\\\\n (-x)^{4/3}-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x**4)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x$", - "Output Answer": [ - "$(x+5)^2 \\left(-\\tan ^3(5)-\\tan (5)\\right)+(x+5) \\left(2+\\tan ^2(5)\\right)-5-\\tan (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y-z)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$-\\frac{x}{z^2}+\\frac{1}{\\sqrt{1-(y-z)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(y-z)\nh = (x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = -\\tanh \\left(y^5-z\\right)$", - "Output Answer": [ - "$-20 y^3 \\text{sech}^2\\left(y^5-z\\right)+50 y^8 \\tanh \\left(y^5-z\\right) \\text{sech}^2\\left(y^5-z\\right)+2 \\tanh \\left(y^5-z\\right) \\text{sech}^2\\left(y^5-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tanh(y**5-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 z^3$, $g(x,y,z) = \\sqrt[3]{z-y}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$3 x^2 z^3-\\frac{1}{3 \\sqrt[3]{z-y}^2}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*z**3\ng = cbrt(z-y)\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-9 x^2-6\\right)-\\sin \\left(2-x^2\\right)$\n", - "Output Answer": [ - "$2 \\left(\\frac{-9 x^2+2 \\left(3 x^2+2\\right)^2 x^2 \\sin \\left(2-x^2\\right)+6}{\\left(3 x^2+2\\right)^2}+\\cos \\left(2-x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-9*x**2-6)-sin(2-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\left(z^3-y\\right)^3$", - "Output Answer": [ - "$\\left\\{-3 \\left(z^3-y\\right)^2,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{x}{2}+3}-\\log \\left(\\frac{15}{2}-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{5-x}+\\frac{1}{4 \\sqrt{\\frac{x}{2}+3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((x/2)+3)-log((15/2)-((3*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{17 x}{2}+\\sin \\left(\\frac{17 x}{2}+\\frac{11}{2}\\right)+7$\n", - "Output Answer": [ - "$-17 \\sin ^2\\left(\\frac{1}{4} (17 x+11)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((17*x)/2)+sin(((17*x)/2)+(11/2))+7, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}}-\\frac{1}{x+z},\\frac{x}{y^2 \\sqrt{1-\\left(\\frac{x}{y}-z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x/y)-z)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 1 & 3 y^2 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x+y**3\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin \\left(3 x^5+8\\right)}{\\left(-8 x^2-4\\right)^5}$\n", - "Output Answer": [ - "$-\\frac{5 x \\left(3 \\left(2 x^5+x^3\\right) \\cos \\left(3 x^5+8\\right)-4 \\sin \\left(3 x^5+8\\right)\\right)}{1024 \\left(2 x^2+1\\right)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(3*x**5+8))/((-8*x**2-4)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{x}{z^5}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^5}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5 x}{z^6 \\left(1-\\frac{x^2}{z^{10}}\\right)},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x/(z**5))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(6-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{81}{2} \\tan \\left(6-\\frac{9 x}{2}\\right) \\sec ^2\\left(6-\\frac{9 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(6-((9*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 y}{2 (x y)^{5/2}} & -\\frac{3 x}{2 (x y)^{5/2}} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x*y)**(3/2)))\ng = sqrt(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\frac{7}{2}-4 x\\right)-\\sin \\left(\\frac{11}{2}-\\frac{15 x^3}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{45}{2} x^2 \\cos \\left(\\frac{1}{2} \\left(11-15 x^3\\right)\\right)-4 \\sec ^2\\left(\\frac{7}{2}-4 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan((7/2)-4*x)-sin((11/2)-((15*x**3)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-4)-e^{-8 x-3}$\n", - "Output Answer": [ - "$-64 e^{-8 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = acos(-4)-math.e**(-8*x-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^5$, $g(x,y,z) = x$, and $h(x,y,z) = z^{25}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 5 z^4 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & 25 z^{24} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**5\ng = x\nh = z**25\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = log(z)\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (7 x+5)+\\sin (2-8 x)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+5)^2}-64 \\sin (2-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(7*x+5)+sin(2-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(6 x+6)-e^{-7 x^2-8}$\n", - "Output Answer": [ - "$e^{-7 x^2-8} \\left(14-196 x^2\\right)-\\frac{432 (x+1)}{\\left(36 x^2+72 x+37\\right)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = atan(6*x+6)-math.e**(-7*x**2-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^2$, $g(x,y,z) = (x-y)^3$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$2 (x-y)-3 (x-y)^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**2\ng = (x-y)**3\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = (x+y)^5$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$5 (x+y)^4-\\sin (x)-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (x+y)**5\nh = x-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (7-7 x)$\n", - "Output Answer": [ - "$-49 \\sin (7-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = x^5$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n 5 x^4 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((x/z))\ng = x**5\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+2}-8 x^3$\n", - "Output Answer": [ - "$e^{x+2}-24 x^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+2)-8*x**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = (1/x)\nh = (1/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = -\\tan (y-z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y+z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n 0 & -\\frac{1}{2 (y+z)^{3/2}} & -\\frac{1}{2 (y+z)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = -tan(y-z)\nh = (1/(sqrt(y+z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6) \\tan ^{-1}(1-7 x)$\n", - "Output Answer": [ - "$-\\frac{7 \\cos (6)}{(1-7 x)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6)*atan(1-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^8 (x-y)^2$, $g(x,y,z) = \\left(z^4-y\\right)^5$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\left\\{-20 z^3 \\left(z^4-y\\right)^4,8 z^7 (x-y)^2,2 z^8 (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**8*(x-y)**2\ng = (z**4-y)**5\nh = (z**4-y)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6-2 x)-e^{-x-2}$\n", - "Output Answer": [ - "$e^{-x-2}+2 \\sin (6-2 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(6-2*x)-math.e**(-x-2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-6 x^2-4} \\tan (2 x+1)$\n", - "Output Answer": [ - "$-\\frac{2 \\left(\\left(6 x^2+4\\right) \\sec ^2(2 x+1)+3 x \\tan (2 x+1)\\right)}{\\sqrt{-6 x^2-4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-6*x**2-4)*tan(2*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(x+z)^2+1},y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+z)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{21 x}{5}+6\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+10)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((21*x)/5)+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$8 \\cos (6-8 x)-\\frac{\\sqrt{5}}{2 \\sqrt{x}}$\n", - "Output Answer": [ - "$-\\sqrt{5} \\sqrt{x}-\\sin (6) \\cos (8 x)+\\cos (6) \\sin (8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 8*cos(6-8*x)-((sqrt(5))/(2*sqrt(x)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\frac{15 x}{2}-6}-\\tan \\left(3-6 x^3\\right)$\n", - "Output Answer": [ - "$18 x^2 \\sec ^2\\left(3-6 x^3\\right)-\\frac{15}{2} e^{-\\frac{15 x}{2}-6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-((15*x)/2)-6)-tan(3-6*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = x^{25}$, and $h(x,y,z) = \\cos \\left(x^5-y\\right)$", - "Output Answer": [ - "$\\left\\{\\sin \\left(x^5-y\\right),5 x^4 \\sin \\left(x^5-y\\right),25 x^{24}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5)\ng = x**25\nh = x**25\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3-8 x}+e^{4 x}$\n", - "Output Answer": [ - "$64 e^{3-8 x}+16 e^{4 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3-8*x)+math.e**(4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-5 x^4-8}$\n", - "Output Answer": [ - "$\\frac{10 x^2 \\left(5 x^4+24\\right)}{\\left(-5 x^4-8\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-5*x**4-8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\sinh (x)-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = acos(y)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x^5}-\\sin (6 x)$\n", - "Output Answer": [ - "$-6 \\left(\\cos (6 x)-5 e^{6 x^5} x^4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x**5)-sin(6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$-\\frac{x}{y^2}-\\sin (x)+y \\sec ^2(y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (x/y)\nh = tan(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x-z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x-z)\ng = cos(y)\nh = sin((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(1-6 x)^5 \\log (7 x)}$\n", - "Output Answer": [ - "$\\frac{6 x+30 x \\log (7 x)-1}{(1-6 x)^6 x \\log ^2(7 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((1-6*x)**5*log(7*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x/y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x e^{x/y}}{y^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z}$, $g(x,y,z) = x^3 y^3$, and $h(x,y,z) = \\cos ^{-1}(x-y)$", - "Output Answer": [ - "$3 x^3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/z)\ng = x**3*y**3\nh = acos(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (9-7 x)-e^{-3 x-4}$\n", - "Output Answer": [ - "$3 e^{-3 x-4}+7 \\sin (9-7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(9-7*x)-math.e**(-3*x-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^3 y^6$", - "Output Answer": [ - "$30 x^3 y^4+6 x y^6$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y**6\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = cbrt(y)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{9 x+1} \\cos \\left(3-8 x^3\\right)$\n", - "Output Answer": [ - "$3 e^{9 x+1} \\left(8 x^2 \\sin \\left(3-8 x^3\\right)+3 \\cos \\left(3-8 x^3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(9*x+1)*cos(3-8*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x-3} \\tan ^{-1}(4-7 x)$\n", - "Output Answer": [ - "$e^{-4 x-3} \\left(-\\frac{7}{(4-7 x)^2+1}-4 \\tan ^{-1}(4-7 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x-3)*atan(4-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x}+\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan(z)\nh = tan((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = (x-z)^4$", - "Output Answer": [ - "$\\left\\{0,-4 (x-z)^3,-\\sin (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(y^5\\right)^{3/2}$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y**5)**(3/2)\ng = cbrt(x/z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\{0,-\\cos (x),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{9 x}{2}+9\\right)-\\sin (8 x+5)$\n", - "Output Answer": [ - "$64 \\sin (8 x+5)-\\frac{81}{4} \\cos \\left(\\frac{9 (x+2)}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((9*x)/2)+9)-sin(8*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\frac{x^3}{6}+2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x^2\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{2}{x},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**2)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\sqrt[3]{x^3+z}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^y & 0 \\\\\n \\frac{x^2}{\\sqrt[3]{x^3+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x^3+z}^2} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**y\ng = cbrt(x**3+z)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\sin (z),\\frac{y}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = sqrt(x*y)\nh = sqrt(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$3 x+\\cos (6-5 x)-7$\n", - "Output Answer": [ - "$5 \\sin (6-5 x)+3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(3*x+cos(6-5*x)-7, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (3 x+8)-\\sin (5 x+3)$\n", - "Output Answer": [ - "$-3 \\cos (3 x+8)-5 \\cos (5 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(3*x+8)-sin(5*x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x y)$, $g(x,y,z) = \\frac{y^2}{z^2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$y \\text{sech}^2(x y)+\\frac{2 y}{z^2}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*y)\ng = ((y**2)/(z**2))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{z-y}$, and $h(x,y,z) = \\frac{1}{y z}$", - "Output Answer": [ - "$e^x-\\frac{1}{y z^2}-e^{z-y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = math.e**(z-y)\nh = (1/(y*z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = z^4-x^2$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left\\{-4 z^3,-2 x,-2 x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = z**4-x**2\nh = z**4-x**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 y \\sqrt{\\frac{x}{y}}}+\\sin (x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y)\ng = sqrt((x/y))\nh = sqrt((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = y$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 1 & 0 \\\\\n 1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = y\nh = x+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x+y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-8 x-\\frac{11}{2}\\right)^3+\\tan ^{-1}\\left(\\frac{9 x}{2}+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{18}{81 x^2+198 x+125}-6 (16 x+11)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-8*x-(11/2))**3+atan(((9*x)/2)+(11/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $e^{x^2}$", - "Output Answer": [ - "$\\frac{227 (x-2)^2}{18\\ 2^{2/3} e^4}-\\frac{23 (x-2)}{3\\ 2^{2/3} e^4}+\\frac{\\sqrt[3]{2}}{e^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = math.e**(x**2)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-5) \\left(1-\\sin (5)+\\tan ^2(5)\\right)+\\cos (5)+\\tan (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^5}{x-y}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{z^5}{(x-y)^2},\\frac{z^5}{(x-y)^2},\\frac{5 z^4}{x-y}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**5)/(x-y))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x-y^2-z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\cos \\left(x-y^2-z\\right),-2 y \\cos \\left(x-y^2-z\\right),-\\cos \\left(x-y^2-z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y**2-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\frac{1}{x+z}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = sqrt(y)\nh = log(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = log((x/z))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = (y+z)^4$", - "Output Answer": [ - "$\\left\\{4 (y+z)^3,0,\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$3 x^2+\\frac{1}{2 \\sqrt{y}}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sqrt(y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^3 \\log (7 x+6)$\n", - "Output Answer": [ - "$-\\frac{49 e^3}{(7 x+6)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**3*log(7*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan (5 x)$ on the interval $x = 5$ to $x = 6$\n", - "Output Answer": [ - "$\\int_5^6 \\sqrt{25 \\sec ^4(5 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(5*x)\na = 5\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z-y)$, $g(x,y,z) = z-x$, and $h(x,y,z) = (x-z)^2$", - "Output Answer": [ - "$-2 (x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z-y)\ng = z-x\nh = (x-z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-6 x^2} \\sin (5-4 x)$\n", - "Output Answer": [ - "$-4 e^{8-6 x^2} (3 x \\sin (5-4 x)+\\cos (5-4 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-6*x**2)*sin(5-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(y)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y^3}}$, $g(x,y,z) = \\sqrt[3]{z-y^3}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z-y^3}^2},0,\\frac{3 x}{2 y^4 \\sqrt{\\frac{x}{y^3}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/(y**3)))\ng = cbrt(z-y**3)\nh = cbrt(z-y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(y z)$", - "Output Answer": [ - "$\\sec ^2(x+z)+\\frac{y}{\\sqrt{1-y^2 z^2}}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = sqrt(y)\nh = asin(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x^2-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 2 x e^{x^2-z} & 0 & -e^{x^2-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y\nh = math.e**(x**2-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -1024 x^5$ on the interval $x = 0$ to $x = 10$\n", - "Output Answer": [ - "$10 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{8};\\frac{9}{8};-2621440000000000\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -1024*x**5\na = 0\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{x^5}+\\sqrt{8 x+8}$\n", - "Output Answer": [ - "$\\frac{30}{x^7}-\\frac{16}{(8 x+8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(x**5))+sqrt(8*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n \\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = acosh(y)\nh = tan((x/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{17}{3}-\\frac{13 x}{3}\\right)+\\sin \\left(\\frac{1}{3}-\\frac{2 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{(34-26 x) \\cos \\left(\\frac{1}{3} (1-2 x)\\right)+39}{39 x-51}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log((17/3)-((13*x)/3))+sin((1/3)-((2*x)/3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = z^3$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = z**3\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$(x-2)^2+4 (x-2)+4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = (x+y-z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 5 (x+y-z)^4 & 5 (x+y-z)^4 & -5 (x+y-z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = cbrt(x*y)\nh = (x+y-z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$e^x-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(y**(3/2)))\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$3-8 x$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 3-8*x\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(3 x^5+4\\right)+\\sin (3 x+2)$\n", - "Output Answer": [ - "$-3 \\left(20 x^3 \\sin \\left(3 x^5+4\\right)+75 x^8 \\cos \\left(3 x^5+4\\right)+3 \\sin (3 x+2)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3*x**5+4)+sin(3*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\cos (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = asinh(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin \\left(y^2\\right)$, and $h(x,y,z) = x y^2$", - "Output Answer": [ - "$\\left\\{2 x y,-y^2,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sin(y**2)\nh = sin(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tanh (x+z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\text{sech}^2(x+z)+5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y**5\nh = tanh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin (y-z)$\n", - "Output Answer": [ - "$\\{0,\\cos (y-z),-\\cos (y-z)\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y-z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(x+8)$\n", - "Output Answer": [ - "$-\\frac{x+8}{\\left(1-(x+8)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{1}{z^2} \\\\\n 0 & 3 y^2 & 0 \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/z)\ng = y**3\nh = log(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5 x+6)-\\sqrt{-2 x^5-4}$\n", - "Output Answer": [ - "$\\frac{5 x^4}{\\sqrt{-2 x^5-4}}+\\frac{5}{5 x+6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x+6)-sqrt(-2*x**5-4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x}{z}\\right)^{3/2}}$, $g(x,y,z) = \\frac{1}{(x-z)^2}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{(x-z)^3},\\frac{3 x}{2 z^2 \\left(\\frac{x}{z}\\right)^{5/2}},-\\frac{2}{(x-z)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x/z)**(3/2)))\ng = (1/((x-z)**2))\nh = (1/((x-z)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{z (x-y)}$", - "Output Answer": [ - "$\\frac{x-y}{2 \\sqrt{z (x-y)}}-\\sin (x)+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(y)\nh = sqrt(z*(x-y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = x+z^2$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-2 z \\sin \\left(z^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = x+z**2\nh = cos(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cbrt(y/x)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x^4}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{4 y}{x^5 \\sqrt{1-\\frac{y^2}{x^8}}},-\\frac{1}{x^4 \\sqrt{1-\\frac{y^2}{x^8}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y/(x**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(6 x^5+4\\right) (-\\cos (4 x+8))$\n", - "Output Answer": [ - "$4 \\sin (4 (x+2)) \\sin \\left(6 x^5+4\\right)-30 x^4 \\cos (4 (x+2)) \\cos \\left(6 x^5+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x**5+4)*(-cos(4*x+8)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = (x y-z)^5$\n", - "Output Answer": [ - "$\\left\\{5 y (x y-z)^4,5 x (x y-z)^4,-5 (x y-z)^4\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y-z)**5\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\sec ^2(x+y)-\\frac{z}{y^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = (z/y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = tan(y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(2 x^3-6\\right)^3}+\\frac{1}{(8 x+5)^5}$\n", - "Output Answer": [ - "$\\frac{27 x^4}{2 \\left(x^3-3\\right)^5}-\\frac{9 x}{4 \\left(x^3-3\\right)^4}+\\frac{1920}{(8 x+5)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((2*x**3-6)**3))+(1/((8*x+5)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\sec ^2(x)+4 z^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$y+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = tan(y)\nh = tan(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 1 & 1 & 0 \\\\\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = x+y\nh = sin(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},\\frac{1}{x},-y \\sin (x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(x*y)\nh = cos(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\{0,-\\cos (x),-\\sin (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(x+y)\nh = cos(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = acos(x)\nseries = f.subs(x, g).series(x, -5, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\tan ^{-1}(x+y)$", - "Output Answer": [ - "$y \\sec ^2(x y)+\\frac{1}{3 \\sqrt[3]{y+z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = cbrt(y+z)\nh = atan(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = x^3 z^3$, and $h(x,y,z) = (x+z)^2$", - "Output Answer": [ - "$\\left\\{-3 x^3 z^2,x-2 (x+z),3 x^2 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = x**3*z**3\nh = x**3*z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(2 x^2+2\\right)+\\sqrt{6 x+4}$\n", - "Output Answer": [ - "$4 \\left(8 x^2 \\tan \\left(2 \\left(x^2+1\\right)\\right)+1\\right) \\sec ^2\\left(2 \\left(x^2+1\\right)\\right)-\\frac{9}{2 \\sqrt{2} (3 x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(2*x**2+2)+sqrt(6*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (7 x+3) \\sin \\left(4-x^2\\right)$\n", - "Output Answer": [ - "$28 x \\cos (7 x+3) \\cos \\left(4-x^2\\right)+\\sin (7 x+3) \\left(\\left(4 x^2+49\\right) \\sin \\left(4-x^2\\right)+2 \\cos \\left(4-x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7*x+3)*sin(4-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$x \\sec ^2(x y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = tan(x*y)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\tanh \\left(x^2\\right)$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = tanh(x**2)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{y^2 z^2}{x^8}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{8 y^2 z^2}{x^9},\\frac{2 y z^2}{x^8},\\frac{2 y^2 z}{x^8}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**2*z**2)/(x**8))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y-z)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y-z} & -\\frac{1}{y-z} \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y-z)\ng = y**(3/2)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{10 x}{\\sqrt{1-25 \\left(x^2-1\\right)^2}}-\\frac{5 \\sqrt{6} x^3}{\\sqrt{3-5 x^4}}$\n", - "Output Answer": [ - "$\\sqrt{\\frac{3}{2}} \\sqrt{3-5 x^4}-\\sin ^{-1}\\left(5-5 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((10*x)/(sqrt(1-25*(x**2-1)**2)))-((5*sqrt(6)*x**3)/(sqrt(3-5*x**4)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = acos(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cos(y)\nh = cbrt(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cbrt(y)\nh = log(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y)\ng = sin(y)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x-y)$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x-y) & -\\sec ^2(x-y) & 0 \\\\\n 0 & z e^{y z} & y e^{y z} \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x-y)\ng = math.e**(y*z)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-8 x-2}+\\cos ^{-1}(-6 x-7)$\n", - "Output Answer": [ - "$-\\frac{36 (-6 x-7)}{\\left(1-(-6 x-7)^2\\right)^{3/2}}-\\frac{16}{(-8 x-2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-8*x-2)+acos(-6*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$9 x^2$\n", - "Output Answer": [ - "$3 x^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 9*x**2\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-8 x-3} \\log \\left(6 x^2-8\\right)$\n", - "Output Answer": [ - "$\\frac{4 \\left(\\frac{3 x (8 x+3)}{8-6 x^2}-\\log \\left(6 x^2-8\\right)\\right)}{\\sqrt{-8 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-8*x-3)*log(6*x**2-8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = z^2$, and $h(x,y,z) = z^6$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & 0 & 2 z \\\\\n 0 & 0 & 6 z^5 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y)\ng = z**2\nh = z**6\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^5+y\\right)^4$, $g(x,y,z) = \\frac{1}{\\sqrt{z}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z^{3/2}},0,-4 \\left(x^5+y\\right)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**5+y)**4\ng = (1/(sqrt(z)))\nh = (1/(sqrt(z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(z^3\\right)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n 1 & 1 & 0 \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z**3)\ng = x+y\nh = cos(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan ^{-1}(x-y)$, $g(x,y,z) = x+z$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x-y)^2+1} & \\frac{1}{(x-y)^2+1} & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -atan(x-y)\ng = x+z\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(2-6 x^2\\right)-\\tan ^{-1}\\left(1-2 x^2\\right)$\n", - "Output Answer": [ - "$4 \\left(\\frac{8 \\left(1-2 x^2\\right) x^2}{\\left(\\left(1-2 x^2\\right)^2+1\\right)^2}+\\frac{1}{\\left(1-2 x^2\\right)^2+1}+3 \\sin \\left(2-6 x^2\\right)-36 x^2 \\cos \\left(2-6 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2-6*x**2)-atan(1-2*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cosh ^{-1}(y)$", - "Output Answer": [ - "$y e^{x y}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = sqrt(y)\nh = acosh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x-z)$, $g(x,y,z) = (x+z)^2$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x-z) & 0 & -\\cos (x-z) \\\\\n 2 (x+z) & 0 & 2 (x+z) \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x-z)\ng = (x+z)**2\nh = cos(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4-y}{z}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{4 x^3}{z}+5 y^4+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4-y)/z)\ng = y**5\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log (6 x-1)+i \\pi +\\log (3)$\n", - "Output Answer": [ - "$\\frac{36}{(1-6 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(6*x-1)+1j*pi+log(3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(\\sin (7 x+5))$\n", - "Output Answer": [ - "$-\\frac{98 \\sin (7 x+5) (\\cos (2 (7 x+5))+5)}{(\\cos (2 (7 x+5))-3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(sin(7*x+5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(y+z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{\\left(y+z^3\\right)^2+1} & \\frac{3 z^2}{\\left(y+z^3\\right)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = atan(y+z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = (x+z)^4$", - "Output Answer": [ - "$\\left\\{0,-4 (x+z)^3,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n -1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = tanh(y)\nh = y-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\frac{17 x^2}{3}-\\frac{19}{3}}-\\frac{1}{(-6 x-3)^2}$\n", - "Output Answer": [ - "$\\frac{4}{9 (2 x+1)^3}-\\frac{34}{3} e^{-\\frac{17 x^2}{3}-\\frac{19}{3}} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-((17*x**2)/3)-(19/3))-(1/((-6*x-3)**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = cbrt(z)\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{9 x^2}{5}+\\frac{23}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{18}{25} \\left(5 \\sin \\left(\\frac{1}{5} \\left(9 x^2+23\\right)\\right)+18 x^2 \\cos \\left(\\frac{1}{5} \\left(9 x^2+23\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((9*x**2)/5)+(23/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-7 x-1}+\\log (-\\sin (5-5 x))$\n", - "Output Answer": [ - "$-7 e^{-7 x-1}-5 \\cot (5-5 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-7*x-1)+log(-sin(5-5*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-(y-z)^2}} & -\\frac{1}{\\sqrt{1-(y-z)^2}} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y-z)\ng = tan(y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\cos ^{-1}(y z)$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & -\\frac{z}{\\sqrt{1-y^2 z^2}} & -\\frac{y}{\\sqrt{1-y^2 z^2}} \\\\\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = acos(y*z)\nh = tan(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^3\\right)$, $g(x,y,z) = \\sqrt[3]{\\frac{x^3}{y}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x^2}{y \\sqrt[3]{\\frac{x^3}{y}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**3)\ng = cbrt((x**3)/y)\nh = cbrt((x**3)/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x+1}-\\sqrt{8-2 x}$\n", - "Output Answer": [ - "$2 e^{2 x+1}+\\frac{1}{\\sqrt{8-2 x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x+1)-sqrt(8-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos ^{-1}(-2 x)$ on the interval $x = 2$ to $x = 9$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{5} \\left(E\\left(\\sin ^{-1}(18)|\\frac{1}{5}\\right)-E\\left(\\sin ^{-1}(4)|\\frac{1}{5}\\right)\\right)+i \\sqrt{11}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-2*x)\na = 2\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\frac{x^2}{y^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2 x^2}{y^3},-\\frac{2 x}{y^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\frac{5 x^4}{2 \\sqrt{x^5}}+e^y+\\sinh (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5)\ng = math.e**y\nh = cosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-e^{y+z},0,-1\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = math.e**(y+z)\nh = math.e**(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x+y)^2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{2}{(x+y)^3} & -\\frac{2}{(x+y)^3} & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((x+y)**2))\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^4\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-2)^2 \\left(-\\frac{1}{2}-\\frac{\\sin (2)}{2}\\right)+(x-2) (2+\\cos (2))+4 \\log (2)+\\sin (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**4)\ng = sin(x)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (4-6 x)-\\tan ^{-1}(5 x+1)$\n", - "Output Answer": [ - "$6 \\cos (4-6 x)-\\frac{5}{(5 x+1)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(4-6*x)-atan(5*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (6 x-3) \\cos (4 x+6)$\n", - "Output Answer": [ - "$\\frac{2 \\cos (4 x+6)}{2 x-1}-4 \\log (6 x-3) \\sin (4 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(6*x-3)*cos(4*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{x}{2}-1}$\n", - "Output Answer": [ - "$\\frac{1}{2} e^{\\frac{x}{2}-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((x/2)-1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\cos (y-z)$", - "Output Answer": [ - "$\\left\\{-\\sin (y-z),0,\\frac{1}{x+y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(x+y)\nh = log(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = (z-y)^3$", - "Output Answer": [ - "$3 (z-y)^2+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = (y/z)\nh = (z-y)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^{y^2-x}$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n -e^{y^2-x} & 2 y e^{y^2-x} & 0 \\\\\n 0 & 0 & \\frac{2 z^3}{\\sqrt{z^4}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**(y**2-x)\nh = sqrt(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{7 x}{2}+6\\right)-\\cos \\left(5 x^2+7\\right)$\n", - "Output Answer": [ - "$10 x \\sin \\left(5 x^2+7\\right)+\\frac{7}{2} \\cos \\left(\\frac{7 x}{2}+6\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(((7*x)/2)+6)-cos(5*x**2+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x y z)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$y z \\cosh (x y z)+\\text{sech}^2(y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x*y*z)\ng = tanh(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$y+\\frac{3 \\sqrt{y}}{2}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = y**(3/2)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(x^5-6\\right)$\n", - "Output Answer": [ - "$-\\frac{5 x^3 \\left(x^{10}+18 x^5-140\\right)}{\\left(-x^{10}+12 x^5-35\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(x**5-6)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x^5+7}-e^{4-4 x}$\n", - "Output Answer": [ - "$\\frac{5 x^4}{2 \\sqrt{x^5+7}}+4 e^{4-4 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x**5+7)-math.e**(4-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}},-\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\frac{1}{(x-y)^{3/2}}$, and $h(x,y,z) = (x-y)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+z} & 0 & e^{x+z} \\\\\n -\\frac{3}{2 (x-y)^{5/2}} & \\frac{3}{2 (x-y)^{5/2}} & 0 \\\\\n 5 (x-y)^4 & -5 (x-y)^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+z)\ng = (1/((x-y)**(3/2)))\nh = (x-y)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$6 \\sqrt{e^{6 x^2-\\frac{13}{2}}} x$\n", - "Output Answer": [ - "$\\sqrt{e^{6 x^2-\\frac{13}{2}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 6*sqrt(math.e**(6*x**2-(13/2)))*x\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = z^5-x$", - "Output Answer": [ - "$5 z^4+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = z**5-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{y}{x^3}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin \\left(y-z^3\\right)$", - "Output Answer": [ - "$\\left\\{\\cos \\left(y-z^3\\right),0,-\\frac{e^{\\frac{y}{x^3}}}{x^3}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y/(x**3))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{z}}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x^2 z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 z \\sqrt{\\frac{x}{z}}} & 0 & -\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}} \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 2 x z^2 & 0 & 2 x^2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/z))\ng = (1/y)\nh = x**2*z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\tan ^{-1}(y z)$, and $h(x,y,z) = \\cos ^{-1}(x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n 0 & \\frac{z}{y^2 z^2+1} & \\frac{y}{y^2 z^2+1} \\\\\n -\\frac{y}{\\sqrt{1-x^2 y^2}} & -\\frac{x}{\\sqrt{1-x^2 y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+z)\ng = atan(y*z)\nh = acos(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x^3}{y}+z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x^2}{y \\sqrt{1-\\left(\\frac{x^3}{y}+z\\right)^2}},-\\frac{x^3}{y^2 \\sqrt{1-\\left(\\frac{x^3}{y}+z\\right)^2}},\\frac{1}{\\sqrt{1-\\left(\\frac{x^3}{y}+z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(((x**3)/y)+z)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**(3/2)))\ng = y\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x-z^4}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x-z^4}},-\\cos (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(6-\\frac{15 x}{2}\\right)-\\tan ^{-1}\\left(1-\\frac{17 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{34}{289 x^2-68 x+8}+\\frac{5}{5 x-4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(6-((15*x)/2))-atan(1-((17*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z (x+y))$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},\\frac{x+y}{z^2 (x+y)^2+1},-\\frac{z}{z^2 (x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z*(x+y))\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos \\left(\\frac{9 x}{2}\\right)$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((9*x)/2))\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & -1 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n -\\frac{1}{2 \\sqrt{y-x}} & \\frac{1}{2 \\sqrt{y-x}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-z\ng = log(z)\nh = sqrt(y-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^5\\right)$, $g(x,y,z) = z^5$, and $h(x,y,z) = \\tan ^{-1}\\left(y^4+z\\right)$", - "Output Answer": [ - "$\\frac{5 x^4}{\\sqrt{1-x^{10}}}+\\frac{1}{\\left(y^4+z\\right)^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**5)\ng = z**5\nh = atan(y**4+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan \\left(\\frac{x+y}{z}\\right)$, and $h(x,y,z) = \\tan ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n \\frac{\\sec ^2\\left(\\frac{x+y}{z}\\right)}{z} & \\frac{\\sec ^2\\left(\\frac{x+y}{z}\\right)}{z} & -\\frac{(x+y) \\sec ^2\\left(\\frac{x+y}{z}\\right)}{z^2} \\\\\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = tan(((x+y)/z))\nh = atan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^3 z^3$, and $h(x,y,z) = x$", - "Output Answer": [ - "$3 y^2 z^3-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**3*z**3\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(\\frac{y^3}{x}\\right)$", - "Output Answer": [ - "$\\frac{1}{x^2}-\\frac{3}{y^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((y**3)/x))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/x)\ng = log(y)\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**y\nh = sin(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = (z-y)^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-3 (z-y)^2+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (z-y)**3\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x+y^3\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(x+y^3\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3 y^2}{x+y^3}-\\frac{1}{\\sqrt{1-\\left(x+y^3\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y**3)\ng = acos(x+y**3)\nh = acos(x+y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\left(x^4+z\\right)^2$", - "Output Answer": [ - "$\\left\\{0,-8 x^3 \\left(x^4+z\\right),\\sin (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\cos (x-z)+e^x+\\cos (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(y)\nh = -sin(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{36 x}{5}+\\frac{2}{5}\\right)-e^{-\\frac{37 x}{5}-\\frac{44}{5}}$\n", - "Output Answer": [ - "$\\frac{1}{25} \\left(-1369 e^{-\\frac{37 x}{5}-\\frac{44}{5}}-1296 \\sin \\left(\\frac{2}{5} (18 x+1)\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(((36*x)/5)+(2/5))-math.e**(-((37*x)/5)-(44/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $x^4$", - "Output Answer": [ - "$-165 (x+5)^2+575 (x+5)-750$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = x**4\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$x^2-e^{2 x}$\n", - "Output Answer": [ - "$-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(x**2-math.e**(2*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}},0,-\\frac{1}{3 \\sqrt[3]{y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3 y$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 y & x^3 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3*y\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x y^2 z}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x^2 y^2 z},-\\frac{2}{x y^3 z},-\\frac{1}{x y^2 z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x*y**2*z))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z-y^4$", - "Output Answer": [ - "$-12 y^2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-y**4\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (6 x+7) \\tan (8 x+4)$\n", - "Output Answer": [ - "$6 \\tan (8 x+4) \\sec ^2(6 x+7)+8 \\tan (6 x+7) \\sec ^2(8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(6*x+7)*tan(8*x+4), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$1-\\frac{x^2}{6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^3-x}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\sqrt{y^3-x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y**3-x)\nh = sqrt(y**3-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(y*z)\nh = cos(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (8 x+6)-\\sin (3-7 x)$\n", - "Output Answer": [ - "$49 \\sin (3-7 x)+128 \\tan (8 x+6) \\sec ^2(8 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8*x+6)-sin(3-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x-z)$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z^2},-\\sinh (x-z)-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x-z)\ng = (1/z)\nh = (1/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4-\\frac{9 x^2}{2}\\right)+\\log \\left(\\frac{13 x}{2}-\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$9 \\sin \\left(4-\\frac{9 x^2}{2}\\right)-81 x^2 \\cos \\left(4-\\frac{9 x^2}{2}\\right)-\\frac{169}{(5-13 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-((9*x**2)/2))+log(((13*x)/2)-(5/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x^4 z^4$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 \\sqrt{y z}}-4 x^4 z^3,0,4 x^3 z^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x**4*z**4\nh = x**4*z**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(y^4\\right)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\cos ^{-1}(z-x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -4 y^3 \\sin \\left(y^4\\right) & 0 \\\\\n e^x & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-(z-x)^2}} & 0 & -\\frac{1}{\\sqrt{1-(z-x)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y**4)\ng = math.e**x\nh = acos(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z \\sqrt{\\frac{y}{z}}},0,y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$12 e^{3 x^4+5} x^3$\n", - "Output Answer": [ - "$e^{3 x^4+5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 12*math.e**(3*x**4+5)*x**3\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{y-x}^2} & \\frac{1}{3 \\sqrt[3]{y-x}^2} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = cbrt(y-x)\nh = sin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (3 x)$ on the interval $x = 2$ to $x = 9$\n", - "Output Answer": [ - "$-\\sqrt{5}+\\sqrt{82}+\\tanh ^{-1}\\left(\\sqrt{5}\\right)-\\tanh ^{-1}\\left(\\sqrt{82}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x)\na = 2\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-x)^2$, $g(x,y,z) = \\log (y-z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z},0,-2 (y-x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**2\ng = log(y-z)\nh = log(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^3-x}$, $g(x,y,z) = \\sqrt[3]{y^3}$, and $h(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{1}{3 \\sqrt[3]{y^3-x}^2}+\\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2}+\\frac{y^2}{\\sqrt[3]{y^3}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**3-x)\ng = cbrt(y**3)\nh = cos((x/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$2 x \\cos \\left(x^2\\right)+\\frac{1}{3 \\sqrt[3]{y}^2}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2)\ng = cbrt(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = -\\sin ^{-1}(y-z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-(y-z)^2}},-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = -asin(y-z)\nh = -asin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (3-x)}{\\sqrt{7 x+7}}$\n", - "Output Answer": [ - "$-\\frac{(4 x+\\sin (6-2 x)+4) \\sec ^2(3-x)}{4 \\sqrt{7} (x+1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(3-x))/(sqrt(7*x+7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n \\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}} & -\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = asin(x/y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2 z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3 z^2} & 0 & -\\frac{2}{x^2 z^3} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2*z**2))\ng = y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x-7}-\\tan (5-4 x)$\n", - "Output Answer": [ - "$\\frac{7}{2 \\sqrt{7 x-7}}+4 \\sec ^2(5-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x-7)-tan(5-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (4-7 x)$\n", - "Output Answer": [ - "$-49 \\cos (4-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}(x+z)$", - "Output Answer": [ - "$-\\frac{2 (x+z)}{\\left(1-(x+z)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(y z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{0,z^5 \\cos \\left(y z^5\\right),5 y z^4 \\cos \\left(y z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y*z**5)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\cos (x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = z**(3/2)\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$4 y^3-\\sin (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**4\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$4 x^3+5 y^4+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y**5\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{x y}{z}\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n -1 & 0 & 1 \\\\\n -\\frac{3 y}{2 z \\left(\\frac{x y}{z}\\right)^{5/2}} & -\\frac{3 x}{2 z \\left(\\frac{x y}{z}\\right)^{5/2}} & \\frac{3 x y}{2 z^2 \\left(\\frac{x y}{z}\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = z-x\nh = (1/(((x*y)/z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = x-y$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 1 & -1 & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = x-y\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = x+y-z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{1,-\\frac{x}{\\sqrt{1-x^2 z^2}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*z)\ng = x+y-z\nh = x+y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$25 x^4 \\cos \\left(5 x^5+\\frac{7}{3}\\right)-\\frac{3 x^2}{\\sqrt{\\frac{5}{3}-2 x^3}}$\n", - "Output Answer": [ - "$\\sqrt{\\frac{5}{3}-2 x^3}+\\sin \\left(5 x^5+\\frac{7}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 25*x**4*cos(5*x**5+(7/3))-((3*x**2)/(sqrt((5/3)-2*x**3)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = (y-z)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & \\frac{3 \\sqrt{y-z}}{2} & -\\frac{3 \\sqrt{y-z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = atan(y)\nh = (y-z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{x z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n \\frac{z}{3 y \\sqrt[3]{\\frac{x z}{y}}^2} & -\\frac{x z}{3 y^2 \\sqrt[3]{\\frac{x z}{y}}^2} & \\frac{x}{3 y \\sqrt[3]{\\frac{x z}{y}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = atan(y)\nh = cbrt((x*z)/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y z)$, $g(x,y,z) = \\sqrt[3]{y-z}$, and $h(x,y,z) = e^{y-z}$", - "Output Answer": [ - "$\\left\\{e^{y-z}+\\frac{1}{3 \\sqrt[3]{y-z}^2},\\frac{y}{\\sqrt{1-y^2 z^2}},-\\frac{z}{\\sqrt{1-y^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y*z)\ng = cbrt(y-z)\nh = cbrt(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\log (x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n \\frac{1}{x-y} & -\\frac{1}{x-y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = math.e**z\nh = log(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x^2}$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x**2)\nseries = f.subs(x, g).series(x, 4, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan \\left(x z^3\\right)$", - "Output Answer": [ - "$3 x z^2 \\sec ^2\\left(x z^3\\right)+\\frac{1}{x}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(y)\nh = tan(x*z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x^4}{z}}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y+z}}$", - "Output Answer": [ - "$\\frac{2 x^3}{z \\sqrt{\\frac{x^4}{z}}}+\\frac{1}{y^2+1}-\\frac{1}{2 (y+z)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x**4)/z))\ng = atan(y)\nh = (1/(sqrt(y+z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-2)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{5}{5 x+3}-\\frac{6 x^2}{\\sqrt{1-\\left(2 x^3+5\\right)^2}}$\n", - "Output Answer": [ - "$\\log (5 x+3)-\\sin ^{-1}\\left(2 x^3+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5/(5*x+3))-((6*x**2)/(sqrt(1-(2*x**3+5)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x-y}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x-y}} & -\\frac{1}{2 \\sqrt{x-y}} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x-y)\ng = asin(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x$", - "Output Answer": [ - "$(x+1)^2 \\left(-\\tan ^3(1)-\\tan (1)\\right)+(x+1) \\tan ^2(1)+1-\\tan (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sinh (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x+1)^2 \\left(\\frac{1}{2 e}-\\frac{\\sinh (1)}{2}\\right)+(x+1) \\left(\\frac{1}{e}+\\cosh (1)\\right)+\\frac{1}{e}-\\sinh (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sinh(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y^4}$, $g(x,y,z) = \\sqrt[3]{y^4}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$y^4 e^{x y^4}+\\frac{4 y^3}{3 \\sqrt[3]{y^4}^2}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y**4)\ng = cbrt(y**4)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y z)^{3/2}}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3 z}{2 (y z)^{5/2}} & -\\frac{3 y}{2 (y z)^{5/2}} \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y*z)**(3/2)))\ng = tanh(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(5 x^3+7\\right)+e^{x-3}$\n", - "Output Answer": [ - "$15 x^2 \\cos \\left(5 x^3+7\\right)+e^{x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(5*x**3+7)+math.e**(x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{3 \\sqrt{\\frac{17}{2}} x^2}{2 \\sqrt{x^3-1}}$\n", - "Output Answer": [ - "$\\sqrt{\\frac{17}{2}} \\sqrt{x^3-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((3*sqrt((17/2))*x**2)/(2*sqrt(x**3-1)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^2$, $g(x,y,z) = \\cos ^{-1}(x y z)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 y & 0 \\\\\n -\\frac{y z}{\\sqrt{1-x^2 y^2 z^2}} & -\\frac{x z}{\\sqrt{1-x^2 y^2 z^2}} & -\\frac{x y}{\\sqrt{1-x^2 y^2 z^2}} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**2\ng = acos(x*y*z)\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\sqrt{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n 0 & -\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}} & \\frac{1}{2 y \\sqrt{\\frac{z}{y}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y)\ng = cbrt(y+z)\nh = sqrt((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x-6} \\sqrt{4 x-5}$\n", - "Output Answer": [ - "$\\frac{e^{7 x-6} \\left(784 x^2-1848 x+1081\\right)}{(4 x-5)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x-6)*sqrt(4*x-5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(3-5 x^4\\right)$\n", - "Output Answer": [ - "$400 x^6 \\sin \\left(3-5 x^4\\right)+60 x^2 \\cos \\left(3-5 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3-5*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x$", - "Output Answer": [ - "$-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (9-6 x)+1$\n", - "Output Answer": [ - "$6 \\sin (9-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(9-6*x)+1, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n \\frac{1}{x} & -\\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = log((x/y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\sin ^{-1}(x)$", - "Output Answer": [ - "$\\log (x)-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = asin(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+\\frac{z}{2 \\sqrt{y z}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = sqrt(y*z)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y+z)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y+z)\ng = sqrt(y+z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-6 x}$\n", - "Output Answer": [ - "$-\\frac{9}{(1-6 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7-5 x^2\\right)$\n", - "Output Answer": [ - "$-10 \\left(10 x^2 \\sin \\left(7-5 x^2\\right)+\\cos \\left(7-5 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7-5*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = e^{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 0 & -e^{z-y} & e^{z-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = cos(x*y)\nh = math.e**(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(y^2\\right)$, $g(x,y,z) = \\tanh \\left(y^2\\right)$, and $h(x,y,z) = (x+z)^3$", - "Output Answer": [ - "$3 (x+z)^2+2 y \\text{sech}^2\\left(y^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y**2)\ng = tanh(y**2)\nh = (x+z)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^5\\right)$, $g(x,y,z) = \\sqrt[3]{\\frac{x^5}{y z}}$, and $h(x,y,z) = e^{x^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5}{x} & 0 & 0 \\\\\n \\frac{5 x^4}{3 y z \\sqrt[3]{\\frac{x^5}{y z}}^2} & -\\frac{x^5}{3 y^2 z \\sqrt[3]{\\frac{x^5}{y z}}^2} & -\\frac{x^5}{3 y z^2 \\sqrt[3]{\\frac{x^5}{y z}}^2} \\\\\n 5 e^{x^5} x^4 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**5)\ng = cbrt((x**5)/(y*z))\nh = math.e**(x**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{y^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{5 y^4}{3 \\sqrt[3]{y^5}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cbrt(y**5)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (3 x+7)+\\cos (7 x+5)$\n", - "Output Answer": [ - "$3 \\cos (3 x+7)-7 \\sin (7 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3*x+7)+cos(7*x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = \\sin \\left(x^5-y+z\\right)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{3 \\sqrt[3]{x^5}^2} & 0 & 0 \\\\\n 5 x^4 \\cos \\left(x^5-y+z\\right) & -\\cos \\left(x^5-y+z\\right) & \\cos \\left(x^5-y+z\\right) \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**5)\ng = sin(x**5-y+z)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\cos (2-6 x)}$\n", - "Output Answer": [ - "$-\\frac{9 (\\cos (4-12 x)+3)}{2 \\cos ^{\\frac{3}{2}}(2-6 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(cos(2-6*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^3\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = -\\tan ^{-1}\\left(x^3-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -3 x^2 \\sin \\left(x^3\\right) & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n -\\frac{3 x^2}{\\left(x^3-z\\right)^2+1} & 0 & \\frac{1}{\\left(x^3-z\\right)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**3)\ng = sin(y)\nh = -atan(x**3-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\sin \\left(4 x^3+4\\right)\\right)+\\tan (5-6 x)$\n", - "Output Answer": [ - "$-6 \\left(\\sec ^2(5-6 x)-2 x^2 \\cos \\left(4 \\left(x^3+1\\right)\\right) \\sec ^2\\left(\\sin \\left(4 \\left(x^3+1\\right)\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(sin(4*x**3+4))+tan(5-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (x-z)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y^3}}$", - "Output Answer": [ - "$\\cos (x)+\\frac{1}{3 y^3 \\sqrt[3]{\\frac{z}{y^3}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sin(x-z)\nh = cbrt(z/(y**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^{x^2}$, and $h(x,y,z) = \\sqrt{z-x^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 2 e^{x^2} x & 0 & 0 \\\\\n -\\frac{x}{\\sqrt{z-x^2}} & 0 & \\frac{1}{2 \\sqrt{z-x^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = math.e**(x**2)\nh = sqrt(z-x**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x-y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\sec ^2(x-y)+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x-y)\ng = asin(y)\nh = x+y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 5, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x+2} \\sqrt{e^{-9 x-4}}$\n", - "Output Answer": [ - "$\\frac{3}{2} e^{6 x+2} \\sqrt{e^{-9 x-4}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x+2)*sqrt(math.e**(-9*x-4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\frac{x}{y}+z$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y} & e^{x+y} & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 1 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y)\ng = (x/y)+z\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x-y}{z}$, $g(x,y,z) = (z-x)^5$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z} & -\\frac{1}{z} & -\\frac{x-y}{z^2} \\\\\n -5 (z-x)^4 & 0 & 5 (z-x)^4 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x-y)/z)\ng = (z-x)**5\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}} & -\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}} \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z/y)\ng = (z/x)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^2}{x^2}$, $g(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2 y^2}{x^3} & \\frac{2 y}{x^2} & 0 \\\\\n -\\frac{y \\cos \\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\cos \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**2)/(x**2))\ng = sin((y/x))\nh = sin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{z-x}$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(z-x)\nh = atan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x-5) \\left(\\frac{\\text{sech}(5)}{5}-\\log (5) \\tanh (5) \\text{sech}(5)\\right)+\\log (5) \\text{sech}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cosh(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(z \\left(x-y^3\\right)\\right)$", - "Output Answer": [ - "$-9 y^4 z^2 \\cos \\left(z \\left(x-y^3\\right)\\right)-z^2 \\cos \\left(z \\left(x-y^3\\right)\\right)+6 y z \\sin \\left(z \\left(x-y^3\\right)\\right)-\\left(x-y^3\\right)^2 \\cos \\left(z \\left(x-y^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z*(x-y**3))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-3 x^2-6}+e^{-7 x-1}$\n", - "Output Answer": [ - "$6 e^{-3 \\left(x^2+2\\right)} \\left(6 x^2-1\\right)+49 e^{-7 x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-3*x**2-6)+math.e**(-7*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = asin(x)\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(y-z^5\\right)$, $g(x,y,z) = x^4-y+z^5$, and $h(x,y,z) = \\sin ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\frac{5 z^4}{\\sqrt{1-z^{10}}}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y-z**5)\ng = x**4-y+z**5\nh = asin(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x}{2 (x y)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y)))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3-9 x^3\\right)$\n", - "Output Answer": [ - "$-\\frac{9 x \\left(3 x^3+2\\right)}{\\left(1-3 x^3\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3-9*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sqrt(y)\nh = sqrt(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = x-y-z$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}} & \\frac{1}{2 x \\sqrt{\\frac{y}{x}}} & 0 \\\\\n 1 & -1 & -1 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((y/x))\ng = x-y-z\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{\\sin (y+z),-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cos(y+z)\nh = cos(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (7 x+9) \\left(-\\tan ^{-1}(5-4 x)\\right)$\n", - "Output Answer": [ - "$\\frac{32 (5-4 x) \\sin (7 x+9)}{\\left((5-4 x)^2+1\\right)^2}+\\frac{56 \\cos (7 x+9)}{(5-4 x)^2+1}+49 \\sin (7 x+9) \\tan ^{-1}(5-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x+9)*(-atan(5-4*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{y+z}$", - "Output Answer": [ - "$1-\\frac{1}{(y+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = y\nh = (1/(y+z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 z^3$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y-z}}$", - "Output Answer": [ - "$3 x^2 z^3+\\frac{1}{2 (y-z)^{3/2}}+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*z**3\ng = cbrt(y)\nh = (1/(sqrt(y-z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $e^x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = math.e**x\nseries = f.subs(x, g).series(x, -2, 6)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{z}{x}\\right)^{3/2}}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\frac{3 z}{2 x^2 \\left(\\frac{z}{x}\\right)^{5/2}}+\\frac{y}{3 \\sqrt[3]{y z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z/x)**(3/2)))\ng = sin(z)\nh = cbrt(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$3 y^2 \\sec ^2\\left(y^3\\right)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y**3)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x z)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{x^2 z^2+1}}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x*z)\ng = tan(z)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log \\left(\\frac{3 x}{2}+\\frac{9}{2}\\right) \\tan (6 x)$\n", - "Output Answer": [ - "$-\\frac{\\sec ^2(6 x) \\left(12 (x+3) \\log \\left(\\frac{3 (x+3)}{2}\\right)+\\sin (12 x)\\right)}{2 (x+3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(((3*x)/2)+(9/2))*tan(6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-2^{2/3} \\tan \\left(9-8 x^3\\right)$\n", - "Output Answer": [ - "$24\\ 2^{2/3} x^2 \\sec ^2\\left(9-8 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-2**(2/3)*tan(9-8*x**3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3 x+8)-e^{5-7 x}$\n", - "Output Answer": [ - "$7 e^{5-7 x}-3 \\sin (3 x+8)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(3*x+8)-math.e**(5-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = y^2 z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & \\cosh (y) & 0 \\\\\n 0 & 2 y z^2 & 2 y^2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y)))\ng = sinh(y)\nh = y**2*z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(5-4 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{12 x \\left(-16 x^6+10 x^3+13\\right)}{\\left(8 x^6-20 x^3+13\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(5-4*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt{y-z}$", - "Output Answer": [ - "$4 y^3-\\frac{1}{2 \\sqrt{y-z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y-z)\ng = y**4\nh = sqrt(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z^5$, $g(x,y,z) = y$, and $h(x,y,z) = x+y+z^5$", - "Output Answer": [ - "$5 z^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z**5\ng = y\nh = x+y+z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{-8 x-8}}{-6 x-4}$\n", - "Output Answer": [ - "$\\frac{e^{-8 (x+1)} (24 x+19)}{2 (3 x+2)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(-8*x-8))/(-6*x-4)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y}{z^2},-\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x+y$, and $h(x,y,z) = x+z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 1 & 1 & 0 \\\\\n 1 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = x+y\nh = x+z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(8 x^3+1\\right)-\\sqrt{-6 x-5}$\n", - "Output Answer": [ - "$-48 x \\sin \\left(8 x^3+1\\right)-576 x^4 \\cos \\left(8 x^3+1\\right)+\\frac{9}{(-6 x-5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8*x**3+1)-sqrt(-6*x-5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{z^3}{x}}$, $g(x,y,z) = \\log \\left(x-y-z^3\\right)$, and $h(x,y,z) = \\sqrt[3]{x-z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z^3}{2 x^2 \\sqrt{\\frac{z^3}{x}}} & 0 & \\frac{3 z^2}{2 x \\sqrt{\\frac{z^3}{x}}} \\\\\n \\frac{1}{x-y-z^3} & -\\frac{1}{x-y-z^3} & -\\frac{3 z^2}{x-y-z^3} \\\\\n \\frac{1}{3 \\sqrt[3]{x-z^3}^2} & 0 & -\\frac{z^2}{\\sqrt[3]{x-z^3}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(((z**3)/x))\ng = log(x-y-z**3)\nh = cbrt(x-z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x+6} \\tan ^{-1}(6 x+6)$\n", - "Output Answer": [ - "$\\frac{\\frac{12 (7 x+6)}{(6 x+6)^2+1}+7 \\tan ^{-1}(6 x+6)}{2 \\sqrt{7 x+6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x+6)*atan(6*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+z)^2}}-\\frac{1}{y^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\ng = (1/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$3 x^2-\\frac{1}{2 y^{3/2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/(sqrt(y)))\nh = log(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (1-8 x) \\tan (3-9 x)$\n", - "Output Answer": [ - "$-\\left((8 \\cos (10-35 x)-8 \\cos (8-19 x)-\\cos (4-17 x)+145 \\cos (2-x)) \\sec ^3(3-9 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(1-8*x)*tan(3-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = e^{x^3}$ and $g(x) = $e^x$", - "Output Answer": [ - "$4 e (x-1)+2 e$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x$", - "Output Answer": [ - "$(x+2) (\\sin (2)-1)+2+\\cos (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = tan((y/z))\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+z$, and $h(x,y,z) = -\\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(x-y)^2}}-1,\\frac{1}{\\sqrt{1-(x-y)^2}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+z\nh = x+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y z)$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y*z)\ng = sin((y/z))\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 y^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left\\{0,0,x \\left(-e^{x y}\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y+z),-e^{x-z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (7-4 x)-\\cos (8 x+1)$\n", - "Output Answer": [ - "$8 \\sin (8 x+1)-4 \\sec ^2(7-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(7-4*x)-cos(8*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^5$", - "Output Answer": [ - "$1-\\frac{9 (x-1)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**5\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (2-6 x) \\sin (2-x)$\n", - "Output Answer": [ - "$\\frac{1}{2} (7 \\sin (4-7 x)+5 \\sin (5 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(2-6*x)*sin(2-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = z$, and $h(x,y,z) = -\\tan ^{-1}(x-z)$", - "Output Answer": [ - "$\\frac{1}{(x-z)^2+1}+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = z\nh = -atan(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x y$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n y & x & 0 \\\\\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x*y\nh = (1/(sqrt(x)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = z^4$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\left\\{z e^{y z}-4 z^3,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = z**4\nh = z**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = atan(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{42 x}{5}-\\frac{17}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{49 \\sqrt{3} (42 x-17)}{2 \\left(-147 x^2+119 x-22\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(((42*x)/5)-(17/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(2 x-\\frac{12}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{4 \\left(2 x-\\frac{12}{5}\\right)}{\\left(1-\\frac{4}{25} (6-5 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x-(12/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(x y^5\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y^5 \\cos \\left(x y^5\\right) & 5 x y^4 \\cos \\left(x y^5\\right) & 0 \\\\\n 0 & -\\frac{5 y^4}{\\sqrt{1-y^{10}}} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*y**5)\ng = acos(y**5)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},0,\\frac{x}{\\sqrt{1-x^2 y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\frac{1}{y^2+1}+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = atan(y)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-y)$, $g(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2},0,\\cos (x-y)-\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y)\ng = cos((x/z))\nh = cos((x/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\sin (1-7 x)}$\n", - "Output Answer": [ - "$\\frac{49 (\\cos (2-14 x)-3)}{8 \\sin ^{\\frac{3}{2}}(1-7 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(sin(1-7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{y^{10}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{10}{y^{11}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = (1/(y**10))\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$-\\sin (y+z)+\\cos (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(y)\nh = cos(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**2))\ng = cos(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin ^{-1}(x-z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-(x-z)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asin(x-z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{y}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = log(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{11 x}{3}+2\\right)$\n", - "Output Answer": [ - "$-\\frac{121}{9} \\cos \\left(\\frac{11 x}{3}+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((11*x)/3)+2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(4-6 x^3\\right)^3}+\\cos (2 x+6)$\n", - "Output Answer": [ - "$\\frac{54 x^2}{\\left(4-6 x^3\\right)^4}-2 \\sin (2 (x+3))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((4-6*x**3)**3))+cos(2*x+6), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^{10}$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-\\sin (y)+10 z^9$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = cos(y)\nh = z**10\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = (x+y)^4$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 4 (x+y)^3 & 4 (x+y)^3 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (x+y)**4\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^3\\right)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\log \\left(x^3\\right)-\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**3)\ng = log(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,\\cos (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sinh (x-z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\cosh (x-z) & 0 & \\cosh (x-z) \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -sinh(x-z)\ng = y**4\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^3 z^3$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$-\\sin (x)+3 y^2 z^3+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**3*z**3\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z^5}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\left(x^5\\right)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n \\frac{15}{2} x^4 \\sqrt{x^5} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = (x**5)**(3/2)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\log \\left(\\frac{13 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{375}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(((13*x)/5)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = sqrt(y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (y z)$, $g(x,y,z) = x-y+z$, and $h(x,y,z) = e^{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\cosh (y z) & y \\cosh (y z) \\\\\n 1 & -1 & 1 \\\\\n e^{x-z} & 0 & -e^{x-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(y*z)\ng = x-y+z\nh = math.e**(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{1-y^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = atanh(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (-\\sin (7 x+4))}{\\log (8 x+7)}$\n", - "Output Answer": [ - "$\\frac{7 \\log (8 x+7) \\cot (7 x+4)-\\frac{8 \\log (-\\sin (7 x+4))}{8 x+7}}{\\log ^2(8 x+7)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(-sin(7*x+4)))/(log(8*x+7))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{y}{3 \\sqrt[3]{y z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atan(z)\nh = cbrt(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = y^2 z^2$", - "Output Answer": [ - "$\\frac{z}{3 \\sqrt[3]{x z}^2}+2 y^2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z)\ng = z**(3/2)\nh = y**2*z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\left(y^3\\right)^{3/2}$, and $h(x,y,z) = \\sin ^{-1}\\left(y^3+z\\right)$", - "Output Answer": [ - "$\\cos (x)+\\frac{1}{\\sqrt{1-\\left(y^3+z\\right)^2}}+\\frac{9}{2} \\sqrt{y^3} y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (y**3)**(3/2)\nh = asin(y**3+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{x \\sin \\left(\\frac{x}{y}\\right)}{y^2}+e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos((x/y))\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{4 x^3}{\\left(4 x^4-3\\right)^5}$\n", - "Output Answer": [ - "$\\frac{1}{16 \\left(4 x^4-3\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((4*x**3)/((4*x**4-3)**5))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = acosh(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (x+1)+\\cos (4-2 x)$\n", - "Output Answer": [ - "$-\\sin (x+1)-4 \\cos (4-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(x+1)+cos(4-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x}{z^4}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{x}{z^4}}}{z^4},0,-\\frac{4 x e^{\\frac{x}{z^4}}}{z^5}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/(z**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 z^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x^3\\right)^{3/2}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{9 x^2}{2 \\left(x^3\\right)^{5/2}} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x**3)**(3/2)))\ng = sin(y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{19 x}{3}+1\\right)-\\tan \\left(\\frac{4}{3}-4 x\\right)$\n", - "Output Answer": [ - "$\\frac{19}{3} \\cos \\left(\\frac{19 x}{3}+1\\right)+4 \\sec ^2\\left(\\frac{4}{3}-4 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(((19*x)/3)+1)-tan((4/3)-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{z}{y^2 z^2+1} & \\frac{y}{y^2 z^2+1} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = atan(y*z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}}+\\sinh (x)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = acos(x/y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{x^2}$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = (1/(x**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x^2+y-z\\right)$", - "Output Answer": [ - "$2 \\sec ^2\\left(x^2+y-z\\right)+8 x^2 \\tan \\left(x^2+y-z\\right) \\sec ^2\\left(x^2+y-z\\right)+4 \\tan \\left(x^2+y-z\\right) \\sec ^2\\left(x^2+y-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2+y-z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{y}{x^4}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 y \\sec ^2\\left(\\frac{y}{x^4}\\right)}{x^5},\\frac{\\sec ^2\\left(\\frac{y}{x^4}\\right)}{x^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/(x**4)))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3\ng = cos(y)\nh = atan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cbrt(y*z)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\frac{1}{y}-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = acos(y)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (4-x)-\\tan (4-6 x)$\n", - "Output Answer": [ - "$6 \\sec ^2(4-6 x)-\\sec ^2(4-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4-x)-tan(4-6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(z \\left(x+y^3\\right)\\right)$\n", - "Output Answer": [ - "$\\left\\{z \\sec ^2\\left(z \\left(x+y^3\\right)\\right),3 y^2 z \\sec ^2\\left(z \\left(x+y^3\\right)\\right),\\left(x+y^3\\right) \\sec ^2\\left(z \\left(x+y^3\\right)\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z*(x+y**3))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (x/z)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = (y/x)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(x+z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^5-\\sin ^{-1}(9 x+1)$\n", - "Output Answer": [ - "$-\\frac{27 x+3}{(-x (9 x+2))^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**5-asin(9*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{y z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y z} & -\\frac{x}{y^2 z} & -\\frac{x}{y z^2} \\\\\n 0 & e^y & 0 \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/(y*z))\ng = math.e**y\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x^2}{y z}\\right)$", - "Output Answer": [ - "$-\\frac{x^4 \\cos \\left(\\frac{x^2}{y z}\\right)}{y^4 z^2}-\\frac{x^4 \\cos \\left(\\frac{x^2}{y z}\\right)}{y^2 z^4}-\\frac{4 x^2 \\cos \\left(\\frac{x^2}{y z}\\right)}{y^2 z^2}-\\frac{2 x^2 \\sin \\left(\\frac{x^2}{y z}\\right)}{y^3 z}-\\frac{2 x^2 \\sin \\left(\\frac{x^2}{y z}\\right)}{y z^3}-\\frac{2 \\sin \\left(\\frac{x^2}{y z}\\right)}{y z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((x**2)/(y*z)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},-3 x^2,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = x y-z$", - "Output Answer": [ - "$\\{x,-y,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-\\frac{5 x^2}{2}-\\frac{15}{2}\\right)^5}$\n", - "Output Answer": [ - "$-\\frac{64 \\left(11 x^2-3\\right)}{625 \\left(x^2+3\\right)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-((5*x**2)/2)-(15/2))**5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{x^3}\\right)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt{x^3+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 z \\sec ^2\\left(\\frac{z}{x^3}\\right)}{x^4} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x^3}\\right)}{x^3} \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n \\frac{3 x^2}{2 \\sqrt{x^3+z}} & 0 & \\frac{1}{2 \\sqrt{x^3+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((z/(x**3)))\ng = (1/(y**2))\nh = sqrt(x**3+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = (y+z)^3$, and $h(x,y,z) = \\sqrt[3]{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}} & -\\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}} & 0 \\\\\n 0 & 3 (y+z)^2 & 3 (y+z)^2 \\\\\n 0 & -\\frac{1}{3 \\sqrt[3]{z-y}^2} & \\frac{1}{3 \\sqrt[3]{z-y}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y/x)\ng = (y+z)**3\nh = cbrt(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(6 x+\\frac{11}{5}\\right)$\n", - "Output Answer": [ - "$72 \\tan \\left(6 x+\\frac{11}{5}\\right) \\sec ^2\\left(6 x+\\frac{11}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(6*x+(11/5))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{7 x^2-8}}{(4 x-7)^3}$\n", - "Output Answer": [ - "$\\frac{2 e^{7 x^2-8} \\left(28 x^2-49 x-6\\right)}{(7-4 x)^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(7*x**2-8))/((4*x-7)**3)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = tanh(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = tanh(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\log (z-x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n -\\frac{1}{z-x} & 0 & \\frac{1}{z-x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cbrt(x)\nh = log(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(7-5 x^5\\right)^2-\\sin (5-3 x)$\n", - "Output Answer": [ - "$50 \\left(45 x^5-28\\right) x^3+9 \\sin (5-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (7-5*x**5)**2-sin(5-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (z-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y\ng = math.e**y\nh = log(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x+y}{z}\\right)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{z \\sqrt{1-\\frac{(x+y)^2}{z^2}}}-\\sin (x+y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x+y)/z)\ng = cos(x+y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^6$, $g(x,y,z) = \\sqrt{z \\left(x^2-y^4\\right)}$, and $h(x,y,z) = \\tan ^{-1}\\left(x^2-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 6 x^5 & 0 & 0 \\\\\n \\frac{x z}{\\sqrt{z \\left(x^2-y^4\\right)}} & -\\frac{2 y^3 z}{\\sqrt{z \\left(x^2-y^4\\right)}} & \\frac{x^2-y^4}{2 \\sqrt{z \\left(x^2-y^4\\right)}} \\\\\n \\frac{2 x}{\\left(x^2-z\\right)^2+1} & 0 & -\\frac{1}{\\left(x^2-z\\right)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**6\ng = sqrt(z*(x**2-y**4))\nh = atan(x**2-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = y-z$, and $h(x,y,z) = e^{x/y}$", - "Output Answer": [ - "$\\cosh (x)+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = y-z\nh = math.e**(x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{(x+y)^2}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$3 x^2-\\frac{2}{(x+y)^3}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/((x+y)**2))\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{-5 x-3}-\\sin (3-4 x)$\n", - "Output Answer": [ - "$\\frac{5}{(5 x+3)^2}+4 \\cos (3-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(-5*x-3))-sin(3-4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{\\frac{x}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = asinh(y)\nh = sqrt((x/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\sqrt[3]{z-x}$, and $h(x,y,z) = \\sqrt{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y & x & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n \\frac{1}{2 z \\sqrt{\\frac{x}{z}}} & 0 & -\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y\ng = cbrt(z-x)\nh = sqrt((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{7 x^2+7} \\sin (\\sin (2-7 x))$\n", - "Output Answer": [ - "$7 e^{7 x^2+7} (\\cos (2-7 x) \\cos (\\sin (2-7 x))-2 x \\sin (\\sin (2-7 x)))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(7*x**2+7)*sin(sin(2-7*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^3$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{-e^{y+z},3 (z-x)^2-\\cos (x),0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**3\ng = math.e**(y+z)\nh = math.e**(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$-\\frac{\\sin (4 x)}{256 x^4}$\n", - "Output Answer": [ - "$\\frac{1}{128} (\\sin (4)-8 \\cos (4))$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-((sin(4*x))/(256*x**4)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\cosh \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{y \\sinh \\left(\\frac{y}{z}\\right)}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = x+z\nh = cosh(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(2-\\frac{9 x}{2}\\right)-\\sin \\left(1-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{2} \\left(\\frac{2}{9 x-4}+\\cos \\left(1-\\frac{9 x}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2-((9*x)/2))-sin(1-((9*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n -\\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y*z)\ng = log((z/x))\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\frac{1}{\\sqrt{x}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = (1/(sqrt(x)))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (3 x+1)+\\cos (6 x+8)$\n", - "Output Answer": [ - "$3 (\\cos (3 x+1)-2 \\sin (6 x+8))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3*x+1)+cos(6*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\cosh ^{-1}(y-x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n -\\frac{1}{\\sqrt{-x+y-1} \\sqrt{-x+y+1}} & \\frac{1}{\\sqrt{-x+y-1} \\sqrt{-x+y+1}} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = acosh(y-x)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^2-z\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\left(x^2+z\\right)^5$", - "Output Answer": [ - "$\\left\\{0,-10 x \\left(x^2+z\\right)^4-\\sec ^2\\left(x^2-z\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**2-z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-8}+\\frac{1}{8-6 x}$\n", - "Output Answer": [ - "$\\frac{6}{(8-6 x)^2}-6 e^{-6 x-8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-8)+(1/(8-6*x)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(7-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{81}{4} \\cos \\left(7-\\frac{9 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7-((9*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(2 x-\\frac{15}{2}\\right)^2}+\\cos \\left(3-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{2} \\sin \\left(3-\\frac{9 x}{2}\\right)-\\frac{32}{(4 x-15)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((2*x-(15/2))**2))+cos(3-((9*x)/2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$\\frac{5 (x+2)^2}{36\\ 2^{2/3}}+\\frac{x+2}{3\\ 2^{2/3}}+\\frac{1}{2^{2/3}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n \\text{sech}^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = sqrt(x*y)\nh = tanh(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z (x+y)}$", - "Output Answer": [ - "$\\frac{x+y}{2 \\sqrt{z (x+y)}}+\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y)\nh = sqrt(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x} \\left(x^5+2\\right)^3$\n", - "Output Answer": [ - "$e^{4 x} \\left(x^5+2\\right)^2 \\left(4 x^5+15 x^4+8\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x)*(x**5+2)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (-8 x-5) \\sin (5-3 x)$\n", - "Output Answer": [ - "$3 \\log (-8 x-5) \\cos (5-3 x)-\\frac{8 \\sin (5-3 x)}{8 x+5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(-8*x-5)*sin(5-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5 y z\\right)$", - "Output Answer": [ - "$-\\frac{x^{15} y z^3}{\\left(1-x^{10} y^2 z^2\\right)^{3/2}}-\\frac{x^{15} y^3 z}{\\left(1-x^{10} y^2 z^2\\right)^{3/2}}-\\frac{25 x^{13} y^3 z^3}{\\left(1-x^{10} y^2 z^2\\right)^{3/2}}-\\frac{20 x^3 y z}{\\sqrt{1-x^{10} y^2 z^2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**5*y*z)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x^2\\right)^{3/2}}$, $g(x,y,z) = \\frac{1}{(y z)^{3/2}}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 x}{\\left(x^2\\right)^{5/2}} & 0 & 0 \\\\\n 0 & -\\frac{3 z}{2 (y z)^{5/2}} & -\\frac{3 y}{2 (y z)^{5/2}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x**2)**(3/2)))\ng = (1/((y*z)**(3/2)))\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{x-z}$, and $h(x,y,z) = \\tan ^{-1}\\left(y^5+z\\right)$", - "Output Answer": [ - "$e^x+\\frac{1}{\\left(y^5+z\\right)^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = math.e**(x-z)\nh = atan(y**5+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{9-9 x^5} \\sin (5)$\n", - "Output Answer": [ - "$-\\frac{15 x^4 \\sin (5)}{2 \\sqrt{1-x^5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(9-9*x**5)*sin(5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y/z)\ng = (1/(sqrt(y)))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$-\\frac{1}{y^2}+\\frac{3 \\sqrt{z}}{2}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = (1/y)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{20}$, $g(x,y,z) = \\tanh \\left(\\frac{x}{z^5}\\right)$, and $h(x,y,z) = x^5 z^{25}$", - "Output Answer": [ - "$25 x^5 z^{24}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**20\ng = tanh(x/(z**5))\nh = x**5*z**25\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^{3/2}}$, $g(x,y,z) = x^4 z^4$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left\\{\\cos (y)-4 x^4 z^3,0,4 x^3 z^4+\\frac{3}{2 y^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**(3/2)))\ng = x**4*z**4\nh = x**4*z**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin \\left(y^5\\right)$, and $h(x,y,z) = x+z^5$", - "Output Answer": [ - "$e^x+5 y^4 \\cos \\left(y^5\\right)+5 z^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(y**5)\nh = x+z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\sec ^2(x+y)+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = x**3\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\{-2 z,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = z**2\nh = z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(3-8 x^2\\right)^3}+\\cos (x+3)$\n", - "Output Answer": [ - "$\\frac{48 x}{\\left(3-8 x^2\\right)^4}-\\sin (x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3-8*x**2)**3))+cos(x+3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{y}{2 \\sqrt{y z}},-\\frac{z}{2 \\sqrt{y z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y*z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8 x^2+1}-\\tan (7-6 x)$\n", - "Output Answer": [ - "$8 \\left(2 e^{8 x^2+1} \\left(16 x^2+1\\right)-9 \\tan (7-6 x) \\sec ^2(7-6 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8*x**2+1)-tan(7-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{y+z}},\\frac{1}{3 \\sqrt[3]{x+y}^2}-\\frac{1}{2 \\sqrt{y+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = cbrt(x+y)\nh = cbrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z-x}}$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{2 (z-x)^{3/2}}+\\cos (y+z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z-x)))\ng = sin(y+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = tan(y)\nh = (y/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$(x+4)^2-8 (x+4)+16$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, -4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cos ^{-1}(x y)$", - "Output Answer": [ - "$5 y^4-\\frac{2}{x^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y**5\nh = acos(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8 x^2+1}+1$\n", - "Output Answer": [ - "$16 e^{8 x^2+1} \\left(16 x^2+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8*x**2+1)+1\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (6 x)-\\sin (8-9 x)$\n", - "Output Answer": [ - "$9 (9 \\sin (8-9 x)-4 \\sin (6 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(6*x)-sin(8-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\cos (y)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = sin(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(1-2 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{10 x^3 \\left(6 x^{10}-x^5-2\\right)}{\\left(2 x^{10}-2 x^5+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(1-2*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\frac{x}{2}-9}-e^{-x-\\frac{9}{2}}$\n", - "Output Answer": [ - "$\\frac{1}{4} e^{-\\frac{x}{2}-9}-e^{-x-\\frac{9}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-(x/2)-9)-math.e**(-x-(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{(-5 x-7)^2}{(8-2 x)^5}$\n", - "Output Answer": [ - "$\\frac{15 (x+5) (5 x+7)}{32 (x-4)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((-5*x-7)**2)/((8-2*x)**5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,-\\sin (x)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos(x)\nh = cos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\left\\{x e^{x y},y \\left(-e^{x y}\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = e^{x/z}$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n \\frac{e^{x/z}}{z} & 0 & -\\frac{x e^{x/z}}{z^2} \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+z)\ng = math.e**(x/z)\nh = (y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+z$, and $h(x,y,z) = (x-y+z)^4$", - "Output Answer": [ - "$4 (x-y+z)^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+z\nh = (x-y+z)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-2) (4+\\sin (2))+(x-2)^2 \\left(1+\\frac{\\cos (2)}{2}\\right)+4-\\cos (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = cos(x)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x^5}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log \\left(y+z^3\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y+z^3},0,-\\frac{1}{x^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(x**5))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z}-e^{y+z},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = math.e**(y+z)\nh = math.e**(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-z)^2$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$2 (x-z)-\\sin (y)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-z)**2\ng = cos(y)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(x^2\\right)$, $g(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = x^2-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x \\cos \\left(x^2\\right) & 0 & 0 \\\\\n 0 & \\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2} & -\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y} \\\\\n 2 x & -1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x**2)\ng = cos((z/y))\nh = x**2-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{9-4 x} \\sin (x+5)$\n", - "Output Answer": [ - "$-e^{9-4 x} (\\cos (x+5)-4 \\sin (x+5))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(9-4*x)*sin(x+5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 4 x^2$ on the interval $x = 1$ to $x = 6$\n", - "Output Answer": [ - "$\\frac{1}{16} \\left(-8 \\sqrt{65}+48 \\sqrt{2305}-\\sinh ^{-1}(8)+\\sinh ^{-1}(48)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 4*x**2\na = 1\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z (x+y))$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x^4 z^4$", - "Output Answer": [ - "$\\left\\{0,(x+y) \\cos (z (x+y))-4 x^3 z^4,-z \\cos (z (x+y))\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z*(x+y))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (x z)$, and $h(x,y,z) = \\sqrt{z-y}$", - "Output Answer": [ - "$\\left\\{-x \\sec ^2(x z)-\\frac{1}{2 \\sqrt{z-y}},0,z \\sec ^2(x z)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan(x*z)\nh = tan(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(5 x+\\frac{15}{2}\\right)+\\tan \\left(5-\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{225}{2} \\tan \\left(5-\\frac{15 x}{2}\\right) \\sec ^2\\left(5-\\frac{15 x}{2}\\right)-25 \\cos \\left(5 x+\\frac{15}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5*x+(15/2))+tan(5-((15*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = sin(y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\frac{1}{\\sqrt{z}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$e^{x+z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = (1/(sqrt(z)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(x^4+y\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{1}{x^8 z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 \\cos \\left(x^4+y\\right) & \\cos \\left(x^4+y\\right) & 0 \\\\\n 0 & 0 & 1 \\\\\n -\\frac{8}{x^9 z^2} & 0 & -\\frac{2}{x^8 z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x**4+y)\ng = z\nh = (1/(x**8*z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-x} (-3 x-4)^3$\n", - "Output Answer": [ - "$e^{8-x} (3 x-5) (3 x+4)^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-x)*(-3*x-4)**3, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-1-\\tan (1)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-1-tan(1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\frac{1}{x+y}+\\text{sech}^2(x)-\\frac{1}{y-z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = log(x+y)\nh = log(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (x y+z)$", - "Output Answer": [ - "$\\frac{1}{x y+z}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = log(x*y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 y^{3/2}},0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (5) \\sin \\left(3 x^4+7\\right)$\n", - "Output Answer": [ - "$12 x^3 \\sin (5) \\cos \\left(3 x^4+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(5)*sin(3*x**4+7), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = \\log \\left(y^3+z\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{3 y^2}{y^3+z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = acos(y**3)\nh = acos(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$15 e^{3 x^5-7} x^4$\n", - "Output Answer": [ - "$e^{3 x^5-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 15*math.e**(3*x**5-7)*x**4\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5\ng = cosh(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\cos \\left(5-4 x^4\\right)}+\\sin (6-7 x)$\n", - "Output Answer": [ - "$16 x^3 \\sin \\left(5-4 x^4\\right) e^{\\cos \\left(5-4 x^4\\right)}-7 \\cos (6-7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(cos(5-4*x**4))+sin(6-7*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-4 x}$\n", - "Output Answer": [ - "$-\\frac{4}{(1-4 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y+z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{(y+z)^2},\\frac{1}{(y+z)^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y+z))\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sin(x)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3-6 x^2\\right)$\n", - "Output Answer": [ - "$-\\frac{4 \\left(2 x^2+1\\right)}{\\left(1-2 x^2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3-6*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2}+e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y/x)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log (2)+i \\pi$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(2)+1j*pi\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5 x+3)+\\tan (9 x+8)$\n", - "Output Answer": [ - "$\\frac{5}{5 x+3}+9 \\sec ^2(9 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x+3)+tan(9*x+8), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x z^5}{y}\\right)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\frac{z^5}{y \\left(\\frac{x^2 z^{10}}{y^2}+1\\right)}+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x*z**5)/y)\ng = tan(x)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5-9 x^3}-\\cos \\left(1-8 x^2\\right)$\n", - "Output Answer": [ - "$x \\left(-27 e^{5-9 x^3} x-16 \\sin \\left(1-8 x^2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5-9*x**3)-cos(1-8*x**2), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-y)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\cos (x-y)-\\frac{3}{2 y^{5/2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y)\ng = (1/(y**(3/2)))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(8 x+1)^4$\n", - "Output Answer": [ - "$768 (8 x+1)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (8*x+1)**4\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-5 x^2}$\n", - "Output Answer": [ - "$10 e^{-5 x^2} \\left(10 x^2-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-5*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^4-z^3}$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 x^3}{\\sqrt{x^4-z^3}},0,-\\frac{3 z^2}{2 \\sqrt{x^4-z^3}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**4-z**3)\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x^3-z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 e^{x^3-z} & 0 & -e^{x^3-z} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x**3-z)\ng = y\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2},-\\frac{\\cos \\left(\\frac{y}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((y/z))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\left(\\frac{1}{26}-\\frac{1}{e^5}\\right) (x+5)-\\frac{1}{e^5}-\\tan ^{-1}(5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, -5, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{-4 x-1}{\\tan ^{-1}(5 x+3)}$\n", - "Output Answer": [ - "$\\frac{4 \\tan ^{-1}(5 x+3)-\\frac{4 x+1}{5 x^2+6 x+2}}{\\tan ^{-1}(5 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((-4*x-1)/(atan(5*x+3))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (1-4 x) \\log (\\cos (5 x+6))$\n", - "Output Answer": [ - "$-5 \\tan (1-4 x) \\tan (5 x+6)-4 \\sec ^2(1-4 x) \\log (\\cos (5 x+6))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(1-4*x)*log(cos(5*x+6)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n \\frac{1}{x} & -\\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = math.e**z\nh = log((x/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^2}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\sqrt{x} \\sqrt{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**2)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x-\\frac{8}{3}}$\n", - "Output Answer": [ - "$25 e^{5 x-\\frac{8}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x-(8/3))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{e^{5-5 x}}{x^2}$\n", - "Output Answer": [ - "$\\frac{e^{5-5 x} \\left(25 x^2+20 x+6\\right)}{x^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(5-5*x))/(x**2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cos ^{-1}(2 x)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(acos(2*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$e^x+\\frac{1}{y \\sqrt{\\frac{z^2}{y^2}+1}}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = asinh(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt[3]{z-x}$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = cbrt(z-x)\nh = sqrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z^5}$, $g(x,y,z) = y$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+z^5}}+5 z^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z**5)\ng = y\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$y+\\frac{3 \\sqrt{y}}{2}-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = y**(3/2)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{15 x^4}{2 \\sqrt{3 x^5+9}}$\n", - "Output Answer": [ - "$\\sqrt{3 x^5+9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((15*x**4)/(2*sqrt(3*x**5+9)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{3 x-3}-\\tan (3-3 x)$\n", - "Output Answer": [ - "$3 \\sec ^2(3-3 x)-3 e^{3 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(3*x-3)-tan(3-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y^3-z\\right)$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = y^3$", - "Output Answer": [ - "$\\left\\{3 y^2,-\\cos \\left(y^3-z\\right),-\\frac{3}{2 x^{5/2}}-3 y^2 \\cos \\left(y^3-z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**3-z)\ng = (1/(x**(3/2)))\nh = (1/(x**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (x-z)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(x-z)\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^3 z\\right)$, $g(x,y,z) = \\frac{x^3}{y}$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x^3}{y}\\right)$", - "Output Answer": [ - "$3 x^2 z \\cos \\left(x^3 z\\right)-\\frac{x^3}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**3*z)\ng = ((x**3)/y)\nh = atan((x**3)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = math.e**y\nh = y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(-x-5)^2}-e^8$\n", - "Output Answer": [ - "$-\\frac{2}{(x+5)^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((1/((-x-5)**2))-math.e**8, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x-y^4\\right)$, $g(x,y,z) = \\tan \\left(y^4+z\\right)$, and $h(x,y,z) = \\cos ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x-y^4} & -\\frac{4 y^3}{x-y^4} & 0 \\\\\n 0 & 4 y^3 \\sec ^2\\left(y^4+z\\right) & \\sec ^2\\left(y^4+z\\right) \\\\\n -\\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & -\\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x-y**4)\ng = tan(y**4+z)\nh = acos(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = \\frac{1}{y^3+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{3 y^2}{2 \\sqrt{y^3}} & 0 \\\\\n 0 & -\\frac{3 y^2}{\\left(y^3+z\\right)^2} & -\\frac{1}{\\left(y^3+z\\right)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y**3)\nh = (1/(y**3+z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\tanh (x)$", - "Output Answer": [ - "$-27 (x+3) \\left(-3+3 \\tanh ^2(3)-4 \\tanh (3)\\right)-81 \\tanh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = tanh(x)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$4 x^3+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cbrt(z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z)\ng = sqrt(y)\nh = atan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4 x^2+5 x+3}$\n", - "Output Answer": [ - "$e^{4 x^2+5 x+3} \\left(64 x^2+80 x+33\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4*x**2+5*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5-2 x}+\\cos ^{-1}(-2 x-3)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{-x^2-3 x-2}}-\\frac{1}{\\sqrt{5-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5-2*x)+acos(-2*x-3), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (x-y)$, $g(x,y,z) = \\tan (z (x+y))$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$z \\sec ^2(z (x+y))-\\sec ^2(x-y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-y)\ng = tan(z*(x+y))\nh = x-y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3} \\sqrt{x}-\\sin (4 x)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{3}}{2 \\sqrt{x}}-4 \\cos (4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3)*sqrt(x)-sin(4*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(-4 x)+\\sin (\\log (3 x+5))$\n", - "Output Answer": [ - "$\\frac{4}{\\sqrt{1-16 x^2}}+\\frac{3 \\cos (\\log (3 x+5))}{3 x+5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(-4*x)+sin(log(3*x+5)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x \\sec ^2\\left(x^2\\right) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x**2)\ng = cos(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = y^{15}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 \\sin \\left(x^4\\right) & 0 & 0 \\\\\n 0 & 15 y^{14} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**4)\ng = y**15\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y+z}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = math.e**y\nh = sqrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x}{z^3}}$", - "Output Answer": [ - "$-\\frac{9 x^2}{4 z^8 \\left(\\frac{x}{z^3}\\right)^{3/2}}+\\frac{6 x}{z^5 \\sqrt{\\frac{x}{z^3}}}-\\frac{1}{4 z^6 \\left(\\frac{x}{z^3}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/(z**3)))\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x+y+z^3\\right)$", - "Output Answer": [ - "$-9 z^4 \\sin \\left(x+y+z^3\\right)-2 \\sin \\left(x+y+z^3\\right)+6 z \\cos \\left(x+y+z^3\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y+z**3)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(\\frac{9}{2}-\\frac{5 x^4}{2}\\right)^2}-\\frac{1}{\\left(9 x-\\frac{9}{2}\\right)^2}$\n", - "Output Answer": [ - "$\\frac{18}{\\left(9 x-\\frac{9}{2}\\right)^3}-\\frac{160 x^3}{\\left(5 x^4-9\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(((9/2)-((5*x**4)/2))**2))-(1/((9*x-(9/2))**2)), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}\\left(x^5\\right)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x**5)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{-\\sin (y),0,-\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(x)\nh = acos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$\\sqrt{x}-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\left(y^5+z\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{15}{2} y^4 \\sqrt{y^5+z},0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y**3)\nh = cos(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z/y)\ng = sqrt(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\tan \\left(\\frac{z}{x^3}\\right)$, and $h(x,y,z) = x^3-z$", - "Output Answer": [ - "$\\left\\{-\\frac{\\sec ^2\\left(\\frac{z}{x^3}\\right)}{x^3},-3 x^2-\\frac{2}{z^3},-\\frac{3 z \\sec ^2\\left(\\frac{z}{x^3}\\right)}{x^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**2))\ng = tan((z/(x**3)))\nh = tan((z/(x**3)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{z^4}{x}$, and $h(x,y,z) = z^{16}$", - "Output Answer": [ - "$\\left\\{-\\frac{4 z^3}{x},0,-\\frac{z^4}{x^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = ((z**4)/x)\nh = ((z**4)/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x-z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(x-z)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{y}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y*z)\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(4 x-3)^5 \\cos \\left(x^2\\right)$\n", - "Output Answer": [ - "$-2 (4 x-3)^5 \\sin \\left(x^2\\right)-80 (3-4 x)^4 x \\sin \\left(x^2\\right)-4 x^2 (4 x-3)^5 \\cos \\left(x^2\\right)+320 (4 x-3)^3 \\cos \\left(x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (4*x-3)**5*cos(x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^4\\right)$, $g(x,y,z) = \\left(z-x^4\\right)^{3/2}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{1-\\frac{3 \\sqrt{z-x^4}}{2},0,-6 x^3 \\sqrt{z-x^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**4)\ng = (z-x**4)**(3/2)\nh = (z-x**4)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(8-8 x)^5$\n", - "Output Answer": [ - "$1280 (8-8 x)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (8-8*x)**5\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{x-z}$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(x-z))\nh = sin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^4}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4}{z^5},y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**4))\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^2-x$", - "Output Answer": [ - "$\\left\\{0,1,-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\sqrt{z (x-y)}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{-\\frac{x-y}{2 \\sqrt{z (x-y)}},-y \\sin (y z),\\frac{z}{2 \\sqrt{z (x-y)}}+z \\sin (y z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = sqrt(z*(x-y))\nh = sqrt(z*(x-y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{x z}}-\\frac{1}{2 y^{3/2}}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = (1/(sqrt(y)))\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\frac{1}{(y-x)^2}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n \\frac{2}{(y-x)^3} & -\\frac{2}{(y-x)^3} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-z)\ng = (1/((y-x)**2))\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(7 x+7) \\tan (5-x)$\n", - "Output Answer": [ - "$\\sin ^{-1}(7 x+7) \\sec ^2(5-x)-\\frac{7 \\tan (5-x)}{\\sqrt{1-49 (x+1)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(7*x+7)*tan(5-x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(3 x+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$-18 \\tan \\left(3 x+\\frac{11}{2}\\right) \\sec ^2\\left(3 x+\\frac{11}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x+(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x+9}+\\tan (8 x+1)$\n", - "Output Answer": [ - "$7 e^{7 x+9}+8 \\sec ^2(8 x+1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x+9)+tan(8*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{13}{2}-8 x\\right)^5+\\tan \\left(\\frac{13}{2}-2 x\\right)$\n", - "Output Answer": [ - "$-\\frac{5}{2} (13-16 x)^4-2 \\sec ^2\\left(\\frac{13}{2}-2 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((13/2)-8*x)**5+tan((13/2)-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{3 x-4} \\sin (8 x+4)$\n", - "Output Answer": [ - "$e^{3 x-4} (55 \\sin (8 x+4)-48 \\cos (8 x+4))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(3*x-4)*sin(8*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sinh (y z)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\{-y \\cosh (y z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = sinh(y*z)\nh = sinh(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = \\cosh (x+y)$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\left\\{x e^{x y},y \\left(-e^{x y}\\right),\\frac{3 x}{2 (x y)^{5/2}}+\\sinh (x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y)**(3/2)))\ng = cosh(x+y)\nh = cosh(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{z^8}$, and $h(x,y,z) = \\cos \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & 0 & -\\frac{8}{z^9} \\\\\n 0 & 0 & -4 z^3 \\sin \\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = (1/(z**8))\nh = cos(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$2 x+\\frac{1}{y}+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = log(y)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^4\\right)$ and $g(x) = $\\sin \\left(x^4\\right)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**4)\ng = sin(x**4)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (1/z)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y-x}$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = \\frac{z^2}{x^2}$", - "Output Answer": [ - "$\\frac{2 z}{x^2}+\\frac{1}{(y-x)^2}+\\frac{z}{3 \\sqrt[3]{y z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y-x))\ng = cbrt(y*z)\nh = ((z**2)/(x**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}(x+y)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z},\\frac{1}{\\sqrt{1-(x+y)^2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = asin(x+y)\nh = asin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin (x+z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = sin(x+z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\frac{9 x}{2}+2\\right)-(3 x+7)^4$\n", - "Output Answer": [ - "$\\frac{9}{2} \\sec ^2\\left(\\frac{9 x}{2}+2\\right)-12 (3 x+7)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(((9*x)/2)+2)-(3*x+7)**4, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{x^4}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(x^4-y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4 z \\sin \\left(\\frac{z}{x^4}\\right)}{x^5} & 0 & -\\frac{\\sin \\left(\\frac{z}{x^4}\\right)}{x^4} \\\\\n 0 & 1 & 0 \\\\\n \\frac{4 x^3}{x^4-y} & -\\frac{1}{x^4-y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((z/(x**4)))\ng = y\nh = log(x**4-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4-x) \\tan (7 x+1)$\n", - "Output Answer": [ - "$\\sin (4-x) \\tan (7 x+1)+7 \\cos (4-x) \\sec ^2(7 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4-x)*tan(7*x+1), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}+z\\right)$, $g(x,y,z) = \\sqrt{\\frac{z}{x}}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y \\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}} & -\\frac{x}{y^2 \\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}} \\\\\n -\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}} & 0 & \\frac{1}{2 x \\sqrt{\\frac{z}{x}}} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin((x/y)+z)\ng = sqrt((z/x))\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = x$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$e^{x+z}+\\frac{1}{2 \\sqrt{x+z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = x\nh = math.e**(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-6} \\log (-8 x-3)$\n", - "Output Answer": [ - "$\\frac{64 e^{-8 x-6} \\left(-16 x+(8 x+3)^2 \\log (-8 x-3)-7\\right)}{(8 x+3)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-6)*log(-8*x-3)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sqrt[3]{y-x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y-x}^2},\\frac{1}{3 \\sqrt[3]{y-x}^2}+e^z,-\\frac{\\sin \\left(\\frac{x}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = cos((x/y))\nh = cos((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-4 x-\\frac{15}{2}}-\\tan \\left(5-7 x^2\\right)$\n", - "Output Answer": [ - "$\\left(14-392 x^2 \\tan \\left(5-7 x^2\\right)\\right) \\sec ^2\\left(5-7 x^2\\right)+16 e^{-4 x-\\frac{15}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-4*x-(15/2))-tan(5-7*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan ^{-1}(7-8 x)}{\\log (2 x+8)}$\n", - "Output Answer": [ - "$\\frac{2 \\left(-\\frac{4 \\log (2 (x+4))}{(7-8 x)^2+1}-\\frac{\\tan ^{-1}(7-8 x)}{2 x+8}\\right)}{\\log ^2(2 (x+4))}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((atan(7-8*x))/(log(2*x+8))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\left(y^2-x\\right)^5$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n -5 \\left(y^2-x\\right)^4 & 10 y \\left(y^2-x\\right)^4 & 0 \\\\\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*z)\ng = (y**2-x)**5\nh = tan(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = x$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y*z)\ng = x\nh = atan(x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^2\\right)$, $g(x,y,z) = \\sin \\left(x^2+y\\right)$, and $h(x,y,z) = x^2+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{\\sqrt{x^4+1}} & 0 & 0 \\\\\n 2 x \\cos \\left(x^2+y\\right) & \\cos \\left(x^2+y\\right) & 0 \\\\\n 2 x & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(x**2)\ng = sin(x**2+y)\nh = x**2+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$1-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y\nh = x-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x$, and $h(x,y,z) = -\\sin \\left(x-y^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n -\\cos \\left(x-y^3\\right) & 3 y^2 \\cos \\left(x-y^3\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = x\nh = -sin(x-y**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(7 x^5+9\\right)+\\tan ^{-1}(6 x)$\n", - "Output Answer": [ - "$\\frac{35 x^4}{\\left(7 x^5+9\\right)^2+1}+\\frac{6}{36 x^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(7*x**5+9)+atan(6*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sinh (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+4)^2 (1152 \\sinh (4)+1280 \\cosh (4))+(x+4) (-1280 \\sinh (4)-1024 \\cosh (4))+1024 \\sinh (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sinh(x)\ng = x**5\nseries = f.subs(x, g).series(x, -4, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\sqrt[3]{y-z}$, and $h(x,y,z) = \\tanh \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y-z}^2} & -\\frac{1}{3 \\sqrt[3]{y-z}^2} \\\\\n \\frac{\\text{sech}^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\text{sech}^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+y)\ng = cbrt(y-z)\nh = tanh(x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(2-2 x^3\\right)-4 x-2$\n", - "Output Answer": [ - "$12 x \\left(3 x^3 \\sin \\left(2-2 x^3\\right)+\\cos \\left(2-2 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(2-2*x**3)-4*x-2\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^5+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 5 y^4 & 1 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y**5+z\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-6}-\\sin (1-2 x)$\n", - "Output Answer": [ - "$2 \\cos (1-2 x)-6 e^{-6 (x+1)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-6)-sin(1-2*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(z-y)^2}$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2}{(z-y)^3},-\\frac{1}{\\sqrt{1-x^2}}-\\frac{2}{(z-y)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z-y)**2))\ng = acos(x)\nh = acos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{2}{y^3}+\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(y**2))\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (8-4 x)}{\\sqrt{4-8 x}}$\n", - "Output Answer": [ - "$-\\frac{2 x-(x-2) \\log (8-4 x)-1}{2 (1-2 x)^{3/2} (x-2)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(8-4*x))/(sqrt(4-8*x))), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y-z}$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y-z)\ng = y\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\frac{1}{8 x^3}$\n", - "Output Answer": [ - "$\\frac{3}{12500}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S((1/(8*x**3)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x-5}$\n", - "Output Answer": [ - "$-2 e^{-2 x-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x-5), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\{0,\\sin (x)+1,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (4 x+7)-\\tan ^{-1}(8-9 x)$\n", - "Output Answer": [ - "$\\frac{9}{(8-9 x)^2+1}+4 \\cos (4 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4*x+7)-atan(8-9*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{6 x}{\\sqrt{-9 x^4+9 x^2-2}}$\n", - "Output Answer": [ - "$\\sin ^{-1}\\left(\\frac{1}{3} \\left(9-18 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((6*x)/(sqrt(-9*x**4+9*x**2-2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(2 x^5+4\\right)$\n", - "Output Answer": [ - "$-\\frac{40 x^3 \\left(x^{10}-6 x^5-15\\right)}{\\left(-4 x^{10}-16 x^5-15\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(2*x**5+4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$x^{3/2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = (x+z)^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{1}{y} & -\\frac{1}{z} \\\\\n 3 (x+z)^2 & 0 & 3 (x+z)^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = log((y/z))\nh = (x+z)**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,y \\cos (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^{10}$", - "Output Answer": [ - "$(x-1)^2 \\left(-45+\\tan ^3(1)+\\tan (1)\\right)+(x-1) \\left(\\tan ^2(1)-9\\right)-1+\\tan (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**10\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-8 x-3)-1$\n", - "Output Answer": [ - "$-\\frac{64}{(8 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-8*x-3)-1\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{2 \\sqrt{x^5}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**5)\ng = sqrt(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{16 x^3}{\\sqrt{1-4 \\left(2 x^4+1\\right)^2}}$\n", - "Output Answer": [ - "$-\\sin ^{-1}\\left(4 x^4+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((16*x**3)/(sqrt(1-4*(2*x**4+1)**2)))\nprint(integrate(f, x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x^4 y\\right)$", - "Output Answer": [ - "$-16 x^6 y^2 \\cos \\left(x^4 y\\right)-12 x^2 y \\sin \\left(x^4 y\\right)+x^8 \\left(-\\cos \\left(x^4 y\\right)\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**4*y)\nprint(laplacian(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(6 x^5+6\\right)+\\sin (1-8 x)$\n", - "Output Answer": [ - "$\\frac{30 x^4}{\\sqrt{1-36 \\left(x^5+1\\right)^2}}-8 \\cos (1-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(6*x**5+6)+sin(1-8*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{8 x-7}+\\cos ^{-1}(-2 x-4)$\n", - "Output Answer": [ - "$\\frac{8 (x+2)}{\\left(-4 x^2-16 x-15\\right)^{3/2}}+64 e^{8 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(8*x-7)+acos(-2*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x^2+4}+\\tan (6-3 x)$\n", - "Output Answer": [ - "$\\frac{x}{\\sqrt{x^2+4}}-3 \\sec ^2(6-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x**2+4)+tan(6-3*x), x))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-y \\sin (x y)+\\frac{1}{3 \\sqrt[3]{y}^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = cbrt(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{17 x}{2}-2\\right)$\n", - "Output Answer": [ - "$-\\frac{289}{(4-17 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((17*x)/2)-2)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$(x-4) \\left(2+\\tan ^2(4)\\right)+4+\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = (x-y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 2 (x-y) & -2 (x-y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = (x-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 z^2}$, $g(x,y,z) = (x+z)^2$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$-\\frac{2}{x^3 z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*z**2))\ng = (x+z)**2\nh = (1/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$-\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}}+e^y+\\frac{5 z^4}{z^{10}+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/x))\ng = math.e**y\nh = atan(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z (x-y))$, $g(x,y,z) = \\cos ^{-1}(z-y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(z-y)^2}},-\\frac{x-y}{\\sqrt{1-z^2 (x-y)^2}},-\\frac{z}{\\sqrt{1-z^2 (x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z*(x-y))\ng = acos(z-y)\nh = acos(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sinh (y)$", - "Output Answer": [ - "$5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = y**5\nh = sinh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{x z}}+z+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = y*z\nh = log(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{x^5 z^5}{y^5}$, and $h(x,y,z) = \\frac{y^5}{z^5}$", - "Output Answer": [ - "$-\\frac{5 x^5 z^5}{y^6}+3 x^2-\\frac{5 y^5}{z^6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = ((x**5*z**5)/(y**5))\nh = ((y**5)/(z**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos \\left(x y^3\\right)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n -y^3 \\sin \\left(x y^3\\right) & -3 x y^2 \\sin \\left(x y^3\\right) & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = cos(x*y**3)\nh = cos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\tan \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = tan((x/z))\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = y^{15}$", - "Output Answer": [ - "$\\left\\{15 y^{14},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = x-z^4$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = (x-y)^3$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n 3 (x-y)^2 & -3 (x-y)^2 & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = (x-y)**3\nh = tan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = (x-z)^4$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{4 (x-z)^3,0,4 (x-z)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = (x-z)**4\nh = (x-z)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-4 x-\\frac{8}{3}}-\\tan ^{-1}(5-4 x)$\n", - "Output Answer": [ - "$\\frac{32 (5-4 x)}{\\left((5-4 x)^2+1\\right)^2}-\\frac{4}{\\left(-4 x-\\frac{8}{3}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-4*x-(8/3))-atan(5-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^{3/2}}$, $g(x,y,z) = \\cos (x z)$, and $h(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n -z \\sin (x z) & 0 & -x \\sin (x z) \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**(3/2)))\ng = cos(x*z)\nh = sin((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(z^4 \\left(x-y^4\\right)\\right)$\n", - "Output Answer": [ - "$\\left\\{-z^4 \\sin \\left(z^4 \\left(x-y^4\\right)\\right),4 y^3 z^4 \\sin \\left(z^4 \\left(x-y^4\\right)\\right),-4 z^3 \\left(x-y^4\\right) \\sin \\left(z^4 \\left(x-y^4\\right)\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z**4*(x-y**4))\nprint(gradient(f))\n" - ], - "split": "train" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(\\frac{5 x}{2}\\right)$ on the interval $x = 0$ to $x = 6$\n", - "Output Answer": [ - "$\\int_0^6 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((5*x)/2))\na = 0\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5 y\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$5 x^4 y \\cos \\left(x^5 y\\right)+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5*y)\ng = y\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$8 x^4+e^{-4 x^2-2}+3$\n", - "Output Answer": [ - "$e^{-4 x^2-2} \\left(32 \\left(3 e^{4 x^2+2}+2\\right) x^2-8\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 8*x**4+math.e**(-4*x**2-2)+3\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (1-6 x)$\n", - "Output Answer": [ - "$36 \\sin (1-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(1-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\cos (x+z)+\\frac{1}{y}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z)\ng = log(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt[3]{z^5}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y}-\\frac{5 z^4}{3 \\sqrt[3]{z^5}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cbrt(z**5)\nh = cbrt(z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y^5$, $g(x,y,z) = e^{z^3}$, and $h(x,y,z) = x y z^3$", - "Output Answer": [ - "$5 x^4 y^5+3 x y z^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y**5\ng = math.e**(z**3)\nh = x*y*z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(7 x^3+7\\right)$\n", - "Output Answer": [ - "$441 x^4 \\sin \\left(7 \\left(x^3+1\\right)\\right)-42 x \\cos \\left(7 \\left(x^3+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7*x**3+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\{1,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6-3 x) \\cos \\left(8 x^2+1\\right)$\n", - "Output Answer": [ - "$3 \\sin (6-3 x) \\cos \\left(8 x^2+1\\right)-16 x \\sin \\left(8 x^2+1\\right) \\cos (6-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6-3*x)*cos(8*x**2+1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{z^4}{x}\\right)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = y+z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z^4}{x^2 \\left(1-\\frac{z^8}{x^2}\\right)} & 0 & \\frac{4 z^3}{x \\left(1-\\frac{z^8}{x^2}\\right)} \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 0 & 1 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh((z**4)/x)\ng = cbrt(x*y)\nh = y+z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{42 x}{\\sqrt{5} \\sqrt{42 x^2-41}}-\\frac{5346}{625} x \\left(11 x^2+4\\right)^4$\n", - "Output Answer": [ - "$\\frac{\\sqrt{42 x^2-41}}{\\sqrt{5}}-\\frac{243 \\left(11 x^2+4\\right)^5}{3125}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((42*x)/(sqrt(5)*sqrt(42*x**2-41)))-(5346/625)*x*(11*x**2+4)**4\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$5 x^4-\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sin((z/y))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(x z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z^5}{\\sqrt{1-x^2 z^{10}}},0,\\frac{5 x z^4}{\\sqrt{1-x^2 z^{10}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*z**5)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = e^{z-x}$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\left\\{-e^{z-x}-\\frac{2}{y^3},0,-e^{z-x}-5 y^4\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = math.e**(z-x)\nh = math.e**(z-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$-i \\sqrt{2} \\sqrt{x-1} (-1)^{\\left\\lfloor -\\frac{\\arg (x-1)}{2 \\pi }\\right\\rfloor }+(x-1) \\cos (1)+\\frac{\\pi }{2}+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y+z}$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,e^{y+z},-e^{y+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y+z)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(8-3 x^5\\right)-\\tan ^{-1}\\left(\\frac{9}{2}-\\frac{x^4}{2}\\right)$\n", - "Output Answer": [ - "$x^3 \\left(\\frac{8}{x^8-18 x^4+85}-15 x \\cos \\left(8-3 x^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(8-3*x**5)-atan((9/2)-((x**4)/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = e^y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z^5}$, $g(x,y,z) = \\sqrt{y^4}$, and $h(x,y,z) = x^2 y^8$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{5 z^4}{3 \\sqrt[3]{z^5}^2} \\\\\n 0 & \\frac{2 y^3}{\\sqrt{y^4}} & 0 \\\\\n 2 x y^8 & 8 x^2 y^7 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z**5)\ng = sqrt(y**4)\nh = x**2*y**8\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (1)-\\sin (4)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(1)-sin(4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x^2-8} \\tan \\left(e^{2 x-3}\\right)$\n", - "Output Answer": [ - "$2 e^{2 x^2-11} \\left(e^{2 x}+e^3 x \\sin \\left(2 e^{2 x-3}\\right)\\right) \\sec ^2\\left(e^{2 x-3}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x**2-8)*tan(math.e**(2*x-3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = cos(y)\nh = y**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^4$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\tan \\left(z^4\\right)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}+4 z^3 \\sec ^2\\left(z^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**4\ng = asin(y)\nh = tan(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-13 x \\sin \\left(\\frac{13 x^2}{2}+8\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{13 x^2}{2}+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -13*x*sin(((13*x**2)/2)+8)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{z \\sqrt{1-\\frac{y^2}{z^2}}} & -\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}} \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y/z)\ng = (1/(y**(3/2)))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{x}{z^2 \\sqrt{1-\\frac{x^2}{z^2}}}+2 y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2\nh = asin(x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(6 x+8)-\\sqrt{4-6 x}$\n", - "Output Answer": [ - "$\\frac{9}{(4-6 x)^{3/2}}-\\frac{36 (6 x+8)}{\\left(1-4 (3 x+4)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(6*x+8)-sqrt(4-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (9-x)}{\\sqrt{8-x}}$\n", - "Output Answer": [ - "$\\frac{\\sin (9-x)+2 (x-8) \\cos (9-x)}{2 (8-x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(9-x))/(sqrt(8-x))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{2401 x^4}-\\cos \\left(5 x^2+2\\right)$\n", - "Output Answer": [ - "$\\frac{20}{2401 x^6}+10 \\sin \\left(5 x^2+2\\right)+100 x^2 \\cos \\left(5 x^2+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(2401*x**4))-cos(5*x**2+2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{5 y^4}{y^{10}+1} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = atan(y**5)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (x-6)}{\\log (6 x-1)}$\n", - "Output Answer": [ - "$\\frac{\\frac{6 \\log (x-6)}{1-6 x}+\\frac{\\log (6 x-1)}{x-6}}{\\log ^2(6 x-1)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(x-6))/(log(6*x-1))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\left(z^3\\right)^{3/2}$", - "Output Answer": [ - "$\\cosh (y)+\\frac{9}{2} \\sqrt{z^3} z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = sinh(y)\nh = (z**3)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-5 x^4}$\n", - "Output Answer": [ - "$\\frac{10 x^2 \\left(5 x^4-3\\right)}{\\left(1-5 x^4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-5*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z^5}$, $g(x,y,z) = e^{x z^5}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{-5 x z^4 e^{x z^5},5 e^{z^5} z^4,z^5 e^{x z^5}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z**5)\ng = math.e**(x*z**5)\nh = math.e**(x*z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-(x+z)^2}},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-x},\\frac{1}{y-x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (y)$, $g(x,y,z) = \\sqrt{x z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{2 \\sqrt{x z}},0,\\frac{z}{2 \\sqrt{x z}}-\\sinh (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y)\ng = sqrt(x*z)\nh = sqrt(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7-7 x)+\\tan ^{-1}(x+8)$\n", - "Output Answer": [ - "$\\frac{1}{(x+8)^2+1}+\\frac{1}{x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7-7*x)+atan(x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(5 x^5+8\\right)$\n", - "Output Answer": [ - "$\\frac{10 x^3 \\left(15 x^{10}+8 x^5-26\\right)}{\\left(5 x^{10}+16 x^5+13\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(5*x**5+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(x^4+3\\right)+\\cos (5-3 x)$\n", - "Output Answer": [ - "$4 x^3 \\cos \\left(x^4+3\\right)+3 \\sin (5-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(x**4+3)+cos(5-3*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (6-7 x)-\\sin (3 x)$\n", - "Output Answer": [ - "$49 \\sin (6-7 x)+9 \\sin (3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(6-7*x)-sin(3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{1-x^2 z^2}}+5 y^4+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*z)\ng = y**5\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(x^3+z\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{x^3}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 \\cos \\left(x^3+z\\right) & 0 & \\cos \\left(x^3+z\\right) \\\\\n -\\frac{3 x^2}{2 \\left(x^3\\right)^{3/2}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x**3+z)\ng = (1/(sqrt(x**3)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^5\\right)$, $g(x,y,z) = \\frac{y}{x^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{5 y}{x^6}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**5)\ng = (y/(x**5))\nh = (y/(x**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{y}}{2}+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**(3/2)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y^5 z^5$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{y \\left(-e^{y z}\\right),5 x^5 y^5 z^4-\\frac{1}{x},-5 x^5 y^4 z^5\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y**5*z**5\ng = math.e**(y*z)\nh = math.e**(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x z^2\\right)$, $g(x,y,z) = x^2$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{2}{z} \\\\\n 2 x & 0 & 0 \\\\\n 0 & 0 & -\\frac{z}{\\left(z^2\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z**2)\ng = x**2\nh = (1/(sqrt(z**2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = log(y+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x-z)$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{1-(x-z)^2},-\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x-z)\ng = acos(x)\nh = acos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\cos \\left(z^5\\right)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{y}}{2}+\\frac{1}{y}-5 z^4 \\sin \\left(z^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = y**(3/2)\nh = cos(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^6$", - "Output Answer": [ - "$\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**6\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{7 x^2-9}-\\tan \\left(7-2 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{14 x}{\\left(9-7 x^2\\right)^2}+10 x^4 \\sec ^2\\left(7-2 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(7*x**2-9))-tan(7-2*x**5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y z)$, $g(x,y,z) = \\frac{y^3}{x^3}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},y \\cos (y z),-\\frac{3 y^3}{x^4}-z \\cos (y z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y*z)\ng = ((y**3)/(x**3))\nh = ((y**3)/(x**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{5 x^2}{2}+\\frac{7}{2}\\right)-\\frac{1}{\\left(\\frac{17}{2}-\\frac{13 x}{2}\\right)^3}$\n", - "Output Answer": [ - "$-5 x \\sin \\left(\\frac{1}{2} \\left(5 x^2+7\\right)\\right)-\\frac{312}{(17-13 x)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((5*x**2)/2)+(7/2))-(1/(((17/2)-((13*x)/2))**3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (y+z)^5$, $g(x,y,z) = (y+z)^2$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n 0 & 2 (y+z) & 2 (y+z) \\\\\n 4 x^3 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y+z)**5\ng = (y+z)**2\nh = x**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x-y}{z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x-y}{z}\\right)}{z} & -\\frac{\\cos \\left(\\frac{x-y}{z}\\right)}{z} & -\\frac{(x-y) \\cos \\left(\\frac{x-y}{z}\\right)}{z^2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(((x-y)/z))\ng = y\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\cos (x-y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 0 & 1 \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n -\\sin (x-y-z) & \\sin (x-y-z) & \\sin (x-y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z-x\ng = cbrt(x*y)\nh = cos(x-y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^y$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^y & 0 \\\\\n 1 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**y\ng = x+y\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$16 x \\cos \\left(1-8 x^2\\right)-\\frac{4 x}{\\left(7-2 x^2\\right)^2}$\n", - "Output Answer": [ - "$-\\frac{1}{7-2 x^2}-\\sin \\left(1-8 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 16*x*cos(1-8*x**2)-((4*x)/((7-2*x**2)**2))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos ^{-1}(z-y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(z-y)^2}} & -\\frac{1}{\\sqrt{1-(z-y)^2}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = acos(z-y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\log (x z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,\\frac{1}{x}+\\sin (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = log(x*z)\nh = log(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{e^{-\\frac{3 x}{2}-\\frac{5}{2}}}-e^{\\frac{3}{2}-9 x}$\n", - "Output Answer": [ - "$9 e^{\\frac{3}{2}-9 x}-\\frac{3}{4} \\sqrt{e^{-\\frac{3 x}{2}-\\frac{5}{2}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(math.e**(-((3*x)/2)-(5/2)))-math.e**((3/2)-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x+y}{z}$, $g(x,y,z) = \\frac{1}{x+z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(x+z)^2},-\\frac{x+y}{z^2},-\\frac{1}{(x+z)^2}-\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/z)\ng = (1/(x+z))\nh = (1/(x+z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((z/x))\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x+y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\{0,0,-\\sinh (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x+y)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (x+7)$\n", - "Output Answer": [ - "$2 \\tan (x+7) \\sec ^2(x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\tanh (y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\text{sech}^2(y-z),0,-\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = tanh(y-z)\nh = tanh(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3 y^3$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 y^3 & 3 x^3 y^2 & 0 \\\\\n 0 & 1 & -1 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3*y**3\ng = y-z\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(8 x^3+2\\right)$\n", - "Output Answer": [ - "$48 x \\left(24 x^3 \\tan \\left(8 x^3+2\\right)+1\\right) \\sec ^2\\left(8 x^3+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8*x**3+2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^5}{y^5}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh \\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{y^5} & -\\frac{5 x^5}{y^6} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 4 z^3 \\cosh \\left(z^4\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**5)/(y**5))\ng = y\nh = sinh(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\sec ^2(y)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y*z)\ng = tan(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (5) \\cos (8)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5)*cos(8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-2 x} \\left(5-3 x^5\\right)^4$\n", - "Output Answer": [ - "$-2 e^{2-2 x} \\left(3 x^5-5\\right)^3 \\left(3 x^5-30 x^4-5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-2*x)*(5-3*x**5)**4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**4\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{z^8}{y^2}$, and $h(x,y,z) = \\sin ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{8 z^7}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = ((z**8)/(y**2))\nh = ((z**8)/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(2 x+2)^4 \\log (7 x-2)$\n", - "Output Answer": [ - "$8 (x+1)^3 \\left(\\frac{14 (x+1)}{7 x-2}+8 \\log (7 x-2)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2*x+2)**4*log(7*x-2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{y}+\\sec ^2(y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = tan(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\sqrt[3]{\\frac{x^2}{z}}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{\\frac{x^2}{3 z^2 \\sqrt[3]{\\frac{x^2}{z}}^2}+1,-\\frac{3}{2 z^{5/2}},\\frac{2 x}{3 z \\sqrt[3]{\\frac{x^2}{z}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = cbrt((x**2)/z)\nh = cbrt((x**2)/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = x y z$, and $h(x,y,z) = \\tan (z (x+y))$", - "Output Answer": [ - "$3 x^2+(x+y) \\sec ^2(z (x+y))+x z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = x*y*z\nh = tan(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8-\\frac{3 x}{2}\\right)-\\cos ^{-1}\\left(-\\frac{7 x}{2}-\\frac{9}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{7} (7 x+9)}{\\left(-7 x^2-18 x-11\\right)^{3/2}}-\\frac{9}{(16-3 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8-((3*x)/2))-acos(-((7*x)/2)-(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^3$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 3 z^2 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**3\ng = cbrt(y)\nh = cos(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(y^4-z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{4 y^3}{y^4-z^4},-\\frac{4 z^3}{y^4-z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y**4-z**4)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$-\\sin (y)-\\frac{2}{z^3}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y^5+z\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{x}}$, and $h(x,y,z) = \\cos ^{-1}\\left(y^5\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{5 y^4}{\\sqrt{1-y^{10}}},\\cos \\left(y^5+z\\right),-\\frac{1}{2 x^{3/2}}-5 y^4 \\cos \\left(y^5+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**5+z)\ng = (1/(sqrt(x)))\nh = (1/(sqrt(x)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $x^4$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = x**4\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = y**4\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$3 y^2+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = y**3\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = math.e**y\nh = tan((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (3 x)$ on the interval $x = 3$ to $x = 5$\n", - "Output Answer": [ - "$-\\sqrt{10}+\\sqrt{26}+\\tanh ^{-1}\\left(\\sqrt{10}\\right)-\\tanh ^{-1}\\left(\\sqrt{26}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x)\na = 3\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin (x+y-z)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\cos (x+y-z)+\\frac{1}{x}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sin(x+y-z)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = x\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (x-z)$, $g(x,y,z) = x+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z-\\sec ^2(x-z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-z)\ng = x+z\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-\\frac{13 x}{2}-\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{169}{(13 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((13*x)/2)-(3/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n 0 & 1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = log(y+z)\nh = y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\tan ^{-1}\\left(x^4\\right)$", - "Output Answer": [ - "$(x-1)^2 \\left(-1-\\frac{\\sin (1)}{2}\\right)+(x-1) (2+\\cos (1))+\\frac{\\pi }{4}+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = atan(x**4)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan (x y+z)$", - "Output Answer": [ - "$2 x^2 \\tan (x y+z) \\sec ^2(x y+z)+2 y^2 \\tan (x y+z) \\sec ^2(x y+z)+2 \\tan (x y+z) \\sec ^2(x y+z)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y+z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x-4}-\\tan (6 x+3)$\n", - "Output Answer": [ - "$-4 e^{-4 (x+1)}-6 \\sec ^2(6 x+3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x-4)-tan(6*x+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = z-y$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & -1 & 1 \\\\\n 1 & -1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y)\ng = z-y\nh = x-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-2 x}+\\cos \\left(\\frac{9}{2}-8 x\\right)$\n", - "Output Answer": [ - "$8 \\sin \\left(\\frac{9}{2}-8 x\\right)-\\frac{1}{\\sqrt{7-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-2*x)+cos((9/2)-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{4 (x+2)}{5}-2+\\tan ^{-1}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = atan(x)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{6 x}{5}-2\\right)^5+\\tan \\left(\\frac{4}{5}-5 x\\right)$\n", - "Output Answer": [ - "$\\frac{144}{5} \\left(\\frac{6 x}{5}-2\\right)^3+50 \\tan \\left(\\frac{4}{5}-5 x\\right) \\sec ^2\\left(\\frac{4}{5}-5 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (((6*x)/5)-2)**5+tan((4/5)-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-5 x)$ on the interval $x = 4$ to $x = 9$\n", - "Output Answer": [ - "$-\\sqrt{17}+\\sqrt{82}+\\tanh ^{-1}\\left(\\sqrt{17}\\right)-\\tanh ^{-1}\\left(\\sqrt{82}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-5*x)\na = 4\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^3}$, $g(x,y,z) = \\cosh (x)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**3)\ng = cosh(x)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(7 x^3+4\\right)$\n", - "Output Answer": [ - "$-42 x \\left(21 x^3 \\tan \\left(7 x^3+4\\right)+1\\right) \\sec ^2\\left(7 x^3+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(7*x**3+4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x+8}-\\cosh \\left(8 x^2+7\\right)$\n", - "Output Answer": [ - "$-16 \\sinh \\left(8 x^2+7\\right)-256 x^2 \\cosh \\left(8 x^2+7\\right)-\\frac{1}{2 (x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x+8)-cosh(8*x**2+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{e^{y/z}}{z} & -\\frac{y e^{y/z}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = sin(y)\nh = math.e**(y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = x^3$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = x**3\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-z}$, $g(x,y,z) = y$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-z}^2} & 0 & -\\frac{1}{3 \\sqrt[3]{x-z}^2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 2 y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-z)\ng = y\nh = y**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan ^{-1}(x-y-z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x-y-z)^2+1},-\\frac{1}{(x-y-z)^2+1}-\\frac{1}{\\sqrt{1-z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^5$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left\\{0,5 (x+z)^4-\\frac{1}{3 \\sqrt[3]{x}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**5\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{15 x}{2}+\\frac{3}{2}\\right)+\\tan (5-7 x)$\n", - "Output Answer": [ - "$\\frac{15}{2} \\cos \\left(\\frac{3}{2} (5 x+1)\\right)-7 \\sec ^2(5-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(((15*x)/2)+(3/2))+tan(5-7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = -\\tan ^{-1}(y-z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n 0 & -\\frac{1}{(y-z)^2+1} & \\frac{1}{(y-z)^2+1} \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**(3/2)\ng = -atan(y-z)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (4 x+6)-\\log (-x-4)$\n", - "Output Answer": [ - "$4 \\cos (4 x+6)-\\frac{1}{x+4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4*x+6)-log(-x-4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sqrt(z)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$2 y+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(z)\ng = y**2\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x}-\\cos ^{-1}\\left(4 x^5-5\\right)$\n", - "Output Answer": [ - "$\\frac{20 x^4}{\\sqrt{1-\\left(5-4 x^5\\right)^2}}+5 e^{5 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x)-acos(4*x**5-5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^5\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-4) \\left(1-1280 \\sin (1024)+\\tan ^2(4)\\right)+\\cos (1024)+\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**5)\ng = tan(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{5 x}{2}+\\frac{9}{2}}$\n", - "Output Answer": [ - "$-\\frac{25}{16 \\left(\\frac{5 x}{2}+\\frac{9}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((5*x)/2)+(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z^2}$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = x+y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 y^{3/2}}+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\left(\\frac{x}{y}+z\\right)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{z \\sqrt{\\frac{x}{z}-1} \\sqrt{\\frac{x}{z}+1}} & 0 & -\\frac{x}{z^2 \\sqrt{\\frac{x}{z}-1} \\sqrt{\\frac{x}{z}+1}} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n \\frac{2 \\left(\\frac{x}{y}+z\\right)}{y} & -\\frac{2 x \\left(\\frac{x}{y}+z\\right)}{y^2} & 2 \\left(\\frac{x}{y}+z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x/z)\ng = log(y)\nh = ((x/y)+z)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sinh (x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n x^{4/3} & x>0 \\\\\n -\\sqrt[3]{-x} x & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sinh(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x z}$, $g(x,y,z) = \\tanh ^{-1}(z)$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2 z} & \\frac{1}{x z} & -\\frac{y}{x z^2} \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/(x*z))\ng = atanh(z)\nh = cbrt(y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x^5}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sinh \\left(x^5+z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5}{x} & \\frac{1}{y} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 5 x^4 \\cosh \\left(x^5+z\\right) & 0 & \\cosh \\left(x^5+z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((y/(x**5)))\ng = sin(y)\nh = sinh(x**5+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\sqrt{z-x}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z-x}},\\frac{1}{3 \\sqrt[3]{x+z}^2},-\\frac{1}{2 \\sqrt{z-x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = sqrt(z-x)\nh = sqrt(z-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (6 x) \\sin (9 x+7)$\n", - "Output Answer": [ - "$-\\frac{\\sin (9 x+7)+9 x \\log (6 x) \\cos (9 x+7)}{x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(6*x)*sin(9*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (7 x+6)-\\sin \\left(2-6 x^4\\right)$\n", - "Output Answer": [ - "$576 x^6 \\sin \\left(2-6 x^4\\right)+72 x^2 \\cos \\left(2-6 x^4\\right)+98 \\tan (7 x+6) \\sec ^2(7 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(7*x+6)-sin(2-6*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(z-x)^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z \\sin \\left(\\frac{z}{x}\\right)}{x^2}-\\frac{2}{(z-x)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z-x)**2))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cbrt(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x^4+5} \\tan (2-8 x)$\n", - "Output Answer": [ - "$2 e^{7 x^4+5} \\left(7 x^3 \\sin (4-16 x)-4\\right) \\sec ^2(2-8 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x**4+5)*tan(2-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x y^2\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -y^2 \\sin \\left(x y^2\\right) & -2 x y \\sin \\left(x y^2\\right) & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*y**2)\ng = y**2\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\tanh (x z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},1-z \\text{sech}^2(x z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y-z^4}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\tan \\left(\\frac{y}{z^4}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{y}{z^4}\\right)}{z^4},-\\frac{2 z^3}{\\sqrt{x+y-z^4}},-\\frac{1}{2 \\sqrt{x+y-z^4}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y-z**4)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = tan(z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-2 x^2-3}$\n", - "Output Answer": [ - "$4 e^{-2 x^2-3} \\left(4 x^2-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-2*x**2-3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\sin (z (x-y))$", - "Output Answer": [ - "$\\{-z \\cos (z (x-y))-\\cos (z),-z \\cos (z (x-y)),1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = sin(z)\nh = sin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(8 x-\\frac{5}{2}\\right)^3}+\\sin \\left(\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{768}{\\left(8 x-\\frac{5}{2}\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8*x-(5/2))**3))+sin((3/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6-7 x}$\n", - "Output Answer": [ - "$-\\frac{49}{4 (6-7 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x}{y^3}+z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{x}{y^3}+z}}{y^3},-\\frac{3 x e^{\\frac{x}{y^3}+z}}{y^4},e^{\\frac{x}{y^3}+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x/(y**3))+z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$-2 \\sqrt{5} x$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-2*sqrt(5)*x)\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (8 x-6) \\sin (6 x+8)$\n", - "Output Answer": [ - "$\\frac{4 \\sin (6 x+8)}{4 x-3}+6 \\log (8 x-6) \\cos (6 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8*x-6)*sin(6*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x+4}+\\sqrt{7 x-1}$\n", - "Output Answer": [ - "$-\\frac{49}{4 (7 x-1)^{3/2}}-\\frac{25}{4 (5 x+4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x+4)+sqrt(7*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z^2}$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\frac{y}{z^2}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z^2},\\frac{2 x z}{3 \\sqrt[3]{x z^2}^2},-\\frac{1}{x^2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z**2)\ng = (1/(x*y))\nh = (1/(x*y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sqrt{\\frac{x z}{y}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{x z}{2 y^2 \\sqrt{\\frac{x z}{y}}}+\\frac{\\sec ^2\\left(\\frac{x}{z}\\right)}{z}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/z))\ng = sqrt(((x*z)/y))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = y-z$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{2,-\\frac{x}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = log(y+z)\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y^3}+z\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{27 x^2}{4 y^8 \\sqrt{\\frac{x}{y^3}+z}}+\\frac{18 x \\sqrt{\\frac{x}{y^3}+z}}{y^5}+\\frac{3}{4 y^6 \\sqrt{\\frac{x}{y^3}+z}}+\\frac{3}{4 \\sqrt{\\frac{x}{y^3}+z}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/(y**3))+z)**(3/2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left\\{\\sin (z),-3 x^2-\\sin (x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z)\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 2 x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = cbrt(x+y)\nh = x**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = atan(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^2$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{y}{x^4}\\right)^{3/2}}$, $g(x,y,z) = \\sqrt[3]{y+z^2}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{3 \\sqrt[3]{y+z^2}^2},0,\\frac{3}{2 x^4 \\left(\\frac{y}{x^4}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y/(x**4))**(3/2)))\ng = cbrt(y+z**2)\nh = cbrt(y+z**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = (y-z)^4$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left\\{4 (y-z)^3,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = (y-z)**4\nh = (y-z)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(y+z)^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 (y+z)^{5/2}},-\\frac{x}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $x^5$", - "Output Answer": [ - "$648 e^3 (x-3)+243 e^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = x**5\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{(x-y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atan(x-y)\nh = atan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = tan(y)\nh = tan((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y z}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{x y}{3 \\sqrt[3]{x y z}^2},-\\frac{x z}{3 \\sqrt[3]{x y z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y*z)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^{y^4}$, and $h(x,y,z) = y^4+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 4 e^{y^4} y^3 & 0 \\\\\n 0 & 4 y^3 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = math.e**(y**4)\nh = y**4+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{9} \\cos \\left(\\frac{x}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((x/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(z \\left(x^5+y^4\\right)\\right)$", - "Output Answer": [ - "$-25 x^8 z^2 \\cos \\left(z \\left(x^5+y^4\\right)\\right)-16 y^6 z^2 \\cos \\left(z \\left(x^5+y^4\\right)\\right)-20 x^3 z \\sin \\left(z \\left(x^5+y^4\\right)\\right)-12 y^2 z \\sin \\left(z \\left(x^5+y^4\\right)\\right)-\\left(x^5+y^4\\right)^2 \\cos \\left(z \\left(x^5+y^4\\right)\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z*(x**5+y**4))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$x-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = x*y\nh = cos((y/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x+y^3\\right)$, $g(x,y,z) = \\log \\left(y^3 z\\right)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2\\left(x+y^3\\right) & 3 y^2 \\sec ^2\\left(x+y^3\\right) & 0 \\\\\n 0 & \\frac{3}{y} & \\frac{1}{z} \\\\\n 3 x^2 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+y**3)\ng = log(y**3*z)\nh = x**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = atan(z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x-z)$, $g(x,y,z) = \\cos ^{-1}(y+z)$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x-z) & 0 & -\\cosh (x-z) \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y+z)^2}} & -\\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x-z)\ng = acos(y+z)\nh = log(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-x}-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},\\frac{1}{y-x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(y/z)\nh = acos(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{z}{y^4}\\right)$", - "Output Answer": [ - "$\\frac{32 z^2 \\tan \\left(\\frac{z}{y^4}\\right) \\sec ^2\\left(\\frac{z}{y^4}\\right)}{y^{10}}+\\frac{20 z \\sec ^2\\left(\\frac{z}{y^4}\\right)}{y^6}+\\frac{2 \\tan \\left(\\frac{z}{y^4}\\right) \\sec ^2\\left(\\frac{z}{y^4}\\right)}{y^8}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((z/(y**4)))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = -\\sinh (x-z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n -\\cosh (x-z) & 0 & \\cosh (x-z) \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = -sinh(x-z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log(z)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$-\\sin (x+y)+\\frac{1}{x+z}+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y)\ng = y*z\nh = log(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^{3/2}$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x+z}}{2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**(3/2)\ng = z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^2}$ and $g(x) = $x^{10}$", - "Output Answer": [ - "$\\frac{404}{9} (x-1)^2+\\frac{32 (x-1)}{3}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**2)\ng = x**10\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{e^{7-3 x}}{(4-7 x)^5}$\n", - "Output Answer": [ - "$-\\frac{3 e^{7-3 x} \\left(147 x^2+322 x+258\\right)}{(7 x-4)^7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(7-3*x))/((4-7*x)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x^5+6}+\\frac{1}{(5-3 x)^5}$\n", - "Output Answer": [ - "$40 e^{8 x^5+6} x^4+\\frac{15}{(5-3 x)^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x**5+6)+(1/((5-3*x)**5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\sin \\left(x^5-y-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & \\sinh (y) & 0 \\\\\n 5 x^4 \\cos \\left(x^5-y-z\\right) & -\\cos \\left(x^5-y-z\\right) & -\\cos \\left(x^5-y-z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(z)\ng = cosh(y)\nh = sin(x**5-y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin \\left(x^3\\right)}{\\log \\left(9-7 x^3\\right)}$\n", - "Output Answer": [ - "$\\frac{3 x^2 \\left(\\frac{7 \\sin \\left(x^3\\right)}{9-7 x^3}+\\log \\left(9-7 x^3\\right) \\cos \\left(x^3\\right)\\right)}{\\log ^2\\left(9-7 x^3\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(x**3))/(log(9-7*x**3))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3-x)+\\tan (2 x+5)$\n", - "Output Answer": [ - "$\\sin (3-x)+2 \\sec ^2(2 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3-x)+tan(2*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(x^4+5\\right)-\\cos \\left(x^5+4\\right)$\n", - "Output Answer": [ - "$5 x^4 \\sin \\left(x^5+4\\right)-\\frac{4 x^3}{\\sqrt{1-\\left(x^4+5\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(x**4+5)-cos(x**5+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-\\frac{1}{2} (x-4)^2 \\sin (4)+(x-4) \\cos (4)+\\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-4 x-8)-\\sqrt{-\\frac{22 x}{3}-\\frac{1}{3}}$\n", - "Output Answer": [ - "$\\frac{121}{\\sqrt{3} (-22 x-1)^{3/2}}-\\frac{1}{(x+2)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x-8)-sqrt(-((22*x)/3)-(1/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\tan ^{-1}(x y z)$", - "Output Answer": [ - "$\\frac{x y}{x^2 y^2 z^2+1}+\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y*z)\ng = (y/x)\nh = atan(x*y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = y\nh = (x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}-\\frac{2}{(y+z)^3}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = tan(y)\nh = (1/((y+z)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (x z)$, and $h(x,y,z) = \\frac{1}{\\left(y^5-z\\right)^{3/2}}$", - "Output Answer": [ - "$\\cos (x)+\\frac{3}{2 \\left(y^5-z\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = tan(x*z)\nh = (1/((y**5-z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z (x-y)$, $g(x,y,z) = (y-x)^5$, and $h(x,y,z) = \\tan (x y)$", - "Output Answer": [ - "$\\left\\{x \\sec ^2(x y),-y \\sec ^2(x y)+x-y,z-5 (y-x)^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z*(x-y)\ng = (y-x)**5\nh = (y-x)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(x^3\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x^2}{\\sqrt{1-x^6}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**3)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = sin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$4 x^3+\\frac{\\cos \\left(\\frac{y}{z}\\right)}{z}+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = sin((y/z))\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+e^y+\\frac{1}{1-z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = math.e**y\nh = atanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x+y^5+z\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\sin \\left(x+y^5+z\\right),-5 y^4 \\sin \\left(x+y^5+z\\right),-\\sin \\left(x+y^5+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+y**5+z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{y z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2 z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(3-\\frac{13 x}{2}\\right)+e^2$\n", - "Output Answer": [ - "$\\frac{13}{\\sqrt{-169 x^2+156 x-32}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(acos(3-((13*x)/2))+math.e**2, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{26 x}{5}+\\frac{42}{5}}-\\sqrt{2 x-\\frac{2}{5}}$\n", - "Output Answer": [ - "$\\frac{26}{5} e^{\\frac{26 x}{5}+\\frac{42}{5}}-\\frac{1}{\\sqrt{2 x-\\frac{2}{5}}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((26*x)/5)+(42/5))-sqrt(2*x-(2/5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = y\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^2\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**2)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = y\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$3 (x+y)^2+5 y^4-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**3\ng = y**5\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^3+y}}$, $g(x,y,z) = \\sin \\left(x^3\\right)$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 x^2}{2 \\left(x^3+y\\right)^{3/2}} & -\\frac{1}{2 \\left(x^3+y\\right)^{3/2}} & 0 \\\\\n 3 x^2 \\cos \\left(x^3\\right) & 0 & 0 \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x**3+y)))\ng = sin(x**3)\nh = cbrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\tan ^{-1}\\left(2 x^2\\right)$\n", - "Output Answer": [ - "$-\\frac{3736504039920}{97851718812512501}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(atan(2*x**2))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8-7 x}-\\tan (2 x+1)$\n", - "Output Answer": [ - "$-\\frac{49}{4 (8-7 x)^{3/2}}-8 \\tan (2 x+1) \\sec ^2(2 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8-7*x)-tan(2*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = x^4 y^4$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 x^{3/2}},4 x^3 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = x**4*y**4\nh = x**4*y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8 x+\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{256}{(16 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8*x+(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{29 x}{5}-\\frac{7}{5}\\right)-\\cos \\left(\\frac{11 x}{5}+\\frac{23}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{29}{29 x-7}+\\frac{11}{5} \\sin \\left(\\frac{1}{5} (11 x+23)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((29*x)/5)-(7/5))-cos(((11*x)/5)+(23/5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x^4-y-z\\right)$\n", - "Output Answer": [ - "$\\left\\{4 x^3 \\cos \\left(x^4-y-z\\right),-\\cos \\left(x^4-y-z\\right),-\\cos \\left(x^4-y-z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4-y-z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\sqrt{x^3}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1,\\frac{1}{2 \\sqrt{y+z}},\\frac{3 x^2}{2 \\sqrt{x^3}}-\\frac{1}{2 \\sqrt{y+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = sqrt(x**3)\nh = sqrt(x**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-8 x^3-7}+\\cos (6-6 x)$\n", - "Output Answer": [ - "$6 \\left(\\sin (6-6 x)-4 e^{-8 x^3-7} x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-8*x**3-7)+cos(6-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-4) \\left(-\\frac{16}{17}-\\tan ^2(4)\\right)+\\tan ^{-1}(4)-\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-\\sin (2 x+7))+1$\n", - "Output Answer": [ - "$2 \\cot (2 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-sin(2*x+7))+1, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\frac{x^5}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{x^5}{y^2},-\\frac{5 x^4}{y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5)\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,-\\sin (y+z),\\sin (y+z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y+z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$\\frac{1}{4} (x+2) \\left(1+\\tan ^2(2)-\\tan (2)\\right)-\\frac{\\tan (2)}{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**2\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(\\frac{x}{y z}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left\\{0,\\sin (x-z)-\\frac{x \\cosh \\left(\\frac{x}{y z}\\right)}{y z^2},\\frac{x \\cosh \\left(\\frac{x}{y z}\\right)}{y^2 z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x/(y*z))\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\cos \\left(x+y^5\\right)$", - "Output Answer": [ - "$\\left\\{-5 y^4 \\sin \\left(x+y^5\\right)-1,\\sin \\left(x+y^5\\right),1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = x+z\nh = x+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (6 x-4)+\\cos (8 x+1)$\n", - "Output Answer": [ - "$\\frac{3}{3 x-2}-8 \\sin (8 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(6*x-4)+cos(8*x+1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}} & -\\frac{x}{y^2 \\sqrt{1-\\frac{x^2}{y^2}}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = asin(x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{3 x+6} \\sin \\left(\\frac{3 x}{2}+2\\right)$\n", - "Output Answer": [ - "$-\\frac{3}{2} e^{3 x+6} \\left(2 \\sin \\left(\\frac{3 x}{2}+2\\right)+\\cos \\left(\\frac{3 x}{2}+2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(3*x+6)*sin(((3*x)/2)+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = log(x+y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x+z)^{3/2}}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 (x+z)^{5/2}} & 0 & -\\frac{3}{2 (x+z)^{5/2}} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+z)**(3/2)))\ng = asin(y)\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{x^2}{z^2}$", - "Output Answer": [ - "$-\\frac{2 x^2}{z^3}+\\cos (x)+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(y)\nh = ((x**2)/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{7}{5}-\\frac{11 x^2}{5}}+e^{\\frac{2}{5}-\\frac{3 x}{5}}$\n", - "Output Answer": [ - "$\\frac{1}{5} e^{2/5} \\left(-22 e^{1-\\frac{11 x^2}{5}} x-3 e^{-3 x/5}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((7/5)-((11*x**2)/5))+math.e**((2/5)-((3*x)/5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x-5} \\log (-4 x-3)$\n", - "Output Answer": [ - "$\\frac{e^{8 x-5} (8 (4 x+3) \\log (-4 x-3)+4)}{4 x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x-5)*log(-4*x-3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$24 x^2 \\sin \\left(8-8 x^3\\right)$\n", - "Output Answer": [ - "$24 \\left(\\frac{1}{24} \\sin (8) \\sin \\left(8 x^3\\right)+\\frac{1}{24} \\cos (8) \\cos \\left(8 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 24*x**2*sin(8-8*x**3)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\tan (2 x)}-\\sin (4 x+6)$\n", - "Output Answer": [ - "$4 e^{-\\tan (2 x)} \\left(\\sec ^4(2 x)+4 \\sin (4 x+6) e^{\\tan (2 x)}-2 \\tan (2 x) \\sec ^2(2 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-tan(2*x))-sin(4*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^3\\right)$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$-\\frac{x^3}{6}+x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**3)\ng = asinh(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x}{z^2},\\frac{3 \\sqrt{x}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = x**(3/2)\nh = x**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(3 x^3+4\\right)+\\frac{1}{(7-x)^2}$\n", - "Output Answer": [ - "$\\frac{9 x^2}{\\left(3 x^3+4\\right)^2+1}-\\frac{2}{(x-7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(3*x**3+4)+(1/((7-x)**2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = y^5 z^5$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n 0 & 5 y^4 z^5 & 5 y^5 z^4 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-y)\ng = y**5*z**5\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 y^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(y+z^2\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3 y^2}+\\frac{2 z}{y+z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*y**2))\ng = y\nh = log(y+z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^3+z}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\cos \\left(x y^3\\right)$", - "Output Answer": [ - "$\\left\\{-3 x y^2 \\sin \\left(x y^3\\right),y^3 \\sin \\left(x y^3\\right)+\\frac{1}{3 \\sqrt[3]{y^3+z}^2},\\frac{1}{x}-\\frac{y^2}{\\sqrt[3]{y^3+z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**3+z)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (7 x+5)-\\cos (7-4 x)$\n", - "Output Answer": [ - "$49 \\sin (7 x+5)+16 \\cos (7-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7*x+5)-cos(7-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$x \\cos (x z)+\\cos (x)+\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = atan(y)\nh = sin(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = x^5 z^5$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(z)))\ng = x**5*z**5\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cosh (x)$ and $g(x) = $\\sin ^{-1}(x)$", - "Output Answer": [ - "$\\frac{x^3}{6}+\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cosh(x)\ng = asin(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z-y}} & \\frac{1}{2 \\sqrt{z-y}} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sqrt(z-y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\log (x-y)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$-\\frac{1}{x-y}+\\frac{1}{3 \\sqrt[3]{x+y}^2}+y \\cos (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = log(x-y)\nh = sin(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$\\left(32864 e^{256}-\\frac{1}{32}\\right) (x-4)^2+\\left(\\frac{1}{4}+256 e^{256}\\right) (x-4)+e^{256}+2 \\log (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = tan(x+z)\nh = (1/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(y^4\\right)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y**4)\ng = sqrt(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (z/x)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = acos(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (4-7 x) \\sin \\left(5-2 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{7 \\sin \\left(5-2 x^5\\right)}{4-7 x}+10 x^4 \\log (4-7 x) \\cos \\left(5-2 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(4-7*x)*sin(5-2*x**5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{\\left(x^3+y\\right)^3}{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{9 x^2 \\left(x^3+y\\right)^2}{z^3} & \\frac{3 \\left(x^3+y\\right)^2}{z^3} & -\\frac{3 \\left(x^3+y\\right)^3}{z^4} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = y\nh = (((x**3+y)**3)/(z**3))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$5 x^4+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = cbrt(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{2 x^5}{15}+\\frac{x^4}{24}+\\frac{x^3}{3}-\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(4-9 x^2\\right)+e^{3 x+2}$\n", - "Output Answer": [ - "$3 \\left(e^{3 x+2}-6 x \\cos \\left(4-9 x^2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(4-9*x**2)+math.e**(3*x+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (8 x)-\\frac{1}{\\left(-\\frac{9 x}{2}-7\\right)^5}$\n", - "Output Answer": [ - "$\\frac{77760}{(9 x+14)^7}+128 \\tan (8 x) \\sec ^2(8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8*x)-(1/((-((9*x)/2)-7)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\frac{1}{y+z}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+x-\\frac{1}{(y+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = x*y\nh = (1/(y+z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{11}{2}-6 x^5\\right)+\\log \\left(-2 x-\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$30 x^4 \\sin \\left(\\frac{11}{2}-6 x^5\\right)+\\frac{4}{4 x+5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((11/2)-6*x**5)+log(-2*x-(5/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $\\sin ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = asin(x)\nseries = f.subs(x, g).series(x, -5, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\frac{1}{(x+y-z)^{3/2}}$", - "Output Answer": [ - "$\\frac{3}{2 (x+y-z)^{5/2}}+\\cos (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**x\nh = (1/((x+y-z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-y}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{2 \\sqrt{y z}},\\frac{1}{2 \\sqrt{z-y}}-\\cos (x),\\frac{1}{2 \\sqrt{z-y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-y)\ng = sqrt(y*z)\nh = sqrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = (y-x)^3$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,0,-3 (y-x)^2\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (y-x)**3\nh = (y-x)**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$1-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sin(x)\nh = x-y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (4 x)$ on the interval $x = 0$ to $x = 2$\n", - "Output Answer": [ - "$\\int_0^2 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x)\na = 0\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4-\\frac{11 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{121}{25} \\cos \\left(4-\\frac{11 x}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4-((11*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-3 x-\\sin (8 x+5)}$\n", - "Output Answer": [ - "$-e^{-3 x-\\sin (8 x+5)} (8 \\cos (8 x+5)+3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-3*x-sin(8*x+5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = y$, and $h(x,y,z) = x^2 z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & 1 & 0 \\\\\n 2 x z^2 & 0 & 2 x^2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y)\ng = y\nh = x**2*z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{1}{2}-8 x^3\\right)-\\cos \\left(\\frac{x}{2}+3\\right)$\n", - "Output Answer": [ - "$\\frac{1}{4} \\cos \\left(\\frac{x+6}{2}\\right)-\\frac{96 \\left(8 x^4+x\\right)}{\\left(1-16 x^3\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log((1/2)-8*x**3)-cos((x/2)+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = \\sqrt{y^3}$", - "Output Answer": [ - "$\\left\\{\\frac{3 y^2}{2 \\sqrt{y^3}},1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = tan(y**3)\nh = tan(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = asin(y)\nh = (y/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-7 x-7}-\\sin (9-7 x)$\n", - "Output Answer": [ - "$7 \\cos (9-7 x)-\\frac{7}{2 \\sqrt{-7 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-7*x-7)-sin(9-7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(2 x^4+3\\right)-\\tan ^{-1}\\left(4 x^2+7\\right)$\n", - "Output Answer": [ - "$8 \\left(\\frac{16 \\left(4 x^2+7\\right) x^2}{\\left(\\left(4 x^2+7\\right)^2+1\\right)^2}-\\frac{1}{\\left(4 x^2+7\\right)^2+1}-3 x^2 \\sin \\left(2 x^4+3\\right)-8 x^6 \\cos \\left(2 x^4+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2*x**4+3)-atan(4*x**2+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**(3/2)\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-2 x-\\tan ^{-1}(5-6 x)+7$\n", - "Output Answer": [ - "$\\frac{6}{(5-6 x)^2+1}-2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-2*x-atan(5-6*x)+7, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y z}\\right)$, $g(x,y,z) = e^{y/z}$, and $h(x,y,z) = \\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{y z \\sqrt{1-\\frac{x^2}{y^2 z^2}}} & \\frac{x}{y^2 z \\sqrt{1-\\frac{x^2}{y^2 z^2}}} & \\frac{x}{y z^2 \\sqrt{1-\\frac{x^2}{y^2 z^2}}} \\\\\n 0 & \\frac{e^{y/z}}{z} & -\\frac{y e^{y/z}}{z^2} \\\\\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x/(y*z))\ng = math.e**(y/z)\nh = asin(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(x+6)+1$\n", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+6)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(x+6)+1, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^3\\right)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\cos \\left(x^3 z\\right)$", - "Output Answer": [ - "$\\left\\{0,3 x^2 z \\sin \\left(x^3 z\\right),3 x^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**3)\ng = x**3\nh = x**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2 z\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,x^2 \\cos \\left(x^2 z\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2*z)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8 x^4+8\\right)$\n", - "Output Answer": [ - "$-\\frac{4 x^2 \\left(x^4-3\\right)}{\\left(x^4+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8*x**4+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^2\\right)^{3/2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$3 \\sqrt{x^2} x-\\sin (y)-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**2)**(3/2)\ng = cos(y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin \\left(\\frac{x z}{y}\\right)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$-\\frac{x z \\cos \\left(\\frac{x z}{y}\\right)}{y^2}+\\frac{1}{x}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sin(((x*z)/y))\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(z^5-x\\right)$, $g(x,y,z) = \\frac{1}{y^2 z^{10}}$, and $h(x,y,z) = \\left(z^5\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{z^5-x} & 0 & \\frac{5 z^4}{z^5-x} \\\\\n 0 & -\\frac{2}{y^3 z^{10}} & -\\frac{10}{y^2 z^{11}} \\\\\n 0 & 0 & \\frac{15}{2} z^4 \\sqrt{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z**5-x)\ng = (1/(y**2*z**10))\nh = (z**5)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(y z^5\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z^5-x$", - "Output Answer": [ - "$\\sec ^2(y)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z**5)\ng = tan(y)\nh = z**5-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{9 x^2+3} \\sin \\left(3-4 x^4\\right)$\n", - "Output Answer": [ - "$-2 e^{9 x^2+3} x \\left(8 x^2 \\cos \\left(3-4 x^4\\right)-9 \\sin \\left(3-4 x^4\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(9*x**2+3)*sin(3-4*x**4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8-\\frac{x^2}{2}}$\n", - "Output Answer": [ - "$-\\frac{8 \\sqrt{2}}{\\left(16-x^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8-((x**2)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(y-x)$, and $h(x,y,z) = \\sqrt[3]{y-z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-(y-x)^2}} & -\\frac{1}{\\sqrt{1-(y-x)^2}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y-z^2}^2} & -\\frac{2 z}{3 \\sqrt[3]{y-z^2}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = acos(y-x)\nh = cbrt(y-z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/(x**(3/2)))\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = \\frac{z}{x^4}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z-y}},\\frac{4 z}{x^5},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sqrt(z-y)\nh = sqrt(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1-y e^{y z},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = math.e**(y*z)\nh = math.e**(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(y+z),-\\sec ^2(y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = \\sqrt{y^5}$", - "Output Answer": [ - "$\\left\\{\\frac{5 y^4}{2 \\sqrt{y^5}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = tan(y**5)\nh = tan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x-4) \\left(\\tan ^2(4)-1279\\right)-1024+\\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**5\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^8$, and $h(x,y,z) = -\\sin ^{-1}\\left(y^2-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 8 y^7 & 0 \\\\\n 0 & -\\frac{2 y}{\\sqrt{1-\\left(y^2-z\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(y^2-z\\right)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**8\nh = -asin(y**2-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $x^4$", - "Output Answer": [ - "$-(x-2)^4-8 (x-2)^3-23 (x-2)^2-28 (x-2)-12$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = x**4\nseries = f.subs(x, g).series(x, 2, 6)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $\\sin ^{-1}\\left(x^4\\right)$", - "Output Answer": [ - "$\\frac{1}{x^3}+\\frac{3 x}{40}+\\frac{1}{6 x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = asin(x**4)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-6 x^4}+\\tan (4 x+7)$\n", - "Output Answer": [ - "$4 \\left(\\sec ^2(4 x+7)-\\frac{3 x^3}{\\sqrt{7-6 x^4}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-6*x**4)+tan(4*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = sin(x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x$, and $h(x,y,z) = e^{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n e^{x-z} & 0 & -e^{x-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = x\nh = math.e**(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = -\\tan (x-z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = -tan(x-z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = -\\tan ^{-1}(x-y)$", - "Output Answer": [ - "$\\sec ^2(x+y)+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = tan(x+y)\nh = -atan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x^2 y}{z^2}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 x y \\sec ^2\\left(\\frac{x^2 y}{z^2}\\right)}{z^2},\\frac{x^2 \\sec ^2\\left(\\frac{x^2 y}{z^2}\\right)}{z^2},-\\frac{2 x^2 y \\sec ^2\\left(\\frac{x^2 y}{z^2}\\right)}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((x**2*y)/(z**2)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{0,-1,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\frac{1}{y-x}+\\frac{z}{2 \\sqrt{y z}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-x)\ng = sqrt(y*z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z-x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{z-x}-\\frac{1}{\\sqrt{1-y^2}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z-x)\ng = acos(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (3 x+5)$\n", - "Output Answer": [ - "$9 \\sin (3 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-3 x-\\frac{13}{2}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -3*x-(13/2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-3 x-6}-\\tan (8-9 x)$\n", - "Output Answer": [ - "$-\\frac{9}{4 (-3 x-6)^{3/2}}-162 \\tan (8-9 x) \\sec ^2(8-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-3*x-6)-tan(8-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{8 x-8}$\n", - "Output Answer": [ - "$\\frac{1}{4 (x-1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(8*x-8))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan ^{-1}(x-y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x-y)^2+1} & \\frac{1}{(x-y)^2+1} & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -atan(x-y)\ng = atan(y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{40}{3} e^{\\frac{5}{3} \\left(4 x^2-5\\right)} x-\\frac{28 x^3}{\\sqrt{1-\\left(7 x^4+8\\right)^2}}$\n", - "Output Answer": [ - "$e^{\\frac{5}{3} \\left(4 x^2-5\\right)}-\\sin ^{-1}\\left(7 x^4+8\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = (40/3)*math.e**((5/3)*(4*x**2-5))*x-((28*x**3)/(sqrt(1-(7*x**4+8)**2)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = y\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(y**2))\nh = sin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$(x-5) \\left(\\frac{1}{625}-\\frac{3 \\log (5)}{625}\\right)+\\frac{\\log (5)}{125}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**3\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin ^{-1}(x-y)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{\\frac{x}{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}},-\\frac{1}{2 y \\sqrt{\\frac{x}{y}}},-\\frac{1}{\\sqrt{1-(x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asin(x-y)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(x)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^4-x^5}$, $g(x,y,z) = \\sin \\left(x^5 y^4\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,5 x^4 y^4 \\cos \\left(x^5 y^4\\right)-\\frac{4 y^3}{3 \\sqrt[3]{y^4-x^5}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**4-x**5)\ng = sin(x**5*y**4)\nh = sin(x**5*y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}}-3 y^2 \\sin \\left(y^3\\right)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z/x)\ng = cos(y**3)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(y^2+z\\right)$, $g(x,y,z) = \\cos \\left(x^2\\right)$, and $h(x,y,z) = \\frac{x^2}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{2 y}{\\sqrt{1-\\left(y^2+z\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(y^2+z\\right)^2}} \\\\\n -2 x \\sin \\left(x^2\\right) & 0 & 0 \\\\\n \\frac{2 x}{z} & 0 & -\\frac{x^2}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y**2+z)\ng = cos(x**2)\nh = ((x**2)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x y)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{z^4}$", - "Output Answer": [ - "$\\left\\{0,0,1-\\frac{x}{x^2 y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x*y)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y-x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(y-x)^2}}+3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y-x)\ng = y**3\nh = x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{8}{8 x-3}$\n", - "Output Answer": [ - "$\\log (8 x-3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (8/(8*x-3))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\frac{z \\sin \\left(\\frac{z}{x}\\right)}{x^2}+x \\cos (x y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((z/x))\ng = sin(x*y)\nh = sin((x/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cosh (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & \\sinh (y+z) & \\sinh (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**2\nh = cosh(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{y}}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\cos (y)-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((z/y))))\ng = sin(y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^6$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**6\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y-z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y-z)\ng = atan(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{13 x}{2}-\\frac{7}{2}}-e^{-x-\\frac{5}{2}}$\n", - "Output Answer": [ - "$-e^{-x-\\frac{5}{2}}-\\frac{169}{16 \\left(-\\frac{13 x}{2}-\\frac{7}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(-((13*x)/2)-(7/2))-math.e**(-x-(5/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{41 x}{5}+\\frac{37}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{1681}{25} \\cos \\left(\\frac{1}{5} (41 x+37)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((41*x)/5)+(37/5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = e^y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$e^y+2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = math.e**y\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = (y-x)^{3/2}$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{3 \\sqrt{y-x}}{2} & \\frac{3 \\sqrt{y-x}}{2} & 0 \\\\\n -\\frac{1}{x^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (y-x)**(3/2)\nh = (1/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan (2 x)$ on the interval $x = 3$ to $x = 7$\n", - "Output Answer": [ - "$\\int_3^7 \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(2*x)\na = 3\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2 z^2$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x z^2 & 0 & 2 x^2 z \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2*z**2\ng = atan(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\cosh ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n \\frac{z}{\\sqrt{x z-1} \\sqrt{x z+1}} & 0 & \\frac{x}{\\sqrt{x z-1} \\sqrt{x z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(z)\ng = cos(z)\nh = acosh(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-5} (-8 x-6)^5$\n", - "Output Answer": [ - "$64 e^{-6 x-5} (4 x+3)^4 (12 x-1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-5)*(-8*x-6)**5, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x y)$, $g(x,y,z) = \\sin \\left(\\frac{y}{z^5}\\right)$, and $h(x,y,z) = \\sqrt[3]{x z^5}$", - "Output Answer": [ - "$\\frac{y}{1-x^2 y^2}+\\frac{5 x z^4}{3 \\sqrt[3]{x z^5}^2}+\\frac{\\cos \\left(\\frac{y}{z^5}\\right)}{z^5}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x*y)\ng = sin((y/(z**5)))\nh = cbrt(x*z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\cos \\left(x^5+y\\right)$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n -5 x^4 \\sin \\left(x^5+y\\right) & -\\sin \\left(x^5+y\\right) & 0 \\\\\n 0 & 0 & \\frac{3}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = cos(x**5+y)\nh = log(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}\\left(7 x^2+4\\right)$\n", - "Output Answer": [ - "$-\\frac{14 x}{\\sqrt{1-\\left(7 x^2+4\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(7*x**2+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z^4}$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^{y z^4}$", - "Output Answer": [ - "$4 y^3+4 y z^3 e^{y z^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(z**4))\ng = y**4\nh = math.e**(y*z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{x-4} \\sin (2)$\n", - "Output Answer": [ - "$-e^{x-4} \\sin (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(x-4)*sin(2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{\\tan \\left(\\frac{5 x}{2}\\right)}{\\sin ^{-1}\\left(\\frac{7 x}{2}\\right)}$ on the interval $x = 1$ to $x = 1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((tan(((5*x)/2)))/(asin((7*x)/2)))\na = 1\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-6 x-1} \\tan (5-9 x)$\n", - "Output Answer": [ - "$\\frac{3 (36 x-\\sin (10-18 x)+6) \\sec ^2(5-9 x)}{2 \\sqrt{-6 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-6*x-1)*tan(5-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{\\frac{x y}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n \\frac{y}{2 z \\sqrt{\\frac{x y}{z}}} & \\frac{x}{2 z \\sqrt{\\frac{x y}{z}}} & -\\frac{x y}{2 z^2 \\sqrt{\\frac{x y}{z}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(y)\nh = sqrt(((x*y)/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^{x^2}$ and $g(x) = $x^4$", - "Output Answer": [ - "$x^6+x^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**2)\ng = x**4\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{1-x^2 z^2}}+\\cos (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*z)\ng = sin(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y^2}$, and $h(x,y,z) = \\sqrt{x+y^2-z}$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{x+y^2-z}}+\\frac{2 y}{3 \\sqrt[3]{y^2}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y**2)\nh = sqrt(x+y**2-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x^2 z}{y^4}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{x z}{y^4 \\sqrt{\\frac{x^2 z}{y^4}}},-\\frac{2 x^2 z}{y^5 \\sqrt{\\frac{x^2 z}{y^4}}},\\frac{x^2}{2 y^4 \\sqrt{\\frac{x^2 z}{y^4}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x**2*z)/(y**4)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-5 x-5}-\\tan (\\tan (5-7 x))$\n", - "Output Answer": [ - "$25 e^{-5 (x+1)}-98 \\tan (\\tan (5-7 x)) \\sec ^4(5-7 x) \\sec ^2(\\tan (5-7 x))-98 \\tan (5-7 x) \\sec ^2(5-7 x) \\sec ^2(\\tan (5-7 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-5*x-5)-tan(tan(5-7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sinh ^{-1}(x z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n \\frac{z}{\\sqrt{x^2 z^2+1}} & 0 & \\frac{x}{\\sqrt{x^2 z^2+1}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = asinh(x*z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z^{10}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{1}{2 y^{3/2}}+10 z^9$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(sqrt(y)))\nh = z**10\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x-z^2$, and $h(x,y,z) = \\log \\left(y^4\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{4}{y}+2 z,0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = x-z**2\nh = x-z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{x \\left(-e^{x z}\\right),0,z e^{x z}-\\sec ^2(x+y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = math.e**(x*z)\nh = math.e**(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{\\frac{x}{z}}$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y^5}}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}}-\\frac{5 z}{3 y^6 \\sqrt[3]{\\frac{z}{y^5}}^2},0,\\frac{1}{2 z \\sqrt{\\frac{x}{z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt((x/z))\nh = sqrt((x/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = z \\left(x+y^2\\right)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\frac{1}{x}+2 y z-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = z*(x+y**2)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-4 x-3}-\\cosh (4-3 x)$\n", - "Output Answer": [ - "$-\\frac{4}{(-4 x-3)^{3/2}}-9 \\cosh (4-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-4*x-3)-cosh(4-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(z)$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\sinh \\left(\\frac{x y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x \\cosh \\left(\\frac{x y}{z}\\right)}{z},\\frac{1}{\\sqrt{z^2+1}}-\\frac{y \\cosh \\left(\\frac{x y}{z}\\right)}{z},-\\frac{1}{3 \\sqrt[3]{y-x}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(z)\ng = cbrt(y-x)\nh = cbrt(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(y^5-z\\right)$, $g(x,y,z) = \\sqrt{y^5}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -5 y^4 \\sin \\left(y^5-z\\right) & \\sin \\left(y^5-z\\right) \\\\\n 0 & \\frac{5 y^4}{2 \\sqrt{y^5}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y**5-z)\ng = sqrt(y**5)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^6$", - "Output Answer": [ - "$(x+4) (\\cos (4)-6144)+4096-\\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**6\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^4+z\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\left(x^4 y\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{4 x^3}{x^4+z}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**4+z)\ng = tan(y)\nh = (x**4*y)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x-4)-\\cos (6 x)$\n", - "Output Answer": [ - "$\\frac{1}{x-1}+6 \\sin (6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x-4)-cos(6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(z \\left(x+y^5\\right)\\right)$", - "Output Answer": [ - "$-25 y^8 z^2 \\sin \\left(z \\left(x+y^5\\right)\\right)-z^2 \\sin \\left(z \\left(x+y^5\\right)\\right)-\\left(x+y^5\\right)^2 \\sin \\left(z \\left(x+y^5\\right)\\right)+20 y^3 z \\cos \\left(z \\left(x+y^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z*(x+y**5))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y))\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^6$, $g(x,y,z) = y z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$6 x^5+z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**6\ng = y*z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{1}{2} (x+1)^2 \\sin (1)+(x+1) \\cos (1)-\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y+z)$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y+z)\ng = sin(x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}(x+y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{(x+y)^2+1} & \\frac{1}{(x+y)^2+1} & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = atan(x+y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x-1}-\\sin ^{-1}\\left(5 x^2\\right)$\n", - "Output Answer": [ - "$8 e^{8 x-1}-\\frac{10 x}{\\sqrt{1-25 x^4}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x-1)-asin(5*x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x+7}+\\tan (6-8 x)$\n", - "Output Answer": [ - "$128 \\tan (6-8 x) \\sec ^2(6-8 x)-\\frac{25}{4 (5 x+7)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x+7)+tan(6-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x^{16}$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-3)^2 \\left(573956280+\\tan ^3(3)+\\tan (3)\\right)+(x-3) \\left(229582513+\\tan ^2(3)\\right)+43046721+\\tan (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**16\ng = tan(x)\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^4$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**4\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z-x}$, $g(x,y,z) = \\frac{1}{x-y+z}$, and $h(x,y,z) = \\frac{1}{(z-y)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{(x-y+z)^2}-\\frac{1}{3 \\sqrt[3]{z-x}^2}-\\frac{3}{2 (z-y)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z-x)\ng = (1/(x-y+z))\nh = (1/((z-y)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\frac{y^2}{x^2}$, and $h(x,y,z) = \\sqrt{y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n -\\frac{2 y^2}{x^3} & \\frac{2 y}{x^2} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = ((y**2)/(x**2))\nh = sqrt(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{\\left(x+z^3\\right)^2}$, and $h(x,y,z) = x^5$", - "Output Answer": [ - "$\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/((x+z**3)**2))\nh = x**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\left(\\frac{x}{y}-z\\right)^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n \\frac{3 \\left(\\frac{x}{y}-z\\right)^2}{y} & -\\frac{3 x \\left(\\frac{x}{y}-z\\right)^2}{y^2} & -3 \\left(\\frac{x}{y}-z\\right)^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = y**(3/2)\nh = ((x/y)-z)**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{z^2},0,\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (x/z)\nh = (x/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sin (x-y)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((z/y))\ng = log(z)\nh = sin(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x+3}$\n", - "Output Answer": [ - "$9 e^{3 x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{\\frac{17}{3}-8 x}-\\tan (2 x)$\n", - "Output Answer": [ - "$8 e^{\\frac{17}{3}-8 x}-2 \\sec ^2(2 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**((17/3)-8*x)-tan(2*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{9 x}{2}-5}+\\sin ^{-1}\\left(\\frac{1}{2}-x\\right)$\n", - "Output Answer": [ - "$\\frac{9}{4 \\sqrt{\\frac{9 x}{2}-5}}-\\frac{2}{\\sqrt{-4 x^2+4 x+3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((9*x)/2)-5)+asin((1/2)-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**2\nh = tan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = x+z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 1 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = asin(x)\nh = x+z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(5-x^2\\right)$\n", - "Output Answer": [ - "$-\\frac{2 \\left(x^2+5\\right)}{\\left(x^2-5\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sin(x)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y^4}}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{2 y^3}{\\left(y^4\\right)^{3/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(y**4)))\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = z\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(e^{2 x^2}\\right)$\n", - "Output Answer": [ - "$4 e^{2 x^2} \\left(4 x^2+8 e^{2 x^2} x^2 \\tan \\left(e^{2 x^2}\\right)+1\\right) \\sec ^2\\left(e^{2 x^2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = tan(math.e**(2*x**2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = z$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = (y+z)^3$", - "Output Answer": [ - "$\\left\\{3 (y+z)^2-\\sec ^2(x+z),0,\\sec ^2(x+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = tan(x+z)\nh = tan(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{\\frac{y}{x}}$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left\\{0,-1,-\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sqrt((y/x))\nh = sqrt((y/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = x$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,1-\\sin (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{120 x^3}{\\left(2-6 x^4\\right)^6}$\n", - "Output Answer": [ - "$-\\frac{1}{\\left(2-6 x^4\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((120*x**3)/((2-6*x**4)**6))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\tan \\left(\\frac{x^4}{2}\\right)$\n", - "Output Answer": [ - "$3+3 \\tan ^2\\left(\\frac{1}{2}\\right)+4 \\tan ^3\\left(\\frac{1}{2}\\right)+4 \\tan \\left(\\frac{1}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(tan(((x**4)/2)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (5 x+1)-\\tan (3-8 x)$\n", - "Output Answer": [ - "$8 \\sec ^2(3-8 x)+5 \\sec ^2(5 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(5*x+1)-tan(3-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y}}$, $g(x,y,z) = (z-x)^4$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z-\\frac{y}{2 (x y)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y)))\ng = (z-x)**4\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $e^{x^5}$", - "Output Answer": [ - "$52531212 e^{1024} (x-4)^2+81968 e^{1024} (x-4)+64 e^{1024}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = math.e**(x**5)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\cos \\left(x^5\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{x^{10}+1} & 0 & 0 \\\\\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x**5)\ng = cos(x**5)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{9}{4} \\cos \\left(6-\\frac{3 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = e^{\\frac{x}{y}+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n \\frac{e^{\\frac{x}{y}+z}}{y} & -\\frac{x e^{\\frac{x}{y}+z}}{y^2} & e^{\\frac{x}{y}+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = asin(y+z)\nh = math.e**((x/y)+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1-\\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}},0,-\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = asin(z/x)\nh = asin(z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = \\frac{1}{(z-y)^{3/2}}$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2 (z-y)^{5/2}}-\\frac{1}{\\sqrt{1-z^2}},\\cos (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = asin(z)\nh = asin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (6 x-7)$\n", - "Output Answer": [ - "$-\\frac{36}{(7-6 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x^3+3 x^2+16}$\n", - "Output Answer": [ - "$3 e^{7 x^3+3 x^2+16} x (7 x+2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x**3+3*x**2+16), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\frac{z^4}{y^2}$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{4 z^3}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**4)\ng = ((z**4)/(y**2))\nh = ((z**4)/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^3\\right)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{-\\cos (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**3)\ng = sin(z)\nh = sin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = math.e**z\nh = acos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(\\frac{x}{y^4}-z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{y^4 \\left(\\frac{x}{y^4}-z^5\\right)},-\\frac{4 x}{y^5 \\left(\\frac{x}{y^4}-z^5\\right)},-\\frac{5 z^4}{\\frac{x}{y^4}-z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/(y**4))-z**5)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y)-1,1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = y+z\nh = y+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x-z^5}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tanh ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x-z^5}} & 0 & -\\frac{5 z^4}{2 \\sqrt{x-z^5}} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{5 z^4}{1-z^{10}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x-z**5)\ng = cos(y)\nh = atanh(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = y\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (x-z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = tan(x-z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (\\cos (8-3 x))$\n", - "Output Answer": [ - "$-9 \\left(\\cos (8-3 x) \\cos (\\cos (8-3 x))+\\sin ^2(8-3 x) \\sin (\\cos (8-3 x))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(cos(8-3*x))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan ^{-1}(3 x)$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(3*x)\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tanh ^{-1}(x+z)$, and $h(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$3 x^2-\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = atanh(x+z)\nh = cos((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tanh ^{-1}(x-y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),\\frac{1}{1-(x-y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atanh(x-y)\nh = atanh(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = z**(3/2)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{5 x}{2}+\\frac{7}{2}\\right)-\\frac{1}{512 x^3}$\n", - "Output Answer": [ - "$\\frac{3}{512 x^4}-\\frac{5}{2} \\sin \\left(\\frac{1}{2} (5 x+7)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((5*x)/2)+(7/2))-(1/(512*x**3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-8 x-2} (7 x-5)^5$\n", - "Output Answer": [ - "$-e^{-8 x-2} (5-7 x)^4 (56 x-75)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-8*x-2)*(7*x-5)**5, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-\\frac{11}{2}}-\\log \\left(\\frac{11 x}{2}-\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{11}{13-11 x}+\\frac{1}{\\sqrt{2 x-\\frac{11}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-(11/2))-log(((11*x)/2)-(13/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = (1/(y**(3/2)))\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^3}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{x^3}$", - "Output Answer": [ - "$\\sec ^2(y)-\\frac{3 x^2}{2 \\left(x^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**3)))\ng = tan(y)\nh = sqrt(x**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\tanh (y z)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-y \\text{sech}^2(y z),-1,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = tanh(y*z)\nh = tanh(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^{-3 x^5}$ on the interval $x = 1$ to $x = 1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-3*x**5)\na = 1\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-25 e^{-5 x^5-4} x^4$\n", - "Output Answer": [ - "$e^{-5 x^5-4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -25*math.e**(-5*x**5-4)*x**4\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = y^5 z$", - "Output Answer": [ - "$\\left\\{5 y^4 z,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(y**5)\nh = asin(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(y+z)^2}$, $g(x,y,z) = \\cos (y z)$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{x^2 z^2+1}-z \\sin (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y+z)**2))\ng = cos(y*z)\nh = atan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\frac{x^5}{120}+\\frac{x^4}{24}-\\frac{5 x^3}{6}+\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = x**3\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = tan(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3-z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & -1 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3-z\ng = sin(y)\nh = sqrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{13 x^4}{2}+\\frac{9}{2}\\right)+\\sin (7 x)$\n", - "Output Answer": [ - "$7 \\cos (7 x)-26 x^3 \\sin \\left(\\frac{1}{2} \\left(13 x^4+9\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((13*x**4)/2)+(9/2))+sin(7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y)\ng = tan(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(4 x+1)$\n", - "Output Answer": [ - "$-\\frac{16 (4 x+1)}{\\left(1-(4 x+1)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(4*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x-5}$\n", - "Output Answer": [ - "$-\\frac{25}{4 (5 x-5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x-5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}+z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{\\sec ^2\\left(\\frac{x}{y}+z^4\\right)}{y},-\\frac{x \\sec ^2\\left(\\frac{x}{y}+z^4\\right)}{y^2},4 z^3 \\sec ^2\\left(\\frac{x}{y}+z^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y)+z**4)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{3}{2}-4 x\\right)$\n", - "Output Answer": [ - "$-16 \\cos \\left(\\frac{3}{2}-4 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((3/2)-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x+y^2-z\\right)^4$", - "Output Answer": [ - "$8 \\left(x+y^2-z\\right)^3+48 y^2 \\left(x+y^2-z\\right)^2+24 \\left(x+y^2-z\\right)^2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y**2-z)**4\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (x z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(x*z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(-9 x-\\frac{8}{3}\\right)^3}+\\sin \\left(\\frac{10}{3}-6 x\\right)$\n", - "Output Answer": [ - "$\\frac{2187}{(27 x+8)^4}-6 \\cos \\left(\\frac{10}{3}-6 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((-9*x-(8/3))**3))+sin((10/3)-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{1}{x^2}+5 y^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y**5\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^2 y}$, $g(x,y,z) = y$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\left\\{2 y,0,-\\frac{x^2}{3 \\sqrt[3]{x^2 y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**2*y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{z}{y}\\right)^{3/2}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 y \\left(\\frac{z}{y}\\right)^{5/2}},-\\frac{3 z}{2 y^2 \\left(\\frac{z}{y}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z/y)**(3/2)))\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^4}$, $g(x,y,z) = \\log \\left(y^4-x\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{y^4-x}-\\frac{2 y^3}{\\sqrt{y^4}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**4)\ng = log(y**4-x)\nh = log(y**4-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x+y^2+z\\right)$", - "Output Answer": [ - "$-\\frac{4 y^2 \\left(x+y^2+z\\right)}{\\left(1-\\left(x+y^2+z\\right)^2\\right)^{3/2}}-\\frac{2}{\\sqrt{1-\\left(x+y^2+z\\right)^2}}-\\frac{2 \\left(x+y^2+z\\right)}{\\left(1-\\left(x+y^2+z\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+y**2+z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\sqrt{6}}-\\log \\left(4-8 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{4 x}{1-2 x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(sqrt(6))-log(4-8*x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(9-7 x^5\\right)$\n", - "Output Answer": [ - "$35 x^3 \\left(4 \\sin \\left(9-7 x^5\\right)-35 x^5 \\cos \\left(9-7 x^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(9-7*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{1}{(x+y)^2}$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$-\\frac{2}{(x+y)^3}-2 z \\sin \\left(z^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (1/((x+y)**2))\nh = cos(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tanh (x y)$", - "Output Answer": [ - "$2 y-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**2\nh = tanh(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 z^2}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left\\{0,z \\left(-e^{x z}\\right)-\\frac{2}{x^2 z^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*z**2))\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-7} \\log (7-x)$\n", - "Output Answer": [ - "$\\frac{e^{5 x-7} (5 (x-7) \\log (7-x)+1)}{x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-7)*log(7-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $x$", - "Output Answer": [ - "$\\frac{3 x^5}{40}+\\frac{x^3}{6}+2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = x\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x y^4+z\\right)^3$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt[3]{y^4 z}$", - "Output Answer": [ - "$3 y^4 \\left(x y^4+z\\right)^2+\\frac{y^4}{3 \\sqrt[3]{y^4 z}^2}+4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y**4+z)**3\ng = y**4\nh = cbrt(y**4*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{(x+z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{y^2+1}-\\frac{3}{2 (x+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/z)\ng = atan(y)\nh = (1/((x+z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{y-z}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = sqrt(y-z)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 3 \\sqrt{\\frac{2}{5}} \\sqrt{-x^3}$ on the interval $x = 3$ to $x = 10$\n", - "Output Answer": [ - "$\\frac{i \\left(32000-233 \\sqrt{466}\\right)}{243 \\sqrt{5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 3*sqrt((2/5))*sqrt(-x**3)\na = 3\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x+1}+\\frac{1}{(4-6 x)^3}$\n", - "Output Answer": [ - "$4 e^{2 x+1}+\\frac{432}{(4-6 x)^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x+1)+(1/((4-6*x)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(6-5 x^3\\right)+\\log (5 x-1)$\n", - "Output Answer": [ - "$\\frac{15 x^2}{\\sqrt{1-\\left(6-5 x^3\\right)^2}}+\\frac{5}{5 x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(6-5*x**3)+log(5*x-1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = log(y)\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x y}{z}\\right)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},-\\frac{x y}{z^2 \\left(\\frac{x^2 y^2}{z^2}+1\\right)}-\\sec ^2(x),-\\frac{x}{z \\left(\\frac{x^2 y^2}{z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x*y)/z)\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\sec ^2(y)-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = tan(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{\\sec ^2\\left(\\frac{y}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/x))\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{1}{(x-z)^2+1} & 0 & -\\frac{1}{(x-z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sin(y)\nh = atan(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{y}}$, $g(x,y,z) = z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-1,\\frac{1}{2 y \\sqrt{\\frac{z}{y}}},\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/y))\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{7 x-5}}{\\sqrt{-2 x-6}}$\n", - "Output Answer": [ - "$-\\frac{e^{7 x-5} (14 x+41)}{2 \\sqrt{2} (-x-3)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(7*x-5))/(sqrt(-2*x-6))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x+z}}$, and $h(x,y,z) = \\sqrt{y^5+z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (x+z)^{3/2}}+\\frac{5 y^4}{2 \\sqrt{y^5+z}},0,-\\frac{1}{2 (x+z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(sqrt(x+z)))\nh = (1/(sqrt(x+z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x-1)^2 \\left(1+\\tanh ^3(1)-\\tanh (1)\\right)+(x-1) \\left(3-\\tanh ^2(1)\\right)+1+\\tanh (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = x**2\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x-3)^2 \\left(-1+\\tan ^3(3)+\\tan (3)\\right)+(x-3) \\left(\\tan ^2(3)-5\\right)-9+\\tan (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**2\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{7}{2}-x^2\\right)+\\cos \\left(\\frac{7}{2}-7 x\\right)$\n", - "Output Answer": [ - "$7 \\sin \\left(\\frac{7}{2}-7 x\\right)-2 x \\cos \\left(\\frac{7}{2}-x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin((7/2)-x**2)+cos((7/2)-7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-6 x-7)^2 \\sqrt{2 x-4}$\n", - "Output Answer": [ - "$\\frac{(6 x+7) (30 x-41)}{\\sqrt{2} \\sqrt{x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-6*x-7)**2*sqrt(2*x-4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (2 x+6)-\\log (3 x-1)$\n", - "Output Answer": [ - "$\\frac{3}{1-3 x}-2 \\sin (2 (x+3))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2*x+6)-log(3*x-1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z^3}{x}$, $g(x,y,z) = \\tan ^{-1}(x-y)$, and $h(x,y,z) = \\sqrt{y z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z^3}{x^2} & 0 & \\frac{3 z^2}{x} \\\\\n \\frac{1}{(x-y)^2+1} & -\\frac{1}{(x-y)^2+1} & 0 \\\\\n 0 & \\frac{z^3}{2 \\sqrt{y z^3}} & \\frac{3 y z^2}{2 \\sqrt{y z^3}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((z**3)/x)\ng = atan(x-y)\nh = sqrt(y*z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(3-x^5\\right)-\\sqrt{3 x+7}$\n", - "Output Answer": [ - "$5 x^4 \\sec ^2\\left(3-x^5\\right)-\\frac{3}{2 \\sqrt{3 x+7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(3-x**5)-sqrt(3*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x y^3\\right)$, $g(x,y,z) = -\\sin \\left(x-y^3\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{x}{y^3}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{3 x \\sec ^2\\left(\\frac{x}{y^3}\\right)}{y^4},-\\frac{\\sec ^2\\left(\\frac{x}{y^3}\\right)}{y^3},3 x y^2 \\sin \\left(x y^3\\right)-\\cos \\left(x-y^3\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y**3)\ng = -sin(x-y**3)\nh = -sin(x-y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-3 x} \\log \\left(3 x^3-9\\right)$\n", - "Output Answer": [ - "$-\\frac{3 e^{2-3 x} \\left(\\left(x^3-3\\right) \\log \\left(3 \\left(x^3-3\\right)\\right)-x^2\\right)}{x^3-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-3*x)*log(3*x**3-9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{42 x}{5}+\\frac{43}{5}}-\\cos (7 x+9)$\n", - "Output Answer": [ - "$\\frac{21}{\\sqrt{5} \\sqrt{42 x+43}}+7 \\sin (7 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((42*x)/5)+(43/5))-cos(7*x+9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = x^2+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = x**2+z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sqrt{y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-z}}-1,0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = x+z\nh = x+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-8 x-4)^3-\\tan \\left(3-3 x^4\\right)$\n", - "Output Answer": [ - "$-12 \\left(3 x^2 \\left(8 x^4 \\tan \\left(3-3 x^4\\right)-1\\right) \\sec ^2\\left(3-3 x^4\\right)+128 (2 x+1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-8*x-4)**3-tan(3-3*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = z-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n -\\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = log((z/x))\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{6 x-4}}{(9 x-2)^4}$\n", - "Output Answer": [ - "$\\frac{6 e^{6 x-4} (9 x-8)}{(9 x-2)^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(6*x-4))/((9*x-2)**4)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{x+z}$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$5 x^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(x+z)\nh = math.e**(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = \\tan ^{-1}(x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n \\frac{1}{(x-z)^2+1} & 0 & -\\frac{1}{(x-z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = (1/(x**(3/2)))\nh = atan(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(9-6 x^5\\right)+\\sqrt{6 x+4}$\n", - "Output Answer": [ - "$120 x^3 \\left(15 x^5 \\tan \\left(9-6 x^5\\right)-1\\right) \\sec ^2\\left(9-6 x^5\\right)-\\frac{9}{2 \\sqrt{2} (3 x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(9-6*x**5)+sqrt(6*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh ^{-1}(x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{z}{1-x^2 z^2} & 0 & \\frac{x}{1-x^2 z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = y\nh = atanh(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\tanh (x)$", - "Output Answer": [ - "$(x+5)^2 \\left(-1250+\\tanh ^3(5)-\\tanh (5)\\right)+(x+5) \\left(3124+\\tanh ^2(5)\\right)-3125+\\tanh (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = tanh(x)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-21 x^2 \\sin \\left(7 x^3+9\\right)-40 x^4 \\cos \\left(3-8 x^5\\right)$\n", - "Output Answer": [ - "$\\sin \\left(3-8 x^5\\right)+\\cos \\left(7 x^3+9\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -21*x**2*sin(7*x**3+9)-40*x**4*cos(3-8*x**5)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{e^{7 x-4}}+\\cos (1)$\n", - "Output Answer": [ - "$\\frac{7}{2} \\sqrt{e^{7 x-4}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(math.e**(7*x-4))+cos(1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(8 x+3)-\\frac{1}{(9-9 x)^3}$\n", - "Output Answer": [ - "$\\frac{8}{(8 x+3)^2+1}-\\frac{27}{(9-9 x)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(8*x+3)-(1/((9-9*x)**3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(y^5 z\\right)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{15 y^4 z}{2 \\left(y^5 z\\right)^{5/2}},-\\frac{3 y^5}{2 \\left(y^5 z\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y**5*z)**(3/2)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{22 x}{3}+\\frac{11}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{484}{9} \\cos \\left(\\frac{11}{3} (2 x+1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((22*x)/3)+(11/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan \\left(y^2\\right)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(y**2)\nh = tan(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x^3 y\\right)$", - "Output Answer": [ - "$18 x^4 y^2 \\tan \\left(x^3 y\\right) \\sec ^2\\left(x^3 y\\right)+6 x y \\sec ^2\\left(x^3 y\\right)+2 x^6 \\tan \\left(x^3 y\\right) \\sec ^2\\left(x^3 y\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**3*y)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y z^3}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{\\sin \\left(\\frac{x}{y z^3}\\right)}{y z^3},\\frac{x \\sin \\left(\\frac{x}{y z^3}\\right)}{y^2 z^3},\\frac{3 x \\sin \\left(\\frac{x}{y z^3}\\right)}{y z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/(y*z**3)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3 x-2)-\\cos (6 x+8)$\n", - "Output Answer": [ - "$\\frac{3}{3 x-2}+6 \\sin (6 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x-2)-cos(6*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{x+y}+\\frac{1}{y+z}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y)\ng = log(y+z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{21 x^2}{1-\\left(7 x^3+3\\right)^2}$\n", - "Output Answer": [ - "$21 \\left(\\frac{1}{42} \\log \\left(7 x^3+4\\right)-\\frac{1}{42} \\log \\left(7 x^3+2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((21*x**2)/(1-(7*x**3+3)**2))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{x z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\cos (x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(x*z))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z^2 \\left(x+y^3\\right)^2$\n", - "Output Answer": [ - "$\\left\\{2 z^2 \\left(x+y^3\\right),6 y^2 z^2 \\left(x+y^3\\right),2 z \\left(x+y^3\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2*(x+y**3)**2\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x+5} \\tan ^{-1}(3-8 x)$\n", - "Output Answer": [ - "$e^{3 x+5} \\left(3 \\tan ^{-1}(3-8 x)-\\frac{8}{(3-8 x)^2+1}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x+5)*atan(3-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$3 \\sqrt{x^3}+\\sin (5-8 x)$\n", - "Output Answer": [ - "$\\frac{9 \\sqrt{x^3}}{4 x^2}-64 \\sin (5-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 3*sqrt(x**3)+sin(5-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{\\frac{x}{y}-z}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{\\frac{x}{y}-z}},0,\\frac{1}{2 y \\sqrt{\\frac{x}{y}-z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt((x/y)-z)\nh = sqrt((x/y)-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{1296 x^4}-\\cos (4 x+3)$\n", - "Output Answer": [ - "$\\frac{5}{324 x^6}+16 \\cos (4 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(1296*x**4))-cos(4*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^4\\right)$, $g(x,y,z) = \\cos \\left(x^4\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$4 x^3 \\sec ^2\\left(x^4\\right)-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**4)\ng = cos(x**4)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,2 z,y \\cos (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\cos (y+z),\\frac{1}{(x+z)^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+z)\ng = sin(y+z)\nh = sin(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x^5+7}+\\cos \\left(4-5 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{5}{4} \\left(\\frac{3 \\left(9 x^5+56\\right) x^3}{\\left(3 x^5+7\\right)^{3/2}}+8 \\sin \\left(4-5 x^2\\right)-80 x^2 \\cos \\left(4-5 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x**5+7)+cos(4-5*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n z e^{x z} & 0 & x e^{x z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = cbrt(y)\nh = math.e**(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{0,x-1,\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = asin(x)\nh = asin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^2\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{y^3}{z}\\right)$, and $h(x,y,z) = \\tan ^{-1}\\left(x^2+y^3-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2}{x} & 0 & 0 \\\\\n 0 & \\frac{3 y^2}{z \\sqrt{1-\\frac{y^6}{z^2}}} & -\\frac{y^3}{z^2 \\sqrt{1-\\frac{y^6}{z^2}}} \\\\\n \\frac{2 x}{\\left(x^2+y^3-z\\right)^2+1} & \\frac{3 y^2}{\\left(x^2+y^3-z\\right)^2+1} & -\\frac{1}{\\left(x^2+y^3-z\\right)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**2)\ng = asin((y**3)/z)\nh = atan(x**2+y**3-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\log (y-x)$, and $h(x,y,z) = \\frac{y}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 0 & \\frac{1}{z^4} & -\\frac{4 y}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = log(y-x)\nh = (y/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = asin(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{18 x^2}{\\sqrt{1-\\left(6 x^3+1\\right)^2}}$\n", - "Output Answer": [ - "$-\\frac{2 x^{3/2} \\sqrt{3 x^3+1} \\sinh ^{-1}\\left(\\sqrt{3} x^{3/2}\\right)}{\\sqrt{-x^3 \\left(3 x^3+1\\right)}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((18*x**2)/(sqrt(1-(6*x**3+1)**2)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(x)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (6-x) \\sin (7 x+4)$\n", - "Output Answer": [ - "$\\frac{14 (x-6) \\cos (7 x+4)-\\left(49 (x-6)^2 \\log (6-x)+1\\right) \\sin (7 x+4)}{(x-6)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6-x)*sin(7*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = (1/(sqrt(y)))\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan ^{-1}\\left(\\frac{7 x}{2}+\\frac{15}{2}\\right)-1$\n", - "Output Answer": [ - "$-\\frac{14}{49 x^2+210 x+229}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-atan(((7*x)/2)+(15/2))-1, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(5 x+6)$\n", - "Output Answer": [ - "$-\\frac{50 (5 x+6)}{\\left((5 x+6)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(5*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos (5 x+5)-\\tan (7-6 x)$\n", - "Output Answer": [ - "$5 \\sin (5 (x+1))+6 \\sec ^2(7-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(5*x+5)-tan(7-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\cos ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & -\\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = acos(y**4)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\frac{x^2}{y}+z^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 x}{y \\left(\\frac{x^2}{y}+z^2\\right)^2},\\frac{x^2}{y^2 \\left(\\frac{x^2}{y}+z^2\\right)^2},-\\frac{2 z}{\\left(\\frac{x^2}{y}+z^2\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x**2)/y)+z**2))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x+5}+\\log (3-2 x)$\n", - "Output Answer": [ - "$-\\frac{4}{(3-2 x)^2}-\\frac{1}{4 (x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x+5)+log(3-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(y)\nh = x**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$z+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = cos(x)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$3 e^{x^3} x^2+\\sec ^2(y)+\\sec ^2(z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3)\ng = tan(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^3}$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{3 y^2}{2 \\sqrt{y^3}}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**3)\ng = sqrt(y**3)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}\\left(x^4+z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n \\frac{4 x^3}{\\sqrt{1-\\left(x^4+z\\right)^2}} & 0 & \\frac{1}{\\sqrt{1-\\left(x^4+z\\right)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = atanh(y)\nh = asin(x**4+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x^4}}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 z}{x^5 \\left(\\frac{z}{x^4}\\right)^{3/2}},0,-\\frac{1}{2 x^4 \\left(\\frac{z}{x^4}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((z/(x**4)))))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan \\left(x-y^2\\right)$, and $h(x,y,z) = \\log \\left(x+y^2\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{2 y}{x+y^2},-\\frac{1}{x+y^2},\\sec ^2\\left(x-y^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(x-y**2)\nh = tan(x-y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{e^{-x-9}}{\\sqrt{5-6 x}}$\n", - "Output Answer": [ - "$\\frac{e^{-x-9} \\left(36 x^2-24 x+22\\right)}{(5-6 x)^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(-x-9))/(sqrt(5-6*x)))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (8 x)}{\\log \\left(-5 x^4-9\\right)}$\n", - "Output Answer": [ - "$\\frac{4 \\left(\\frac{5 x^3 \\tan (8 x)}{5 x^4+9}-2 \\log \\left(-5 x^4-9\\right) \\sec ^2(8 x)\\right)}{\\log ^2\\left(-5 x^4-9\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(8*x))/(log(-5*x**4-9))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\tan ^{-1}(x-y)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+y}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(x+y)\nh = atan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x-y)^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$-\\frac{2}{(x-y)^3}+\\cos (y+z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x-y)**2))\ng = y\nh = sin(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{z \\left(x^5+y\\right)}$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4 z}{2 \\sqrt{z \\left(x^5+y\\right)}},\\frac{z}{2 \\sqrt{z \\left(x^5+y\\right)}},\\frac{x^5+y}{2 \\sqrt{z \\left(x^5+y\\right)}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z*(x**5+y))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x+7}-\\sin (5-9 x)$\n", - "Output Answer": [ - "$4 e^{4 x+7}+9 \\cos (5-9 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x+7)-sin(5-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(x^2+5\\right)+\\sqrt{-x-4}$\n", - "Output Answer": [ - "$\\left(8 x^2 \\tan \\left(x^2+5\\right)+2\\right) \\sec ^2\\left(x^2+5\\right)-\\frac{1}{4 (-x-4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(x**2+5)+sqrt(-x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z-y}} & \\frac{1}{2 \\sqrt{z-y}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = cos(y)\nh = sqrt(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\cos (6-7 x)}$\n", - "Output Answer": [ - "$-\\frac{49 (\\cos (12-14 x)+3)}{8 \\cos ^{\\frac{3}{2}}(6-7 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(cos(6-7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$e^{2 x^2}-\\sin (4 x)$\n", - "Output Answer": [ - "$202 e^{50}-8 \\sin (20)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(2*x**2)-sin(4*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}-z\\right)^{3/2}}$, and $h(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 \\left(\\frac{x}{y}-z\\right)^{5/2}}-\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2},0,-\\frac{3}{2 y \\left(\\frac{x}{y}-z\\right)^{5/2}}-x \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = (1/(((x/y)-z)**(3/2)))\nh = (1/(((x/y)-z)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^3+y-z\\right)^5$, $g(x,y,z) = x^3+z$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$15 x^2 \\left(x^3+y-z\\right)^4-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**3+y-z)**5\ng = x**3+z\nh = cos(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y-z)$, $g(x,y,z) = \\sin ^{-1}(x-y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x-\\frac{1}{\\sqrt{1-(x-y)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y-z)\ng = asin(x-y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(5 x^3+5\\right)$\n", - "Output Answer": [ - "$30 x \\cos \\left(5 \\left(x^3+1\\right)\\right)-225 x^4 \\sin \\left(5 \\left(x^3+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(5*x**3+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{x^2}{y^2}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{2 x}{y^2}-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/x))\ng = ((x**2)/(y**2))\nh = ((x**2)/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\tanh (x-y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\text{sech}^2(x-y) & \\text{sech}^2(x-y) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = -tanh(x-y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3 \\sqrt{y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = y\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (4 x+1)$\n", - "Output Answer": [ - "$4 \\cos (4 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4*x+1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{7 x}{2}+7}$\n", - "Output Answer": [ - "$\\frac{49}{4} e^{\\frac{7 x}{2}+7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((7*x)/2)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x^3 y z^3}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{3}{x^4 y z^3},-\\frac{1}{x^3 y^2 z^3},-\\frac{3}{x^3 y z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**3*y*z**3))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y+z\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = -\\tan (x-y)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$\\left\\{0,-3 x^2-\\frac{\\sin \\left(\\frac{z}{x}\\right)}{x},-\\sec ^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((z/x))\ng = -tan(x-y)\nh = -tan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{x z}$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x z}^2}+\\sec ^2(x)+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cbrt(y)\nh = cbrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sinh \\left(x^4-y\\right)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{1,1,4 x^3 \\cosh \\left(x^4-y\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = sinh(x**4-y)\nh = sinh(x**4-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{3}{4 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**(3/2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^3\\right)$, $g(x,y,z) = \\cos ^{-1}(y z)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x^3}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{\\sqrt{1-y^2 z^2}},\\frac{3 z \\cos \\left(\\frac{z}{x^3}\\right)}{x^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**3)\ng = acos(y*z)\nh = acos(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\log \\left(\\frac{x}{y}-z\\right)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\frac{x}{y}-z},-\\cos (x),\\frac{1}{y \\left(\\frac{x}{y}-z\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = log((x/y)-z)\nh = log((x/y)-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3 x-3)-\\cos (6 x+5)$\n", - "Output Answer": [ - "$\\frac{1}{x-1}+6 \\sin (6 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x-3)-cos(6*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x-y+z^4\\right)^5$, $g(x,y,z) = y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,20 z^3 \\left(x-y+z^4\\right)^4,5 \\left(x-y+z^4\\right)^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y+z**4)**5\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$z \\sec ^2(x z)+\\cos (y)+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = sin(y)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (9 x+3)$\n", - "Output Answer": [ - "$-81 \\cos (9 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(9*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x z}{y}\\right)$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & -\\frac{1}{y} & \\frac{1}{z} \\\\\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(((x*z)/y))\ng = sin((x/y))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x^3+1}$\n", - "Output Answer": [ - "$9 e^{3 x^3+1} x \\left(9 x^3+2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x**3+1)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{9 x-9}$\n", - "Output Answer": [ - "$81 e^{9 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(9*x-9)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-8 x-7)+\\tan ^{-1}(5 x+5)$\n", - "Output Answer": [ - "$\\frac{5}{(5 x+5)^2+1}+\\frac{8}{8 x+7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-8*x-7)+atan(5*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y-z)$, $g(x,y,z) = x y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y-z)\ng = x*y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fourth term in the series expansion of the following function around 4:\n\n$\\log \\left(\\frac{7 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{64}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(((7*x)/2)))\nseries = f.series(x, 4, None)\nfor i, term in enumerate(series):\n if i == 4: print(term)\n elif i > 4: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\cos (x)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y)\nh = (1/(x**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x-2}+\\log (6 x+2)$\n", - "Output Answer": [ - "$\\frac{3}{3 x+1}-4 e^{-4 x-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x-2)+log(6*x+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (2 x+9)+\\frac{1}{e^4}$\n", - "Output Answer": [ - "$-4 \\sin (2 x+9)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(2*x+9)+(1/(math.e**4))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$-\\frac{x^4}{6}+\\frac{x^3}{6}+x^2+x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{1-x^2 z^2}}+4 y^3+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*z)\ng = y**4\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = (x+y)^3$", - "Output Answer": [ - "$\\left\\{3 (x+y)^2,x e^{x z}-3 (x+y)^2,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+z}}+\\sec ^2(x)+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = asin(y)\nh = sqrt(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{32 x}{5}-\\frac{36}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{64}{(9-8 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((32*x)/5)-(36/5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+2 y+\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**2\nh = acosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-7 x-5)+\\tan (8 x+4)$\n", - "Output Answer": [ - "$\\frac{7}{7 x+5}+8 \\sec ^2(8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-7*x-5)+tan(8*x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5}{y^5 z^{10}}$", - "Output Answer": [ - "$\\frac{30 x^5}{y^7 z^{10}}+\\frac{110 x^5}{y^5 z^{12}}+\\frac{20 x^3}{y^5 z^{10}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/(y**5*z**10))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{2 x^2 \\left(49 x^4+42 x+15\\right)}{\\left(2 x^3+3\\right) \\left(7 x^4+5\\right)}$\n", - "Output Answer": [ - "$2 \\left(\\frac{1}{2} \\log \\left(2 x^3+3\\right)+\\frac{1}{2} \\log \\left(7 x^4+5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((2*x**2*(49*x**4+42*x+15))/((2*x**3+3)*(7*x**4+5)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{x y}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{z},-\\frac{y}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = x^3 z^3$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 3 x^2 z^3 & 0 & 3 x^3 z^2 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*y)\ng = x**3*z**3\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^5\\right)$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{\\sqrt{1-x^{10}}} & 0 & 0 \\\\\n 0 & e^{y+z} & e^{y+z} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x**5)\ng = math.e**(y+z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$6 e^{-6 x-1}+\\frac{1}{x-1}$\n", - "Output Answer": [ - "$\\log (x-1)-e^{-6 x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 6*math.e**(-6*x-1)+(1/(x-1))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 z^5$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,5 x^5 z^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*z**5\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(x+z^2\\right)$, and $h(x,y,z) = \\sqrt{\\frac{x}{y z^2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n -\\frac{1}{\\sqrt{1-\\left(x+z^2\\right)^2}} & 0 & -\\frac{2 z}{\\sqrt{1-\\left(x+z^2\\right)^2}} \\\\\n \\frac{1}{2 y z^2 \\sqrt{\\frac{x}{y z^2}}} & -\\frac{x}{2 y^2 z^2 \\sqrt{\\frac{x}{y z^2}}} & -\\frac{x}{y z^3 \\sqrt{\\frac{x}{y z^2}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((x/y))\ng = acos(x+z**2)\nh = sqrt((x/(y*z**2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{0,-z,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = x^5$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y+z}^2},y,5 x^4-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = x**5\nh = x**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y)\ng = cos(y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x+z^3\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^{12}$", - "Output Answer": [ - "$-\\sin \\left(x+z^3\\right)+\\frac{1}{2 \\sqrt{y}}+12 z^{11}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z**3)\ng = sqrt(y)\nh = z**12\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = y**2\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = asin(y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $e^{x^5}$", - "Output Answer": [ - "$\\sqrt{x}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = math.e**(x**5)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5 y^5$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\left(\\frac{x y}{z}\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 y^5 & 5 x^5 y^4 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{3 y \\sqrt{\\frac{x y}{z}}}{2 z} & \\frac{3 x \\sqrt{\\frac{x y}{z}}}{2 z} & -\\frac{3 x y \\sqrt{\\frac{x y}{z}}}{2 z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5*y**5\ng = acos(y)\nh = ((x*y)/z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{\\left(\\frac{z}{y}\\right)^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2 y \\left(\\frac{z}{y}\\right)^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/((z/y)**(3/2)))\nh = (1/((z/y)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (4)}{\\log (7 x+4)}$\n", - "Output Answer": [ - "$-\\frac{7 \\tan (4)}{(7 x+4) \\log ^2(7 x+4)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(4))/(log(7*x+4))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$-\\frac{1}{x^2}+\\frac{1}{2 \\sqrt{y}}+\\frac{2 z^3}{\\sqrt{z^4}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sqrt(y)\nh = sqrt(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan (x-y-z)$, and $h(x,y,z) = \\frac{1}{z-y}$", - "Output Answer": [ - "$\\left\\{\\sec ^2(x-y-z)+\\frac{1}{(z-y)^2},0,\\sec ^2(x-y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = tan(x-y-z)\nh = tan(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(1-8 x^2\\right)$\n", - "Output Answer": [ - "$16 \\left(\\sin \\left(1-8 x^2\\right)-16 x^2 \\cos \\left(1-8 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(1-8*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$", - "Output Answer": [ - "$\\frac{1}{(x+y)^2+1}+\\frac{x}{2 z^2 \\left(\\frac{x}{z}\\right)^{3/2}}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y)\ng = log(y)\nh = (1/(sqrt((x/z))))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$30 e^{6 x^5-3} x^4$\n", - "Output Answer": [ - "$e^{6 x^5-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 30*math.e**(6*x**5-3)*x**4\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{z}{y^2}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (z/y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = math.e**y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{5 y^4}{\\sqrt{1-y^{10}}} & 0 \\\\\n 4 x^3 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = asin(y**5)\nh = x**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{2 \\sqrt{y}}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{5-3 x} \\tan ^{-1}(2 x+3)$\n", - "Output Answer": [ - "$e^{5-3 x} \\left(\\frac{4 \\left(3 x^2+10 x+9\\right)}{\\left(2 x^2+6 x+5\\right)^2}-9 \\tan ^{-1}(2 x+3)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(5-3*x)*atan(2*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{2 x}{3 \\sqrt[3]{x^2}^2}-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**2)\ng = cos(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x+z^3\\right)^3$\n", - "Output Answer": [ - "$\\left\\{3 \\left(x+z^3\\right)^2,0,9 z^2 \\left(x+z^3\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z**3)**3\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = (1/(sqrt(y)))\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (4-2 x)}{(x+1)^2}$\n", - "Output Answer": [ - "$\\frac{(2 x+\\sin (8-4 x)+2) \\sec ^2(4-2 x)}{(x+1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(4-2*x))/((x+1)**2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{1}{\\sqrt{z^4-y}}$, and $h(x,y,z) = \\frac{x}{z^4}$", - "Output Answer": [ - "$\\left\\{\\frac{2 z^3}{\\left(z^4-y\\right)^{3/2}},-\\frac{1}{z^4},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (1/(sqrt(z**4-y)))\nh = (1/(sqrt(z**4-y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(y^2 z^2\\right)$, $g(x,y,z) = \\sqrt[3]{y^2-z^2}$, and $h(x,y,z) = \\left(x y^2+z^2\\right)^{3/2}$", - "Output Answer": [ - "$3 z \\sqrt{x y^2+z^2}+\\frac{2 y}{3 \\sqrt[3]{y^2-z^2}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y**2*z**2)\ng = cbrt(y**2-z**2)\nh = (x*y**2+z**2)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$(x+1) (1+\\sin (1))-1+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tanh ^{-1}\\left(x y^2\\right)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{y^2}{1-x^2 y^4} & \\frac{2 x y}{1-x^2 y^4} & 0 \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = atanh(x*y**2)\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(\\frac{9}{2}-x\\right)$\n", - "Output Answer": [ - "$\\frac{16 (2 x-9)}{\\left(4 x^2-36 x+85\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan((9/2)-x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y-z)^{3/2}}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3}{2 (y-z)^{5/2}} & \\frac{3}{2 (y-z)^{5/2}} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y-z)**(3/2)))\ng = asin(y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y+z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log \\left(z-x^5\\right)$", - "Output Answer": [ - "$\\frac{1}{z-x^5}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y+z)\ng = cos(y)\nh = log(z-x**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{(z-y)^2}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\frac{2}{(z-y)^3}+\\sinh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/((z-y)**2))\nh = cosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{y}{x}\\right)^{3/2}}$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z-y}},\\frac{1}{2 z \\left(\\frac{x}{z}\\right)^{3/2}},\\frac{3}{2 x \\left(\\frac{y}{x}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y/x)**(3/2)))\ng = sqrt(z-y)\nh = sqrt(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x}-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\frac{y^4}{z^4}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\frac{4 y^3}{z^4}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = ((y**4)/(z**4))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{42 x^3}{5}-7$\n", - "Output Answer": [ - "$-\\frac{252 x}{5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((42*x**3)/5)-7\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin (x)$ on the interval $x = 5$ to $x = 6$\n", - "Output Answer": [ - "$\\sqrt{2} \\left(E\\left(6-\\pi \\left|\\frac{1}{2}\\right.\\right)-E\\left(5-\\pi \\left|\\frac{1}{2}\\right.\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(x)\na = 5\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{3}{625} (x+3)^4+\\frac{13}{750} (x+3)^3+\\frac{3}{50} (x+3)^2+\\frac{x+3}{5}-2 \\tan ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -3, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(x y-z^4\\right)^5$, $g(x,y,z) = \\sqrt[3]{x z^4}$, and $h(x,y,z) = x-y-z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 y \\left(x y-z^4\\right)^4 & 5 x \\left(x y-z^4\\right)^4 & -20 z^3 \\left(x y-z^4\\right)^4 \\\\\n \\frac{z^4}{3 \\sqrt[3]{x z^4}^2} & 0 & \\frac{4 x z^3}{3 \\sqrt[3]{x z^4}^2} \\\\\n 1 & -1 & -4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x*y-z**4)**5\ng = cbrt(x*z**4)\nh = x-y-z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = x^4+y+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 4 x^3 & 1 & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = x**4+y+z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = x^3 z^3$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n 3 x^2 z^3 & 0 & 3 x^3 z^2 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = x**3*z**3\nh = (z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = tan(y)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log \\left(z^4 (x-y)\\right)$, and $h(x,y,z) = \\tan (x-y)$", - "Output Answer": [ - "$1-\\frac{1}{x-y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z**4*(x-y))\nh = tan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = (1/(y*z))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(y^5+z\\right)$, $g(x,y,z) = \\sqrt{x+y^5}$, and $h(x,y,z) = z^5 \\left(x+y^5\\right)^5$", - "Output Answer": [ - "$5 z^4 \\left(x+y^5\\right)^5+\\frac{5 y^4}{2 \\sqrt{x+y^5}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y**5+z)\ng = sqrt(x+y**5)\nh = z**5*(x+y**5)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5\ng = sqrt(y)\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (x+y-z)$", - "Output Answer": [ - "$-\\sec ^2(x+y-z)+\\frac{1}{\\sqrt{1-(x+y)^2}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+y)\ng = cos(y)\nh = tan(x+y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^3}{y^3}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = (x+y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 x^2}{y^3} & -\\frac{3 x^3}{y^4} & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 2 (x+y) & 2 (x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**3)/(y**3))\ng = atanh(y)\nh = (x+y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = (x+z)^2$, and $h(x,y,z) = \\frac{1}{(y z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 2 (x+z) & 0 & 2 (x+z) \\\\\n 0 & -\\frac{3 z}{2 (y z)^{5/2}} & -\\frac{3 y}{2 (y z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = (x+z)**2\nh = (1/((y*z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^2\\right)$, $g(x,y,z) = z^4-y$, and $h(x,y,z) = \\cos ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{x^4+1} & 0 & 0 \\\\\n 0 & -1 & 4 z^3 \\\\\n 0 & 0 & -\\frac{4 z^3}{\\sqrt{1-z^8}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x**2)\ng = z**4-y\nh = acos(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = -\\sin ^{-1}\\left(x^2-y^3\\right)$", - "Output Answer": [ - "$-\\frac{9 y^4 \\left(x^2-y^3\\right)}{\\left(1-\\left(x^2-y^3\\right)^2\\right)^{3/2}}+\\frac{6 y}{\\sqrt{1-\\left(x^2-y^3\\right)^2}}-\\frac{2}{\\sqrt{1-\\left(x^2-y^3\\right)^2}}-\\frac{4 x^2 \\left(x^2-y^3\\right)}{\\left(1-\\left(x^2-y^3\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asin(x**2-y**3)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^4\\right)$, $g(x,y,z) = \\sin \\left(x^4 y\\right)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left\\{z,0,4 x^3 y \\cos \\left(x^4 y\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4)\ng = sin(x**4*y)\nh = sin(x**4*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{y z^2}$\n", - "Output Answer": [ - "$\\left\\{0,z^2 e^{y z^2},2 y z e^{y z^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y*z**2)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3-x}-\\cos (4-3 x)$\n", - "Output Answer": [ - "$e^{3-x}+9 \\cos (4-3 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3-x)-cos(4-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y**4\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(3 x+9)^3}+\\sin (4-x)$\n", - "Output Answer": [ - "$-\\frac{1}{9 (x+3)^4}-\\cos (4-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3*x+9)**3))+sin(4-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cosh (x+z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n \\sinh (x+z) & 0 & \\sinh (x+z) \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cosh(x+z)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{x+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+z)\ng = tan(y)\nh = cbrt(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**y\nh = (1/(x**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^2}{y^8}$", - "Output Answer": [ - "$\\frac{72 z^2}{y^{10}}+\\frac{2}{y^8}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/(y**8))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x}{y z^2 \\sqrt{1-\\frac{x^2}{y^2 z^2}}},\\frac{x}{y^2 z \\sqrt{1-\\frac{x^2}{y^2 z^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x/(y*z))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(x-z^2\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin \\left(x+z^2\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2 z}{\\sqrt{1-\\left(x-z^2\\right)^2}}-\\cos \\left(x+z^2\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x-z**2)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(8 x-4)^5+\\log (-8 x-9)$\n", - "Output Answer": [ - "$8 \\left(5 (4-8 x)^4+\\frac{1}{8 x+9}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8*x-4)**5+log(-8*x-9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = (x-y)^2$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$-2 (x-y)+\\frac{1}{x}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = (x-y)**2\nh = (z/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (x)$ on the interval $x = 2$ to $x = 5$\n", - "Output Answer": [ - "$-\\sqrt{5}+\\sqrt{26}+\\tanh ^{-1}\\left(\\sqrt{5}\\right)-\\tanh ^{-1}\\left(\\sqrt{26}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x)\na = 2\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sin(y*z)\nh = sin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = y\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos (x-y-z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{-\\sin (x-y-z),0,-\\sin (x-y-z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cos(x-y-z)\nh = cos(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-3 x-7)$\n", - "Output Answer": [ - "$-\\frac{9}{(3 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(x+y)\nh = cbrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(3 x+3)^3}-\\tan (9 x+2)$\n", - "Output Answer": [ - "$-\\frac{1}{9 (x+1)^4}-9 \\sec ^2(9 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3*x+3)**3))-tan(9*x+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{z}{3 \\sqrt[3]{x z}^2}+\\frac{1}{3 \\sqrt[3]{y}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z)\ng = cbrt(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\frac{x^4}{y^4}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n \\frac{4 x^3}{y^4} & -\\frac{4 x^4}{y^5} & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = ((x**4)/(y**4))\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x^3-7}+\\left(-\\frac{5 x}{3}-4\\right)^4$\n", - "Output Answer": [ - "$-\\frac{9 x^4}{4 \\left(x^3-7\\right)^{3/2}}+\\frac{3 x}{\\sqrt{x^3-7}}+\\frac{100}{27} (5 x+12)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x**3-7)+(-((5*x)/3)-4)**4\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{21 x^2}{7 x^3-5}$\n", - "Output Answer": [ - "$\\log \\left(7 x^3-5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((21*x**2)/(7*x**3-5))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(4 x+1)^2}+\\sin ^{-1}(7 x+6)$\n", - "Output Answer": [ - "$\\frac{49 (7 x+6)}{\\left(1-(7 x+6)^2\\right)^{3/2}}+\\frac{96}{(4 x+1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((4*x+1)**2))+asin(7*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-5 x^4-5\\right)^2+\\log (2 x+3)$\n", - "Output Answer": [ - "$1400 x^6+600 x^2-\\frac{4}{(2 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-5*x**4-5)**2+log(2*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = -\\tan (x-z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\sec ^2(x-z)+\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = atan(y)\nh = -tan(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7 x^3+7\\right)$\n", - "Output Answer": [ - "$42 x \\cos \\left(7 \\left(x^3+1\\right)\\right)-441 x^4 \\sin \\left(7 \\left(x^3+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x**3+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{z}{\\sqrt{z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = x\nh = sqrt(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5-8 x} \\cos (5-3 x)$\n", - "Output Answer": [ - "$e^{5-8 x} (3 \\sin (5-3 x)-8 \\cos (5-3 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5-8*x)*cos(5-3*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^6$, $g(x,y,z) = \\sin ^{-1}\\left(x^2\\right)$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$6 x^5+\\frac{y}{2 \\sqrt{y z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**6\ng = asin(x**2)\nh = sqrt(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (6)-(7 x-6)^2$\n", - "Output Answer": [ - "$84-98 x$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(6)-(7*x-6)**2, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-8 x^3-4}-\\sqrt{2}$\n", - "Output Answer": [ - "$-24 e^{-8 x^3-4} x^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-8*x**3-4)-sqrt(2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-7 x-3}-\\tan (8 x+8)$\n", - "Output Answer": [ - "$-\\frac{49}{4 (-7 x-3)^{3/2}}-128 \\tan (8 (x+1)) \\sec ^2(8 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-7*x-3)-tan(8*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = x z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$4 x^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = x*z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sqrt{z (x-y)}$", - "Output Answer": [ - "$\\frac{x-y}{2 \\sqrt{z (x-y)}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(x)\nh = sqrt(z*(x-y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x+8}+\\cosh (3-9 x)$\n", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+8}}-9 \\sinh (3-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x+8)+cosh(3-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(7 x+7)^5}$\n", - "Output Answer": [ - "$\\frac{1470}{(7 x+7)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x+7)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = tan(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = x^3 y^3$", - "Output Answer": [ - "$1-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(y)\nh = x**3*y**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = x y+z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = x*y+z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{17 x}{2}+5\\right)^3-x^2$\n", - "Output Answer": [ - "$\\frac{51}{8} (17 x+10)^2-2 x$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((17*x)/2)+5)**3-x**2, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(z \\left(x-y^3\\right)\\right)$", - "Output Answer": [ - "$-\\frac{9 y^4 z^3 \\left(x-y^3\\right)}{\\left(1-z^2 \\left(x-y^3\\right)^2\\right)^{3/2}}+\\frac{6 y z}{\\sqrt{1-z^2 \\left(x-y^3\\right)^2}}-\\frac{z^3 \\left(x-y^3\\right)}{\\left(1-z^2 \\left(x-y^3\\right)^2\\right)^{3/2}}-\\frac{z \\left(x-y^3\\right)^3}{\\left(1-z^2 \\left(x-y^3\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z*(x-y**3))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sinh \\left(z^3\\right)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{y}+3 z^2 \\cosh \\left(z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y)\nh = sinh(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-9 x^2}-\\sin ^{-1}\\left(x^2+2\\right)$\n", - "Output Answer": [ - "$-18 e^{2-9 x^2} x-\\frac{2 x}{\\sqrt{1-\\left(x^2+2\\right)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-9*x**2)-asin(x**2+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(2 x^4+4\\right)-e^{1-7 x}$\n", - "Output Answer": [ - "$7 e^{1-7 x}-8 x^3 \\sec ^2\\left(2 \\left(x^4+2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-tan(2*x**4+4)-math.e**(1-7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & z & y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z)\ng = cos(y)\nh = y*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^3\\right)$, $g(x,y,z) = \\tan \\left(x^3\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$3 x^2 \\sec ^2\\left(x^3\\right)-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**3)\ng = tan(x**3)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\sinh (x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = y\nh = (x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(9 x^5+8\\right)$\n", - "Output Answer": [ - "$45 x^3 \\left(4 \\cos \\left(9 x^5+8\\right)-45 x^5 \\sin \\left(9 x^5+8\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(9*x**5+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{y-x}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{1}{(y-x)^2}+e^x+\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(y-x))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\frac{1}{x z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{1}{x^2 z} & 0 & -\\frac{1}{x z^2} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = (1/(x*z))\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{e^{5 x^2+7} x \\left(5 x^4-4 x^2-5\\right)}{32 \\left(x^4-1\\right)^3}$\n", - "Output Answer": [ - "$\\frac{e^{5 x^2+7}}{64 \\left(x^4-1\\right)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(5*x**2+7)*x*(5*x**4-4*x**2-5))/(32*(x**4-1)**3))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\tan ^{-1}(y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & -\\frac{1}{y} & 0 \\\\\n 0 & 1 & 1 \\\\\n 0 & \\frac{z}{y^2 z^2+1} & \\frac{y}{y^2 z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((x/y))\ng = y+z\nh = atan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = z$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = z\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-1}+\\sin (4-6 x)$\n", - "Output Answer": [ - "$5 e^{5 x-1}-6 \\cos (4-6 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-1)+sin(4-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^{y-z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**(y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+e^{y+z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = math.e**(y+z)\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\sinh ^{-1}(x-y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{1}{\\sqrt{(x-y)^2+1}} & \\frac{1}{\\sqrt{(x-y)^2+1}} & 0 \\\\\n 0 & 0 & -\\frac{z}{\\left(z^2\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = -asinh(x-y)\nh = (1/(sqrt(z**2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x y)$, $g(x,y,z) = x z$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\sinh (x y) & x \\sinh (x y) & 0 \\\\\n z & 0 & x \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x*y)\ng = x*z\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = asin(y)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\cos (y)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sin(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos \\left(x^3\\right)$", - "Output Answer": [ - "$(x-4) \\left(\\left(1+\\tan ^2(4)\\right) \\sec (64)+48 \\tan (4) \\tan (64) \\sec (64)\\right)+\\tan (4) \\sec (64)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x**3)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\sin \\left(x+y^2\\right)$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left\\{0,x \\sec ^2(x z)-\\frac{1}{2 \\sqrt{x+z}},\\cos \\left(x+y^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = sin(x+y**2)\nh = sin(x+y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$-\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2}+4 y^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((z/x))\ng = y**4\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x-2}-\\frac{1}{32}$\n", - "Output Answer": [ - "$-e^{-x-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x-2)-(1/32), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & -1 \\\\\n -\\frac{1}{x^2} & 0 & 0 \\\\\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-z\ng = (1/x)\nh = sin((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\left(\\frac{1}{\\sqrt{26}}-\\frac{1}{2 \\sqrt{5}}\\right) (x-5)-\\sqrt{5}+\\sinh ^{-1}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (8 x+3)+\\tan ^{-1}(7-5 x)$\n", - "Output Answer": [ - "$-\\frac{5}{(7-5 x)^2+1}-8 \\sin (8 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(8*x+3)+atan(7-5*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (z-x)^3$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -3 (z-x)^2 & 0 & 3 (z-x)^2 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z-y}} & \\frac{1}{2 \\sqrt{z-y}} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z-x)**3\ng = sqrt(z-y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = y^9$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**(3/2)\ng = asin(x)\nh = y**9\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acosh(y)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = \\log (y-x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-x}-\\cos (y+z),\\frac{1}{y-x}+\\frac{1}{y+z},-\\frac{1}{y+z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y+z)\ng = sin(y+z)\nh = sin(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 z^2$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt{x^3}$", - "Output Answer": [ - "$3 x^2 z^2+\\frac{3 \\sqrt{y}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*z**2\ng = y**(3/2)\nh = sqrt(x**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(x^3+6\\right)$\n", - "Output Answer": [ - "$6 x \\cos \\left(x^3+6\\right)-9 x^4 \\sin \\left(x^3+6\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(x**3+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x^4\\right)^{3/2}}$, $g(x,y,z) = \\sqrt[3]{x^4+y^5}$, and $h(x,y,z) = \\frac{1}{x^4+y^5}$", - "Output Answer": [ - "$\\left\\{-\\frac{5 y^4}{\\left(x^4+y^5\\right)^2},\\frac{4 x^3}{\\left(x^4+y^5\\right)^2},\\frac{4 x^3}{3 \\sqrt[3]{x^4+y^5}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**4)**(3/2)))\ng = cbrt(x**4+y**5)\nh = cbrt(x**4+y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x-y^2+z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x-y^2+z}},-\\frac{y}{\\sqrt{x-y^2+z}},\\frac{1}{2 \\sqrt{x-y^2+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y**2+z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+8}+e^{\\frac{9 x}{2}+6}$\n", - "Output Answer": [ - "$e^{x+8}+\\frac{9}{2} e^{\\frac{9 x}{2}+6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+8)+math.e**(((9*x)/2)+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sinh ^{-1}(x)$", - "Output Answer": [ - "$1-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = asinh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x+y}{z}$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{x+y}{z^2},-\\frac{1}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x-y^2\\right)$, $g(x,y,z) = \\log \\left(x y^2\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x}-2 y \\sin \\left(x-y^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y**2)\ng = log(x*y**2)\nh = log(x*y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(y-z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}-\\frac{1}{(y-z)^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = y\nh = atan(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = -\\sin ^{-1}(x-y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{\\sqrt{1-x^2 y^2}} & -\\frac{x}{\\sqrt{1-x^2 y^2}} & 0 \\\\\n -\\frac{1}{\\sqrt{1-(x-y)^2}} & \\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x*y)\ng = -asin(x-y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-5}+\\frac{1}{3 x-\\frac{15}{2}}$\n", - "Output Answer": [ - "$4 e^{4 x-5}-\\frac{4}{3 (5-2 x)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-5)+(1/(3*x-(15/2))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (x/y)\nh = cos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = z\nh = tan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-z}$, $g(x,y,z) = -\\tan (x-y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\sec ^2(x-y)+\\frac{1}{3 \\sqrt[3]{x-z}^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-z)\ng = -tan(x-y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x z)$, $g(x,y,z) = \\sqrt[3]{x-y}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{x^2 z^2+1}}-\\frac{1}{3 \\sqrt[3]{x-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x*z)\ng = cbrt(x-y)\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)},0,\\frac{1}{x \\left(\\frac{z^2}{x^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z/x)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(6-3 x^2\\right)-\\cos (7)$\n", - "Output Answer": [ - "$6 \\left(6 x^2 \\sin \\left(6-3 x^2\\right)+\\cos \\left(6-3 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(6-3*x**2)-cos(7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-6 x-1}-\\tan (3 x+2)$\n", - "Output Answer": [ - "$36 e^{-6 x-1}-18 \\tan (3 x+2) \\sec ^2(3 x+2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-6*x-1)-tan(3*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{z}{y^4}$", - "Output Answer": [ - "$4 x^3+4 y^3+\\frac{1}{y^4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y**4\nh = (z/(y**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = y**(3/2)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x^3}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z \\cos \\left(\\frac{z}{x^3}\\right)}{x^4}+1,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(7-9 x^2\\right)$\n", - "Output Answer": [ - "$18 \\left(1-36 x^2 \\tan \\left(7-9 x^2\\right)\\right) \\sec ^2\\left(7-9 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(7-9*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^{z^5}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y}+5 e^{z^5} z^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y)\nh = math.e**(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x-4}$\n", - "Output Answer": [ - "$9 e^{3 x-4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(5 x+7)^2}-\\cos \\left(3-x^2\\right)$\n", - "Output Answer": [ - "$-2 x \\sin \\left(3-x^2\\right)-\\frac{10}{(5 x+7)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((5*x+7)**2))-cos(3-x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(6 x+1)^4 \\tan ^{-1}(9-x)$\n", - "Output Answer": [ - "$(6 x+1)^3 \\left(\\frac{6 x+1}{(x-9)^2+1}-24 \\tan ^{-1}(9-x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(6*x+1)**4*atan(9-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\frac{1}{\\left(x^2 y\\right)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{3 x^2}{2 \\left(x^2 y\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = (1/((x**2*y)**(3/2)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{x-y-z}$", - "Output Answer": [ - "$-\\frac{1}{3 \\sqrt[3]{x-y-z}^2}-\\sin (x)+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(y)\nh = cbrt(x-y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log \\left(z-y^3\\right)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & -\\frac{3 y^2}{z-y^3} & \\frac{1}{z-y^3} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = log(z-y**3)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x^2-\\frac{13}{3}}$\n", - "Output Answer": [ - "$-\\frac{104 \\sqrt{3}}{\\left(24 x^2-13\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x**2-(13/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{3 x}{2}+\\frac{1}{2}}-\\tan ^{-1}\\left(\\frac{7}{2}-7 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{14 x}{\\left(\\frac{7}{2}-7 x^2\\right)^2+1}+\\frac{3}{2 \\sqrt{6 x+2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((3*x)/2)+(1/2))-atan((7/2)-7*x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\infty$ on the interval $x = 0$ to $x = 4$\n", - "Output Answer": [ - "$\\text{ArcLength}[-\\infty ,\\{x,0,4\\}]$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -float(\"inf\")\na = 0\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{y}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = log(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$e^x-\\sin (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cos(y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{x+6}}{343 x^6}$\n", - "Output Answer": [ - "$\\frac{e^{x+6} (x-6)}{343 x^7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(x+6))/(343*x**6)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^2 z}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\log \\left(x^2 z\\right)$", - "Output Answer": [ - "$\\frac{x z}{\\sqrt{x^2 z}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2*z)\ng = tan(z)\nh = log(x**2*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{\\left(y^4\\right)^{3/2}}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/((y**4)**(3/2)))\nh = (1/((y**4)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n \\sqrt[3]{x} & x>0 \\\\\n -\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6-7 x^5\\right)$\n", - "Output Answer": [ - "$35 x^3 \\left(4 \\sin \\left(6-7 x^5\\right)-35 x^5 \\cos \\left(6-7 x^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6-7*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{52}{3} e^{-\\frac{2}{3} \\left(13 x^2+4\\right)} x$\n", - "Output Answer": [ - "$e^{-\\frac{26 x^2}{3}-\\frac{8}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -(52/3)*math.e**(-(2/3)*(13*x**2+4))*x\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-2 \\sin (5 x+5)$\n", - "Output Answer": [ - "$50 \\sin (5 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -2*sin(5*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y^3}\\right)$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{x}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/(y**3)))\ng = x-z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = e^{y^5-x}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}+5 y^4 e^{y^5-x}+5 z^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = math.e**(y**5-x)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tanh \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n -\\frac{y \\text{sech}^2\\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\text{sech}^2\\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = math.e**y\nh = tanh(y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (4 x+5)+\\tan (9 x+7)$\n", - "Output Answer": [ - "$162 \\tan (9 x+7) \\sec ^2(9 x+7)-\\frac{16}{(4 x+5)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x+5)+tan(9*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (8)-\\sqrt{6-2 x}$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{6-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(8)-sqrt(6-2*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tanh (y-z)$, $g(x,y,z) = x^2$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{0,\\text{sech}^2(y-z),2 x+\\text{sech}^2(y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tanh(y-z)\ng = x**2\nh = x**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\cos (x y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n e^x & 0 & 0 \\\\\n -y z \\sin (x y z) & -x z \\sin (x y z) & -x y \\sin (x y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(z)))\ng = math.e**x\nh = cos(x*y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\left(\\frac{z}{y}\\right)^{3/2}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{3 \\sqrt{\\frac{z}{y}}}{2 y},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (z/y)**(3/2)\nh = (z/y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(7 x+\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$-49 \\sin \\left(7 x+\\frac{13}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(7*x+(13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x-5} \\cos (x+4)$\n", - "Output Answer": [ - "$e^{6 x-5} (6 \\cos (x+4)-\\sin (x+4))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x-5)*cos(x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(4-x)-\\sqrt{3 x+3}$\n", - "Output Answer": [ - "$\\frac{1}{-x^2+8 x-17}-\\frac{3}{2 \\sqrt{3 x+3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(4-x)-sqrt(3*x+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan ^{-1}(y+z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = atan(y+z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-9}+\\tan ^{-1}\\left(\\frac{3 x}{2}+7\\right)$\n", - "Output Answer": [ - "$64 e^{-8 x-9}-\\frac{36 (3 x+14)}{\\left(9 x^2+84 x+200\\right)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-9)+atan(((3*x)/2)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\tan (9-2 x)}$\n", - "Output Answer": [ - "$-\\frac{(2 \\cos (18-4 x)-1) \\sec ^4(9-2 x)}{(-\\tan (9-2 x))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-tan(9-2*x))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 \\sin (4-5 x)$\n", - "Output Answer": [ - "$-10 \\cos (4-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2*sin(4-5*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh \\left(x^5+y^4\\right)$", - "Output Answer": [ - "$20 x^3 \\text{sech}^2\\left(x^5+y^4\\right)+12 y^2 \\text{sech}^2\\left(x^5+y^4\\right)-50 x^8 \\tanh \\left(x^5+y^4\\right) \\text{sech}^2\\left(x^5+y^4\\right)-32 y^6 \\tanh \\left(x^5+y^4\\right) \\text{sech}^2\\left(x^5+y^4\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x**5+y**4)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y+z)\ng = z\nh = (z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^{\\frac{x}{y^5}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n \\frac{e^{\\frac{x}{y^5}}}{y^5} & -\\frac{5 x e^{\\frac{x}{y^5}}}{y^6} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = math.e**(x/(y**5))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{11 x}{3}+\\frac{10}{3}} \\cos \\left(\\frac{8}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{11}{3} e^{\\frac{11 x}{3}+\\frac{10}{3}} \\cos \\left(\\frac{8}{3}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((11*x)/3)+(10/3))*cos((8/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{\\frac{\\sin \\left(\\frac{z}{x}\\right)}{x},0,\\frac{z \\sin \\left(\\frac{z}{x}\\right)}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos((z/x))\nh = cos((z/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x$", - "Output Answer": [ - "$160 (x+4)^3-640 (x+4)^2+1281 (x+4)-1028$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x\nseries = f.subs(x, g).series(x, -4, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (x+2)-\\cos (5 x+9)$\n", - "Output Answer": [ - "$25 \\cos (5 x+9)-\\cos (x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(x+2)-cos(5*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$y+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = sqrt(x)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan ^{-1}(x-y)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1,0,y \\cos (x y)-\\frac{1}{(x-y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atan(x-y)\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(x+y)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left\\{z \\cos (y z),0,\\frac{1}{(x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atan(x+y)\nh = atan(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((x/y))\ng = cbrt(x+y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z^5}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5 x}{z^6},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(z**5))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = y z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}} & 0 & \\frac{1}{2 x \\sqrt{\\frac{z}{x}}} \\\\\n 0 & z & y \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((z/x))\ng = y*z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y}-z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{\\sin \\left(\\frac{x}{y}-z^4\\right)}{y},\\frac{x \\sin \\left(\\frac{x}{y}-z^4\\right)}{y^2},4 z^3 \\sin \\left(\\frac{x}{y}-z^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/y)-z**4)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{12 x^3}{\\sqrt{9-6 x^4}}$\n", - "Output Answer": [ - "$\\sqrt{9-6 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((12*x**3)/(sqrt(9-6*x**4)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$9 x^4-\\sin ^{-1}(2-2 x)-4$\n", - "Output Answer": [ - "$36 x^3+\\frac{2}{\\sqrt{-4 x^2+8 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(9*x**4-asin(2-2*x)-4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = x z$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\left\\{-x-\\frac{3}{2 y^{5/2}},-\\frac{1}{2 z^{3/2}},z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z)))\ng = x*z\nh = x*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (2 x+3) \\tan \\left(7 x^4+3\\right)$\n", - "Output Answer": [ - "$-2 \\left(\\cos (2 x+3) \\tan \\left(7 x^4+3\\right)+14 x^3 \\sin (2 x+3) \\sec ^2\\left(7 x^4+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(2*x+3)*tan(7*x**4+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-6 x-2)-\\cos (2-6 x)$\n", - "Output Answer": [ - "$36 \\cos (2-6 x)-\\frac{9}{(3 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-6*x-2)-cos(2-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{11 x}{5}-\\frac{14}{5}}$\n", - "Output Answer": [ - "$\\frac{121}{25} e^{\\frac{11 x}{5}-\\frac{14}{5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((11*x)/5)-(14/5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+y)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+y)^2}}-\\frac{z}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+y)\ng = (z/y)\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = \\cos (x-z)$, and $h(x,y,z) = -\\sin (y-z)$", - "Output Answer": [ - "$\\cos (y-z)-\\frac{1}{(x-y)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = cos(x-z)\nh = -sin(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5-5 x) \\log (5 x-5)$\n", - "Output Answer": [ - "$\\frac{\\log (5-5 x)+\\log (5 (x-1))}{x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5-5*x)*log(5*x-5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-x^2-\\frac{5}{2}}-1$\n", - "Output Answer": [ - "$\\frac{5 \\sqrt{2}}{\\left(-2 x^2-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-x**2-(5/2))-1\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\frac{1}{(x+y)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & \\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2} & -\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y} \\\\\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = cos((z/y))\nh = (1/((x+y)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\log \\left(\\frac{x y}{z}\\right)$, and $h(x,y,z) = \\log (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n \\frac{1}{x} & \\frac{1}{y} & -\\frac{1}{z} \\\\\n \\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = log(((x*y)/z))\nh = log(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}+\\frac{1}{1-z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = y\nh = atanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = e^{x^5-y}$, and $h(x,y,z) = e^{z-x^5}$", - "Output Answer": [ - "$\\left\\{0,5 x^4 e^{z-x^5},5 x^4 e^{x^5-y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5)\ng = math.e**(x**5-y)\nh = math.e**(x**5-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$", - "Output Answer": [ - "$(x+2)^2-5 (x+2)+6$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x\nseries = f.subs(x, g).series(x, -2, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$(x-4) \\left(\\frac{\\cos (4)}{4}-2 \\log (2) \\sin (4)\\right)+2 \\log (2) \\cos (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$5 x^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(x)\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(\\frac{x^2}{z^5}\\right)$, $g(x,y,z) = z^{15}$, and $h(x,y,z) = \\cos \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{-15 z^{14},-\\frac{5 x^2 \\sinh \\left(\\frac{x^2}{z^5}\\right)}{z^6},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh((x**2)/(z**5))\ng = z**15\nh = z**15\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x-y)^{3/2}}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 (x-y)^{5/2}} & \\frac{3}{2 (x-y)^{5/2}} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x-y)**(3/2)))\ng = cos(z)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(2 x^4+6\\right)+e^{\\sin (1-7 x)}$\n", - "Output Answer": [ - "$\\frac{8 x^3}{4 \\left(x^4+3\\right)^2+1}-7 e^{\\sin (1-7 x)} \\cos (1-7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(atan(2*x**4+6)+math.e**(sin(1-7*x)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$6 x+\\cos (1-2 x)-8$\n", - "Output Answer": [ - "$-4 \\cos (1-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 6*x+cos(1-2*x)-8\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^5-x}$, $g(x,y,z) = \\sin ^{-1}(x z)$, and $h(x,y,z) = \\sqrt{y^5+z}$", - "Output Answer": [ - "$\\left\\{\\frac{5 y^4}{2 \\sqrt{y^5+z}}-\\frac{x}{\\sqrt{1-x^2 z^2}},0,\\frac{z}{\\sqrt{1-x^2 z^2}}-5 y^4 e^{y^5-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**5-x)\ng = asin(x*z)\nh = asin(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (8 x+8)-\\log (3 x+7)$\n", - "Output Answer": [ - "$8 \\cos (8 (x+1))-\\frac{3}{3 x+7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(8*x+8)-log(3*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+z} & 0 & e^{x+z} \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{\\sin \\left(\\frac{y}{z}\\right)}{z} & \\frac{y \\sin \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+z)\ng = y\nh = cos((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sqrt{y-z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & -1 \\\\\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-z\ng = sqrt(y-z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = cos(x-y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x^5-1} \\sin \\left(4-8 x^2\\right)$\n", - "Output Answer": [ - "$e^{-x^5-1} x \\left(-5 x^3 \\sin \\left(4-8 x^2\\right)-16 \\cos \\left(4-8 x^2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x**5-1)*sin(4-8*x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{15 x}{2}-8\\right)$\n", - "Output Answer": [ - "$-\\frac{225}{(16-15 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((15*x)/2)-8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x-z} & 0 & -e^{x-z} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x-z)\ng = cbrt(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{x^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{2}{x^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^{12}$", - "Output Answer": [ - "$132 z^{10}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**12\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x^3+z\\right)^2}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sqrt[3]{x^3-z}$", - "Output Answer": [ - "$\\left\\{-y,-\\frac{x^2}{\\sqrt[3]{x^3-z}^2}-\\frac{2}{\\left(x^3+z\\right)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**3+z)**2))\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x-z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x-z)^2}}+\\cos (y)+\\sinh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x-z)\ng = sin(y)\nh = cosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\frac{1}{\\left(y z^3\\right)^{3/2}}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & -\\frac{3 z^3}{2 \\left(y z^3\\right)^{5/2}} & -\\frac{9 y z^2}{2 \\left(y z^3\\right)^{5/2}} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y)\ng = (1/((y*z**3)**(3/2)))\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-3 x-2) \\cos (5 x+8)$\n", - "Output Answer": [ - "$-\\frac{30 (3 x+2) \\sin (5 x+8)+\\left(25 (3 x+2)^2 \\log (-3 x-2)+9\\right) \\cos (5 x+8)}{(3 x+2)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x-2)*cos(5*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = y**5\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^2\\right)$, $g(x,y,z) = \\left(\\frac{y}{x^2}\\right)^{3/2}$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{\\frac{y}{x^2}}}{2 x^2}+\\frac{2 x}{x^4+1}+\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**2)\ng = (y/(x**2))**(3/2)\nh = atan(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = math.e**y\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(6 x+1)^4 \\cos (7-3 x)$\n", - "Output Answer": [ - "$3 (6 x+1)^3 ((6 x+1) \\sin (7-3 x)+8 \\cos (7-3 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6*x+1)**4*cos(7-3*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = e^{\\frac{x}{z^5}}$, and $h(x,y,z) = \\log \\left(x+z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n \\frac{e^{\\frac{x}{z^5}}}{z^5} & 0 & -\\frac{5 x e^{\\frac{x}{z^5}}}{z^6} \\\\\n \\frac{1}{x+z^5} & 0 & \\frac{5 z^4}{x+z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((x/y))\ng = math.e**(x/(z**5))\nh = log(x+z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh \\left(x^3\\right)$, $g(x,y,z) = e^{z \\left(x^3+y\\right)}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$z e^{z \\left(x^3+y\\right)}+3 x^2 \\text{sech}^2\\left(x^3\\right)-\\frac{2}{z^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x**3)\ng = math.e**(z*(x**3+y))\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x-z)^{3/2}}$, $g(x,y,z) = e^{y^4}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3}{2 (x-z)^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x-z)**(3/2)))\ng = math.e**(y**4)\nh = math.e**(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(\\frac{x z}{y}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z \\sinh \\left(\\frac{x z}{y}\\right)}{y} & -\\frac{x z \\sinh \\left(\\frac{x z}{y}\\right)}{y^2} & \\frac{x \\sinh \\left(\\frac{x z}{y}\\right)}{y} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh((x*z)/y)\ng = cbrt(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^3+z$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\frac{3 y^2}{2 \\sqrt{y^3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**3+z\ng = sqrt(y**3)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y+z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},e^{y+z},-e^{y+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y+z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$e^x+y e^{y z}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y)\nh = math.e**(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\frac{1}{(z-y)^{3/2}}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\frac{3}{2 (z-y)^{5/2}}+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = (1/((z-y)**(3/2)))\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2 \\left(\\frac{z^2}{y^2}+1\\right)},\\frac{1}{2 \\sqrt{z}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = y-x\nh = y-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x z)$, $g(x,y,z) = \\frac{y^3}{z^3}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{1-x^2 z^2}}+\\frac{3 y^2}{z^3}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x*z)\ng = ((y**3)/(z**3))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (6-2 x)$\n", - "Output Answer": [ - "$-\\frac{1}{(x-3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = x^4+y$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 4 x^3 & 1 & 0 \\\\\n 0 & 1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = x**4+y\nh = y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\sin (x)+2 y+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**2\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (2 x)$ on the interval $x = 5$ to $x = 9$\n", - "Output Answer": [ - "$\\int_5^9 \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x)\na = 5\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{2 x}{\\sqrt{1-x^4}}+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**2)\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\cosh (z)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{-\\sinh (z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = cosh(z)\nh = cosh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(2 x^3+3\\right)-e^{-x-2}$\n", - "Output Answer": [ - "$\\frac{3 x \\left(2 x^6-3 x^3-8\\right)}{2 \\left(-x^6-3 x^3-2\\right)^{3/2}}-e^{-x-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = asin(2*x**3+3)-math.e**(-x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x^3-z\\right)^{3/2}}$, $g(x,y,z) = \\cos ^{-1}\\left(x^3-z\\right)$, and $h(x,y,z) = \\sin \\left(x^3+z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{9 x^2}{2 \\left(x^3-z\\right)^{5/2}} & 0 & \\frac{3}{2 \\left(x^3-z\\right)^{5/2}} \\\\\n -\\frac{3 x^2}{\\sqrt{1-\\left(x^3-z\\right)^2}} & 0 & \\frac{1}{\\sqrt{1-\\left(x^3-z\\right)^2}} \\\\\n 3 x^2 \\cos \\left(x^3+z\\right) & 0 & \\cos \\left(x^3+z\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x**3-z)**(3/2)))\ng = acos(x**3-z)\nh = sin(x**3+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^3-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -1 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt(y)\nh = z**3-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y-x$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n -1 & 1 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y-x\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,y e^{x y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = math.e**(x*y)\nh = math.e**(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = (y+z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = y\nh = (y+z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = \\left(z^2\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & 0 & 3 z \\sqrt{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = math.e**(x*y)\nh = (z**2)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{z}{x}\\right)^{3/2}}$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{3 z}{2 x^2 \\left(\\frac{z}{x}\\right)^{5/2}}+\\cos (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z/x)**(3/2)))\ng = y-z\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = \\tanh ^{-1}\\left(x y^3\\right)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+3 y^2 \\sec ^2\\left(y^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = tan(y**3)\nh = atanh(x*y**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\{0,\\cos (x-z),0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{5 x}{2}-\\frac{5}{2}}$\n", - "Output Answer": [ - "$-\\frac{25}{16 \\left(-\\frac{5 x}{2}-\\frac{5}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-((5*x)/2)-(5/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y-z$, $g(x,y,z) = y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\{0,-1,-x\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y-z\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{\\frac{x^3-y}{z}}$", - "Output Answer": [ - "$\\frac{4 \\left(x^3-y\\right)}{9 z^3 \\sqrt[3]{\\frac{x^3-y}{z}}^2}-\\frac{2 x^4}{z \\left(x^3-y\\right) \\sqrt[3]{\\frac{x^3-y}{z}}^2}+\\frac{2 x}{z \\sqrt[3]{\\frac{x^3-y}{z}}^2}-\\frac{2}{9 z \\left(x^3-y\\right) \\sqrt[3]{\\frac{x^3-y}{z}}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt((x**3-y)/z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x^5-1}$\n", - "Output Answer": [ - "$\\frac{25 x^3 \\left(15 x^5-8\\right)}{4 \\left(5 x^5-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x**5-1)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(y+z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(y+z)^2}}+e^y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = math.e**y\nh = asin(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt{x z}$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{z^2+1}}+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = sqrt(x*z)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = y$, and $h(x,y,z) = z^5 (x-y)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 0 & 1 & 0 \\\\\n 5 z^5 (x-y)^4 & -5 z^5 (x-y)^4 & 5 z^4 (x-y)^5 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = y\nh = z**5*(x-y)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8 x+5)-e^{8 x+8}$\n", - "Output Answer": [ - "$8 \\sec ^2(8 x+5)-8 e^{8 x+8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(8*x+5)-math.e**(8*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-y}$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\frac{1}{(x+y)^2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-y}}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y)\ng = x-y\nh = (1/((x+y)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cos(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x-8} \\tan ^{-1}(4-9 x)$\n", - "Output Answer": [ - "$e^{2 x-8} \\left(2 \\tan ^{-1}(4-9 x)-\\frac{9}{(4-9 x)^2+1}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x-8)*atan(4-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y\nh = sin(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = (z/x)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x-4} \\sin (4-3 x)$\n", - "Output Answer": [ - "$-3 e^{-9 x-4} (3 \\sin (4-3 x)+\\cos (4-3 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x-4)*sin(4-3*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = e^{\\frac{x z}{y}}$, and $h(x,y,z) = e^{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{-\\frac{x e^{\\frac{x z}{y}}}{y},\\frac{z e^{\\frac{z}{x}}}{x^2},\\frac{z e^{\\frac{x z}{y}}}{y}+x \\sin (x y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = math.e**((x*z)/y)\nh = math.e**((x*z)/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sqrt(y+z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sqrt[3]{z-y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-x}}$", - "Output Answer": [ - "$-\\frac{1}{2 (z-x)^{3/2}}+\\frac{3 \\sqrt{x}}{2}-\\frac{1}{3 \\sqrt[3]{z-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = cbrt(z-y)\nh = (1/(sqrt(z-x)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = x^4-y^5+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 4 x^3 & -5 y^4 & 1 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = x**4-y**5+z\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cos (x+z)$", - "Output Answer": [ - "$-\\frac{z}{\\sqrt{1-x^2 z^2}}-\\sin (x+z)+2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*z)\ng = y**2\nh = cos(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}+z\\right)^{3/2}}$, $g(x,y,z) = \\cosh (x)$, and $h(x,y,z) = e^{\\frac{x+y}{z}}$", - "Output Answer": [ - "$-\\frac{(x+y) e^{\\frac{x+y}{z}}}{z^2}-\\frac{3}{2 y \\left(\\frac{x}{y}+z\\right)^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x/y)+z)**(3/2)))\ng = cosh(x)\nh = math.e**((x+y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^5\\right)$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$\\frac{8 x^7}{\\pi ^3}+\\frac{4 x^6}{\\pi ^2}+\\frac{2 x^5}{\\pi }$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**5)\ng = acos(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 z^5$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$5 x^4 z^5$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*z**5\ng = sin(z)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{\\frac{x}{z^3}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 1 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{1}{2 z^3 \\sqrt{\\frac{x}{z^3}}} & 0 & -\\frac{3 x}{2 z^4 \\sqrt{\\frac{x}{z^3}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-x\ng = tan(y)\nh = sqrt((x/(z**3)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n z & 0 & x \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = x*z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (8 x)}{4 x^2-3}$\n", - "Output Answer": [ - "$\\frac{8 \\left(4 x^2-3\\right) \\cos (8 x)-8 x \\sin (8 x)}{\\left(3-4 x^2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(8*x))/(4*x**2-3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x y^3\\right)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$-\\frac{y^3}{\\sqrt{1-x^2 y^6}}+3 y^2-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*y**3)\ng = y**3\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 y^{3/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x-z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-(x-z)^2}}-\\frac{1}{2 \\sqrt{x-z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x-z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh \\left(x y^3\\right)$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-3 x y^2 \\text{sech}^2\\left(x y^3\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*y**3)\ng = math.e**(y**3)\nh = math.e**(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y^2 z^2$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{-2 y^2 z,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y**2*z**2\nh = y**2*z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{x+y+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+y+z}}+\\frac{1}{3 \\sqrt[3]{x+z}^2}+\\frac{1}{\\sqrt{y^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = asinh(y)\nh = sqrt(x+y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{11 x}{2}+9}-\\sin \\left(\\frac{1}{2}-x\\right)$\n", - "Output Answer": [ - "$\\frac{11}{2 \\sqrt{22 x+36}}+\\cos \\left(\\frac{1}{2}-x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((11*x)/2)+9)-sin((1/2)-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan (x-z)$, $g(x,y,z) = x y$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sec ^2(x-z) & 0 & \\sec ^2(x-z) \\\\\n y & x & 0 \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -tan(x-z)\ng = x*y\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^3 y+z^3}$", - "Output Answer": [ - "$-\\frac{9 x^4 y^2}{4 \\left(x^3 y+z^3\\right)^{3/2}}-\\frac{x^6}{4 \\left(x^3 y+z^3\\right)^{3/2}}+\\frac{3 x y}{\\sqrt{x^3 y+z^3}}+\\frac{3 z}{\\sqrt{x^3 y+z^3}}-\\frac{9 z^4}{4 \\left(x^3 y+z^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**3*y+z**3)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x-z\nh = log(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(x^2 y\\right)$, $g(x,y,z) = \\cos \\left(x^2-y\\right)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x y \\cos \\left(x^2 y\\right) & x^2 \\cos \\left(x^2 y\\right) & 0 \\\\\n -2 x \\sin \\left(x^2-y\\right) & \\sin \\left(x^2-y\\right) & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x**2*y)\ng = cos(x**2-y)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(z \\left(x^5+y\\right)\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{75 x^8 z^2}{4 \\sqrt{z \\left(x^5+y\\right)}}+\\frac{3 z^2}{4 \\sqrt{z \\left(x^5+y\\right)}}+30 x^3 z \\sqrt{z \\left(x^5+y\\right)}+\\frac{3 \\left(x^5+y\\right)^2}{4 \\sqrt{z \\left(x^5+y\\right)}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z*(x**5+y))**(3/2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{y+z^4}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{2 \\left(y+z^4\\right)^{3/2}} & -\\frac{2 z^3}{\\left(y+z^4\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = (1/(sqrt(y+z**4)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = \\tan ^{-1}(x+y+z)$, and $h(x,y,z) = \\frac{1}{(y+z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{(x+y+z)^2+1}+\\sec ^2(x+z)-\\frac{3}{2 (y+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = atan(x+y+z)\nh = (1/((y+z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y/x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (y)$, $g(x,y,z) = e^{\\frac{x^4}{y}}$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y+z}^2}-\\frac{x^4 e^{\\frac{x^4}{y}}}{y^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(y)\ng = math.e**((x**4)/y)\nh = cbrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{z^3}$, and $h(x,y,z) = -\\sin ^{-1}\\left(y-z^3\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-\\left(y-z^3\\right)^2}}-\\frac{3 z^2}{2 \\sqrt{z^3}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sqrt(z**3)\nh = sqrt(z**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(z),\\frac{e^{\\frac{z}{x}}}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z/x)\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(\\frac{15 x}{2}-\\frac{1}{2}\\right)^3}+\\sin \\left(9 x+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$9 \\left(\\cos \\left(9 x+\\frac{7}{2}\\right)-\\frac{40}{(1-15 x)^4}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((((15*x)/2)-(1/2))**3))+sin(9*x+(7/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (1-7 x)-\\log (3-8 x)$\n", - "Output Answer": [ - "$\\frac{8}{3-8 x}+7 \\sin (1-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(1-7*x)-log(3-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{x-y}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (x-y)^{3/2}},\\frac{1}{2 (x-y)^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = x-y-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 1 & -1 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = tanh(y)\nh = x-y-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$7 x-\\frac{1}{8-x}-4$\n", - "Output Answer": [ - "$7-\\frac{1}{(x-8)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(7*x-(1/(8-x))-4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (4 x+2)-\\tan ^{-1}(5 x+5)$\n", - "Output Answer": [ - "$4 \\sec ^2(4 x+2)-\\frac{5}{(5 x+5)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4*x+2)-atan(5*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6-4 x)+1$\n", - "Output Answer": [ - "$4 \\sin (6-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6-4*x)+1, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\frac{1}{\\left(z^5\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 0 & -\\frac{15 z^4}{2 \\left(z^5\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cbrt(x)\nh = (1/((z**5)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{5 x^4}{2 \\left(x^5-3\\right)^2}$\n", - "Output Answer": [ - "$\\frac{1}{2 \\left(x^5-3\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((5*x**4)/(2*(x**5-3)**2))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = z$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = z\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{x^4}}$", - "Output Answer": [ - "$\\frac{1}{3 x^4 \\sqrt[3]{\\frac{z}{x^4}}^2}+4 x^3+\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = atan(y)\nh = cbrt(z/(x**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x+1) (\\sin (1)+\\sinh (1))+(x+1)^2 \\left(-\\frac{\\cos (1)}{2}-\\frac{\\cosh (1)}{2}\\right)+\\cos (1)-\\cosh (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cosh(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2-3 x^3}+\\sin \\left(x^3+3\\right)$\n", - "Output Answer": [ - "$9 e^{2-3 x^3} \\left(9 x^3-2\\right) x-9 x^4 \\sin \\left(x^3+3\\right)+6 x \\cos \\left(x^3+3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2-3*x**3)+sin(x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\cos (x-y+z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{\\sin (x-y+z),0,-\\sin (x-y+z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = cos(x-y+z)\nh = cos(x-y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cos(y)\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$2 y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2\nh = tanh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 0$ on the interval $x = 5$ to $x = 6$\n", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 0\na = 5\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^{3/2}}$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = \\tan ^{-1}(x y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n \\frac{y}{(x y+z)^2+1} & \\frac{x}{(x y+z)^2+1} & \\frac{1}{(x y+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**(3/2)))\ng = tan(x+z)\nh = atan(x*y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x} \\tan (2 x+4)$\n", - "Output Answer": [ - "$e^{6 x} (3 \\sin (4 (x+2))+2) \\sec ^2(2 (x+2))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x)*tan(2*x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$-\\frac{z}{y^2}-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = (z/y)\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin ^{-1}(x+z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-(x+z)^2}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\left(y+z^3\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{3}{2 \\left(y+z^3\\right)^{5/2}} & -\\frac{9 z^2}{2 \\left(y+z^3\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = y\nh = (1/((y+z**3)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = \\left(z^5-y^3\\right)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{3 y^2}{y^6+1} & 0 \\\\\n 0 & -6 y^2 \\left(z^5-y^3\\right) & 10 z^4 \\left(z^5-y^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = atan(y**3)\nh = (z**5-y**3)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+1} \\cos (2-5 x)$\n", - "Output Answer": [ - "$e^{x+1} (5 \\sin (2-5 x)+\\cos (2-5 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+1)*cos(2-5*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{11 x}{2}-\\frac{9}{2}}$\n", - "Output Answer": [ - "$-\\frac{121}{16 \\left(\\frac{11 x}{2}-\\frac{9}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((11*x)/2)-(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z^9$\n", - "Output Answer": [ - "$\\left\\{0,0,9 z^8\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**9\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\sec ^2(x)+3 z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = x$ on the interval $x = 5$ to $x = 13$\n", - "Output Answer": [ - "$8 \\sqrt{2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = x\na = 5\nb = 13\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y+z)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 1 & 1 & 0 \\\\\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y+z)\ng = x+y\nh = sqrt(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$\\left\\{0,-e^{x+z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(x-y^2\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin \\left(x-y^2\\right) & 2 y \\sin \\left(x-y^2\\right) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x-y**2)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-6 x-1)+\\frac{\\pi }{4}$\n", - "Output Answer": [ - "$\\frac{\\sqrt{3} (6 x+1)}{2 (-x (3 x+1))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-6*x-1)+(pi/4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = z**3\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$x \\left(\\frac{14}{7 x^2-5}+\\frac{4}{2 x^2-7}\\right)$\n", - "Output Answer": [ - "$\\log \\left(2 x^2-7\\right)+\\log \\left(7 \\left(2 x^2-7\\right)+39\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = x*((14/(7*x**2-5))+(4/(2*x**2-7)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{y}{z}\\right)^{3/2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 y \\sqrt{\\frac{y}{z}}}{2 z^2},-\\frac{3 \\sqrt{\\frac{y}{z}}}{2 z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)**(3/2)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^3}{z^3}$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 x^3}{z^4},e^{x-y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**3)/(z**3))\ng = math.e**(x-y)\nh = math.e**(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan (x-z)$, and $h(x,y,z) = \\cos \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & \\frac{z \\sin \\left(\\frac{z}{y}\\right)}{y^2} & -\\frac{\\sin \\left(\\frac{z}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = tan(x-z)\nh = cos((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = (x-y+z)^5$", - "Output Answer": [ - "$60 (x-y+z)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y+z)**5\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos ^{-1}(y-x)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-(y-x)^2}} & -\\frac{1}{\\sqrt{1-(y-x)^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = acos(y-x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^{3/2}}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**(3/2)))\ng = log(z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{x+y+z}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x+y+z)^2},-\\frac{1}{(x+y+z)^2},-\\frac{1}{(x+y+z)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+y+z))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y^5}}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan \\left(\\frac{x}{y^5}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{5 x \\sec ^2\\left(\\frac{x}{y^5}\\right)}{y^6},-\\frac{\\sec ^2\\left(\\frac{x}{y^5}\\right)}{y^5},\\frac{5 x y^4}{2 \\left(x y^5\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y**5)))\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(7-\\frac{13 x^2}{3}\\right)-\\tan \\left(\\frac{x}{3}+\\frac{25}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{3} \\left(-26 x \\cos \\left(7-\\frac{13 x^2}{3}\\right)-\\sec ^2\\left(\\frac{x+25}{3}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7-((13*x**2)/3))-tan((x/3)+(25/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{12}$, $g(x,y,z) = \\cos \\left(x-z^3\\right)$, and $h(x,y,z) = y+z^3$", - "Output Answer": [ - "$3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**12\ng = cos(x-z**3)\nh = y+z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(3 x^3+8\\right)$\n", - "Output Answer": [ - "$\\frac{18 x \\left(18 x^6+24 x^3-65\\right)}{\\left(9 x^6+48 x^3+65\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(3*x**3+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (x-z)$, $g(x,y,z) = y+z$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$-\\cos (x-z)+3 z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-z)\ng = y+z\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**2\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(5 x+\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{4}{20 x^2+4 x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(5*x+(1/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(8-7 x^3\\right)+i \\pi +\\log (5)$\n", - "Output Answer": [ - "$42 x \\left(21 x^3 \\tan \\left(8-7 x^3\\right)-1\\right) \\sec ^2\\left(8-7 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8-7*x**3)+1j*pi+log(5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (x-y-z)$, and $h(x,y,z) = (x-y)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\sec ^2(x-y-z)-\\frac{3 \\sqrt{x-y}}{2},-\\frac{3 \\sqrt{x-y}}{2},\\sec ^2(x-y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(x-y-z)\nh = tan(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^5\\right)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**5)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{7}{2}-\\frac{x}{2}}+\\log (-8 x-7)$\n", - "Output Answer": [ - "$\\frac{8}{8 x+7}-\\frac{1}{4 \\sqrt{\\frac{7}{2}-\\frac{x}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((7/2)-(x/2))+log(-8*x-7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = e^{z-y}$", - "Output Answer": [ - "$\\left\\{\\sin (z)-e^{z-y},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sinh (x y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,y \\cosh (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sinh(x*y)\nh = sinh(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{4 x}{5}+\\frac{31}{5}}$\n", - "Output Answer": [ - "$\\frac{16}{25} e^{\\frac{4 x}{5}+\\frac{31}{5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((4*x)/5)+(31/5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{1}{(x+z)^{3/2}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n -\\frac{3}{2 (x+z)^{5/2}} & 0 & -\\frac{3}{2 (x+z)^{5/2}} \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = (1/((x+z)**(3/2)))\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{6 x-7}{(2-2 x)^2}$\n", - "Output Answer": [ - "$\\frac{3 (2 x-3)}{2 (x-1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((6*x-7)/((2-2*x)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(5 x+9)+\\tan (7-2 x)$\n", - "Output Answer": [ - "$-\\frac{5}{\\sqrt{1-(5 x+9)^2}}-2 \\sec ^2(7-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(5*x+9)+tan(7-2*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, -1, 6)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = acos(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$3 x^2-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = cos(y)\nh = atan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-x}$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\frac{1}{(y-z)^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{(y-z)^3},\\frac{1}{2 \\sqrt{z-x}},y \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-x)\ng = tan(x*y)\nh = tan(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(y^3-x\\right)^2$", - "Output Answer": [ - "$12 y \\left(y^3-x\\right)+18 y^4+2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y**3-x)**2\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh ^{-1}\\left(y^2\\right)$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\cos (x)+\\frac{2 y}{\\sqrt{y^4+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asinh(y**2)\nh = x**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8 x^5+3\\right)$\n", - "Output Answer": [ - "$\\frac{160 x^3 \\left(3-2 x^5\\right)}{\\left(8 x^5+3\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8*x**5+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\log (z-y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = log(z-y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-3}-\\log \\left(4 x^2-2\\right)$\n", - "Output Answer": [ - "$\\frac{4 x}{1-2 x^2}-6 e^{-6 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-3)-log(4*x**2-2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y+z$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 1 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y+z\ng = acos(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tanh ^{-1}(x y)$, and $h(x,y,z) = \\tan ^{-1}(x y)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{x^2 y^2+1},-\\frac{y}{x^2 y^2+1},\\frac{y}{1-x^2 y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atanh(x*y)\nh = atanh(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(4 x-1)^4 \\sin ^{-1}(9 x+8)$\n", - "Output Answer": [ - "$\\frac{9 (1-4 x)^4}{\\sqrt{1-(9 x+8)^2}}+16 (4 x-1)^3 \\sin ^{-1}(9 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((4*x-1)**4*asin(9*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{x^7}{5040}+\\frac{x^5}{120}+\\frac{x^4}{12}+\\frac{x^3}{6}+x+2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}(x-y)$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$e^x-\\frac{1}{\\sqrt{1-(x-y)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = asin(x-y)\nh = x**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cosh ^{-1}(z-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{-y+z-1} \\sqrt{-y+z+1}} & \\frac{1}{\\sqrt{-y+z-1} \\sqrt{-y+z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = y**5\nh = acosh(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = sin(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$-\\frac{z}{\\sqrt{1-x^2 z^2}}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x*z)\ng = (1/(y**(3/2)))\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 243 x^5$ on the interval $x = 3$ to $x = 3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 243*x**5\na = 3\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin (x y z)$", - "Output Answer": [ - "$x y \\cos (x y z)+\\cos (x)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(y)\nh = sin(x*y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^3}{x^3}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{3 z^3}{x^4}+\\frac{1}{2 \\sqrt{y}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**3)/(x**3))\ng = sqrt(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(4 x^2\\right)+\\cos \\left(7 x^2+8\\right)$\n", - "Output Answer": [ - "$-2 \\left(32 x^2 \\sin \\left(4 x^2\\right)+7 \\sin \\left(7 x^2+8\\right)+98 x^2 \\cos \\left(7 x^2+8\\right)-4 \\cos \\left(4 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(4*x**2)+cos(7*x**2+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-3 x^2-3}+\\tan (8)$\n", - "Output Answer": [ - "$-6 e^{-3 \\left(x^2+1\\right)} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-3*x**2-3)+tan(8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^6}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{6}{x^7}+\\frac{1}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**6))\ng = log(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(z^3\\right)$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\sin \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & 3 z^2 \\cos \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z**3)\ng = acos(x)\nh = sin(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(8 x^2-9\\right)$\n", - "Output Answer": [ - "$-\\frac{4 \\left(4 x^4-5\\right)}{\\left(-4 x^4+9 x^2-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(8*x**2-9)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = x z$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = x*z\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-y-z}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-y-z}^2} & -\\frac{1}{3 \\sqrt[3]{x-y-z}^2} & -\\frac{1}{3 \\sqrt[3]{x-y-z}^2} \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-y-z)\ng = cos(x)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7 x^2+1\\right)-\\sin (5 x+6)$\n", - "Output Answer": [ - "$\\frac{14 x}{7 x^2+1}-5 \\cos (5 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x**2+1)-sin(5*x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\frac{z^4}{y}$, and $h(x,y,z) = \\sqrt[3]{z^4}$", - "Output Answer": [ - "$-\\frac{1}{x^2}-\\frac{z^4}{y^2}+\\frac{4 z^3}{3 \\sqrt[3]{z^4}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = ((z**4)/y)\nh = cbrt(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (2 x)$ on the interval $x = 1$ to $x = 3$\n", - "Output Answer": [ - "$\\sqrt{2} \\left(\\sqrt{5}-1\\right)+\\tanh ^{-1}\\left(\\sqrt{2}\\right)-\\tanh ^{-1}\\left(\\sqrt{10}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x)\na = 1\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x-3}-\\log (-6 x)$\n", - "Output Answer": [ - "$\\frac{1}{x^2}-\\frac{1}{4 (x-3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x-3)-log(-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^{16}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & 16 z^{15} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**y\nh = z**16\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{-3 x^2-\\frac{7}{2}}$\n", - "Output Answer": [ - "$-\\frac{24 \\left(18 x^2-7\\right)}{\\left(6 x^2+7\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(-3*x**2-(7/2)))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (x+5)-\\sin ^{-1}\\left(4-2 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{4 x}{\\sqrt{1-4 \\left(x^2-2\\right)^2}}-\\sin (x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(x+5)-asin(4-2*x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(2 x+\\frac{34}{5}\\right)+1$\n", - "Output Answer": [ - "$-\\frac{2}{\\sqrt{1-\\left(2 x+\\frac{34}{5}\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(2*x+(34/5))+1, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x y)^{3/2}$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\tanh ^{-1}(y+z)$", - "Output Answer": [ - "$\\frac{3}{2} y \\sqrt{x y}+\\frac{1}{2 \\sqrt{x+y}}+\\frac{1}{1-(y+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y)**(3/2)\ng = sqrt(x+y)\nh = atanh(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4 y$, $g(x,y,z) = y^5 z^5$, and $h(x,y,z) = \\log \\left(x^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 y & x^4 & 0 \\\\\n 0 & 5 y^4 z^5 & 5 y^5 z^4 \\\\\n \\frac{4}{x} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4*y\ng = y**5*z**5\nh = log(x**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$(x+4) (1-48 \\cos (64))-4+\\sin (64)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = sin(x**3)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\cosh ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{x z-1} \\sqrt{x z+1}}+\\frac{1}{2 \\sqrt{x}}+\\frac{4 y^3}{y^8+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(y**4)\nh = acosh(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = tan((z/y))\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x^4}{y}\\right)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\frac{1}{y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{4 x^3 \\sin \\left(\\frac{x^4}{y}\\right)}{y} & \\frac{x^4 \\sin \\left(\\frac{x^4}{y}\\right)}{y^2} & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & -\\frac{1}{(y-z)^2} & \\frac{1}{(y-z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(((x**4)/y))\ng = tanh(y)\nh = (1/(y-z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{17}{3}-5 x\\right)$\n", - "Output Answer": [ - "$-\\frac{25 \\left(\\frac{17}{3}-5 x\\right)}{\\left(1-\\left(\\frac{17}{3}-5 x\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos((17/3)-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\sqrt{x^3}$", - "Output Answer": [ - "$(x-4)^2 \\left(\\frac{19}{289}+\\frac{3}{16} \\tan ^{-1}(4)\\right)+(x-4) \\left(\\frac{8}{17}+3 \\tan ^{-1}(4)\\right)+8 \\tan ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = sqrt(x**3)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x z)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$5 z^4-z \\sin (x z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z)\ng = tan(z)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(9 x^5+3\\right)-\\tan (6 x+5)$\n", - "Output Answer": [ - "$90 x^3 \\left(45 x^5 \\tan \\left(9 x^5+3\\right)+2\\right) \\sec ^2\\left(9 x^5+3\\right)-72 \\tan (6 x+5) \\sec ^2(6 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(9*x**5+3)-tan(6*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-x}+\\cos (5-4 x)$\n", - "Output Answer": [ - "$4 \\sin (5-4 x)-e^{2-x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-x)+cos(5-4*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4 x-8}+\\cos (7-8 x)$\n", - "Output Answer": [ - "$16 \\left(e^{4 x-8}-4 \\cos (7-8 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4*x-8)+cos(7-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^2-y-z^2}$", - "Output Answer": [ - "$-\\frac{x^2}{\\left(x^2-y-z^2\\right)^{3/2}}-\\frac{z^2}{\\left(x^2-y-z^2\\right)^{3/2}}-\\frac{1}{4 \\left(x^2-y-z^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2-y-z**2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7-4 x^2\\right)-e^{4-x}$\n", - "Output Answer": [ - "$\\frac{8 x}{4 x^2-7}+e^{4-x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(log(7-4*x**2)-math.e**(4-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{z}{y^4}}$", - "Output Answer": [ - "$-\\frac{4 z^2}{y^{10} \\left(\\frac{z}{y^4}\\right)^{3/2}}+\\frac{10 z}{y^6 \\sqrt{\\frac{z}{y^4}}}-\\frac{1}{4 y^8 \\left(\\frac{z}{y^4}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/(y**4)))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\cos (y)+\\frac{1}{\\sqrt{1-z^2}}+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = sin(y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = (x-z)^3$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{3 (x-z)^2,\\sin (x),3 (x-z)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (x-z)**3\nh = (x-z)**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-6 x-\\frac{5}{2}}+1$\n", - "Output Answer": [ - "$-\\frac{9}{\\left(-6 x-\\frac{5}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-6*x-(5/2))+1\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x^4-9}$\n", - "Output Answer": [ - "$36 e^{3 x^4-9} x^2 \\left(4 x^4+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x**4-9)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\sin (y)+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = cos(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(-6 x-5)^3}+\\log (-4 x-9)$\n", - "Output Answer": [ - "$\\frac{18}{(6 x+5)^4}+\\frac{4}{4 x+9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((-6*x-5)**3))+log(-4*x-9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**3)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y^5$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\cosh (y)$", - "Output Answer": [ - "$\\left\\{\\sinh (y),0,y \\sec ^2(x y)-5 x^5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y**5\ng = tan(x*y)\nh = tan(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x-y}{z^5}\\right)$", - "Output Answer": [ - "$\\frac{5 (x-y)}{z^6 \\sqrt{1-\\frac{(x-y)^2}{z^{10}}}}+\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y)\nh = acos((x-y)/(z**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x+y^4-z\\right)$", - "Output Answer": [ - "$-16 y^6 \\sin \\left(x+y^4-z\\right)-2 \\sin \\left(x+y^4-z\\right)+12 y^2 \\cos \\left(x+y^4-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y**4-z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = sin((z/x))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{x^2}{y^2}$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}},\\frac{2 x}{y^2}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = ((x**2)/(y**2))\nh = ((x**2)/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(1-4 x^5\\right)+\\sin ^{-1}(4-5 x)$\n", - "Output Answer": [ - "$-20 x^4 \\sec ^2\\left(1-4 x^5\\right)-\\frac{5}{\\sqrt{1-(4-5 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(1-4*x**5)+asin(4-5*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(7-8 x)-\\sin (7)$\n", - "Output Answer": [ - "$\\frac{2}{\\sqrt{-4 x^2+7 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(7-8*x)-sin(7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^3\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-5) \\left(1+75 \\cos (125)+\\tan ^2(5)\\right)+\\sin (125)+\\tan (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**3)\ng = tan(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cosh (x)$ and $g(x) = $\\sqrt{x^3}$", - "Output Answer": [ - "$(x-3) \\left(3 \\sqrt{3} \\sinh (3)+\\frac{3}{2} \\sqrt{3} \\cosh (3)\\right)+3 \\sqrt{3} \\cosh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cosh(x)\ng = sqrt(x**3)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x^4}{y}+z^3}$", - "Output Answer": [ - "$-\\frac{x^8}{4 y^4 \\left(\\frac{x^4}{y}+z^3\\right)^{3/2}}-\\frac{4 x^6}{y^2 \\left(\\frac{x^4}{y}+z^3\\right)^{3/2}}+\\frac{x^4}{y^3 \\sqrt{\\frac{x^4}{y}+z^3}}+\\frac{6 x^2}{y \\sqrt{\\frac{x^4}{y}+z^3}}+\\frac{3 z}{\\sqrt{\\frac{x^4}{y}+z^3}}-\\frac{9 z^4}{4 \\left(\\frac{x^4}{y}+z^3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x**4)/y)+z**3)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{11}{2}-\\frac{11 x}{2}}+\\frac{1}{\\left(\\frac{x}{2}-\\frac{13}{2}\\right)^4}$\n", - "Output Answer": [ - "$\\frac{320}{(x-13)^6}-\\frac{\\sqrt{\\frac{11}{2}}}{4 (1-x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt((11/2)-((11*x)/2))+(1/(((x/2)-(13/2))**4))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x-y^2}{z}}$", - "Output Answer": [ - "$-\\frac{y^2}{z^2 \\left(\\frac{x-y^2}{z}\\right)^{3/2}}-\\frac{1}{4 z^2 \\left(\\frac{x-y^2}{z}\\right)^{3/2}}+\\frac{x-y^2}{z^3 \\sqrt{\\frac{x-y^2}{z}}}-\\frac{\\left(x-y^2\\right)^2}{4 z^4 \\left(\\frac{x-y^2}{z}\\right)^{3/2}}-\\frac{1}{z \\sqrt{\\frac{x-y^2}{z}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x-y**2)/z))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-2 x-4} \\log (7-7 x)$\n", - "Output Answer": [ - "$\\frac{e^{-2 (x+2)} \\left(-4 x+4 (x-1)^2 \\log (7-7 x)+3\\right)}{(x-1)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-2*x-4)*log(7-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = \\tan \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n \\frac{\\sec ^2\\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\sec ^2\\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = cbrt(y*z)\nh = tan((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y^3+z^4$, $g(x,y,z) = \\tanh (x)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -3 y^2 & 4 z^3 \\\\\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y**3+z**4\ng = tanh(x)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3-5 x} \\log (-2 x-3)$\n", - "Output Answer": [ - "$\\frac{-20 x-5 (2 x+3) \\log (-2 x-3)+12}{2 \\sqrt{3-5 x} (2 x+3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3-5*x)*log(-2*x-3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = (x y-z)^2$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\{2 (x y-z)-\\sin (y),0,2 y (x y-z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (x*y-z)**2\nh = (x*y-z)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = y\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z)))\ng = y\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (2 x+3)+\\tan \\left(\\frac{17 x}{2}+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$-4 \\left(\\cos (2 x+3)-289 \\sin ^4\\left(\\frac{17 (x+1)}{2}\\right) \\csc ^3(17 (x+1))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2*x+3)+tan(((17*x)/2)+(17/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\frac{y^3}{x^6}$, and $h(x,y,z) = e^{\\frac{y}{x^2}}$", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{y}{x^2}}}{x^2},\\frac{2 y e^{\\frac{y}{x^2}}}{x^3},-\\frac{6 y^3}{x^7}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = ((y**3)/(x**6))\nh = ((y**3)/(x**6))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y z)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y+z}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y*z)\ng = sqrt(y+z)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(7 x^4-3\\right) \\sin (1-6 x)$\n", - "Output Answer": [ - "$12 \\left(-21 x^4+7 x^2+9\\right) \\sin (1-6 x)-336 x^3 \\cos (1-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (7*x**4-3)*sin(1-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{x^2+y}$\n", - "Output Answer": [ - "$\\left\\{2 x e^{x^2+y},e^{x^2+y},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2+y)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\{1,y,-z\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(5 x^2\\right)+\\frac{1}{(-x-4)^3}$\n", - "Output Answer": [ - "$\\frac{10 x}{\\sqrt{1-25 x^4}}+\\frac{3}{(x+4)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(5*x**2)+(1/((-x-4)**3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7-9 x}-\\cos (5-7 x)$\n", - "Output Answer": [ - "$-9 e^{7-9 x}-7 \\sin (5-7 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7-9*x)-cos(5-7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^4\\right)$ and $g(x) = $x^9$", - "Output Answer": [ - "$x^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**4)\ng = x**9\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x-y^4-z\\right)^5$\n", - "Output Answer": [ - "$\\left\\{5 \\left(x-y^4-z\\right)^4,-20 y^3 \\left(x-y^4-z\\right)^4,-5 \\left(x-y^4-z\\right)^4\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y**4-z)**5\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\sec ^2(x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = x**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\left(z^5-y\\right)^2}$, and $h(x,y,z) = -\\tan \\left(x-z^5\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{10 z^4}{\\left(z^5-y\\right)^3},\\sec ^2\\left(x-z^5\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((z**5-y)**2))\nh = (1/((z**5-y)**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y}$, $g(x,y,z) = x z$, and $h(x,y,z) = x y+z$", - "Output Answer": [ - "$\\left\\{0,-y,\\frac{1}{y^2}+z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/y)\ng = x*z\nh = x*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{\\left(x+y^3\\right)^2}{z^2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 \\left(x+y^3\\right)}{z^2},\\frac{6 y^2 \\left(x+y^3\\right)}{z^2},-\\frac{2 \\left(x+y^3\\right)^2}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x+y**3)**2)/(z**2))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x/y}$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\frac{e^{x/y}}{y}-\\frac{y e^{y/z}}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/y)\ng = x**(3/2)\nh = math.e**(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}(2 x+5)$\n", - "Output Answer": [ - "$\\frac{8 (2 x+5)}{\\left((2 x+5)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(2*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x+4)-\\left(\\frac{9 x}{2}-\\frac{15}{2}\\right)^4$\n", - "Output Answer": [ - "$\\frac{7}{7 x+4}-\\frac{243}{4} (3 x-5)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x+4)-(((9*x)/2)-(15/2))**4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\frac{z^5}{x^5}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y} & e^{x+y} & 0 \\\\\n -\\frac{5 z^5}{x^6} & 0 & \\frac{5 z^4}{x^5} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y)\ng = ((z**5)/(x**5))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8 x^4-7\\right)$\n", - "Output Answer": [ - "$-\\frac{32 x^2 \\left(8 x^4+21\\right)}{\\left(7-8 x^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8*x**4-7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x-7}+\\log (7-8 x)$\n", - "Output Answer": [ - "$3 e^{3 x-7}+\\frac{8}{8 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x-7)+log(7-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\cosh ^{-1}(z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y)\ng = acosh(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{x^2 z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\sinh (x)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = cbrt(z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\tan \\left(y^2+z\\right)$, and $h(x,y,z) = \\sin \\left(y^2 z\\right)$", - "Output Answer": [ - "$\\left\\{2 y z \\cos \\left(y^2 z\\right)-\\sec ^2\\left(y^2+z\\right),\\frac{x}{2 \\sqrt{x z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = tan(y**2+z)\nh = tan(y**2+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x^2}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{x^2}{y}-z^3$", - "Output Answer": [ - "$\\left\\{-\\frac{x^2}{y^2},-\\frac{2 x}{y},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/(x**2)))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x-y+z}$, $g(x,y,z) = \\sqrt{x-y}$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x-y+z} & -e^{x-y+z} & e^{x-y+z} \\\\\n \\frac{1}{2 \\sqrt{x-y}} & -\\frac{1}{2 \\sqrt{x-y}} & 0 \\\\\n 0 & \\frac{e^{y/z}}{z} & -\\frac{y e^{y/z}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x-y+z)\ng = sqrt(x-y)\nh = math.e**(y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{y}{z^3}\\right)$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{\\cos \\left(\\frac{y}{z^3}\\right)}{z^3},-\\frac{3 y \\cos \\left(\\frac{y}{z^3}\\right)}{z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((y/(z**3)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x^2 y^2 z^2$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$2 x^2 y z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x**2*y**2*z**2\nh = y**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8 x+6)-\\frac{1}{\\left(-4 x^4-6\\right)^2}$\n", - "Output Answer": [ - "$\\frac{4 x^3}{\\left(2 x^4+3\\right)^3}+8 \\sec ^2(8 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(8*x+6)-(1/((-4*x**4-6)**2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{(y+z)^2}$, and $h(x,y,z) = (x-z)^{3/2}$", - "Output Answer": [ - "$3 x^2-\\frac{3 \\sqrt{x-z}}{2}-\\frac{2}{(y+z)^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/((y+z)**2))\nh = (x-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\sec ^2(y)-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^8$, $g(x,y,z) = \\sin \\left(y^2\\right)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$2 y \\cos \\left(y^2\\right)+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**8\ng = sin(y**2)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan \\left(y z^4\\right)$, and $h(x,y,z) = \\frac{1}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & z^4 \\sec ^2\\left(y z^4\\right) & 4 y z^3 \\sec ^2\\left(y z^4\\right) \\\\\n 0 & 0 & -\\frac{4}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(y*z**4)\nh = (1/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$e^x+\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(y)\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\sin (x)-e^{-7 x/2}$\n", - "Output Answer": [ - "$\\frac{343 e^{35/2}}{48}-\\frac{\\cos (5)}{6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(sin(x)-math.e**(-7*x/2))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{y^5}$, and $h(x,y,z) = \\cos \\left(z^5\\right)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sqrt(y**5)\nh = sqrt(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x^4-z\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 x^3}{\\sqrt{1-\\left(x^4-z\\right)^2}},0,\\frac{1}{\\sqrt{1-\\left(x^4-z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**4-z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\left(x^4\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 \\sin \\left(x^4\\right) & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 6 x^3 \\sqrt{x^4} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**4)\ng = sqrt(y)\nh = (x**4)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{\\sqrt{1-y^2}}-\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = acos(y)\nh = log((x/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{9-x} \\cos \\left(\\frac{x}{2}+7\\right)$\n", - "Output Answer": [ - "$\\frac{1}{4} e^{9-x} \\left(4 \\sin \\left(\\frac{x}{2}+7\\right)+3 \\cos \\left(\\frac{x}{2}+7\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(9-x)*cos((x/2)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(2 x^2+2\\right) \\log \\left(\\tan \\left(9 x^3+4\\right)\\right)$\n", - "Output Answer": [ - "$x \\left(\\frac{2 \\log \\left(\\tan \\left(9 x^3+4\\right)\\right)}{x^2+1}+54 x \\log \\left(2 \\left(x^2+1\\right)\\right) \\csc \\left(18 x^3+8\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2*x**2+2)*log(tan(9*x**3+4)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = \\sin ^{-1}\\left(x+y^4+z\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{4 y^3}{\\sqrt{1-\\left(x+y^4+z\\right)^2}},-\\frac{1}{\\sqrt{1-\\left(x+y^4+z\\right)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = tan(y**4)\nh = tan(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sqrt{6 x-7}}{243 x^5}$\n", - "Output Answer": [ - "$\\frac{27 x-35}{243 x^6 \\sqrt{6 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sqrt(6*x-7))/(243*x**5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (4-8 x)+\\tan (6-2 x)$\n", - "Output Answer": [ - "$8 \\tan (6-2 x) \\sec ^2(6-2 x)-\\frac{4}{(1-2 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4-8*x)+tan(6-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y^2}\\right)$, $g(x,y,z) = e^{y^2}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x}{y^2}\\right)}{y^2} & -\\frac{2 x \\cos \\left(\\frac{x}{y^2}\\right)}{y^3} & 0 \\\\\n 0 & 2 e^{y^2} y & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((x/(y**2)))\ng = math.e**(y**2)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(9-5 x^3\\right)$\n", - "Output Answer": [ - "$30 x \\left(1-15 x^3 \\tan \\left(9-5 x^3\\right)\\right) \\sec ^2\\left(9-5 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(9-5*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-8 x^2-8\\right)-\\sqrt{-4 x-7}$\n", - "Output Answer": [ - "$2 \\left(\\frac{x}{x^2+1}+\\frac{1}{\\sqrt{-4 x-7}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-8*x**2-8)-sqrt(-4*x-7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y^2$, and $h(x,y,z) = x z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n z^3 & 0 & 3 x z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = y**2\nh = x*z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(\\frac{14}{3}-9 x\\right)^3}+\\log \\left(\\frac{8 x}{3}+\\frac{8}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{27}{\\left(\\frac{14}{3}-9 x\\right)^4}+\\frac{1}{x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(((14/3)-9*x)**3))+log(((8*x)/3)+(8/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^3+y\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x^3}\\right)$", - "Output Answer": [ - "$3 x^2 \\cos \\left(x^3+y\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**3+y)\ng = acos(x**3)\nh = acos(y/(x**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(e^{4-8 x}\\right)-\\cos \\left(7-7 x^5\\right)$\n", - "Output Answer": [ - "$-35 x^4 \\sin \\left(7-7 x^5\\right)-8 e^{4-8 x} \\sec ^2\\left(e^{4-8 x}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(math.e**(4-8*x))-cos(7-7*x**5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{11 x}{3}-\\frac{13}{3}\\right)+\\tan ^{-1}\\left(5-\\frac{7 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{11}{11 x-13}-\\frac{7}{3 \\left(\\left(5-\\frac{7 x}{3}\\right)^2+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((11*x)/3)-(13/3))+atan(5-((7*x)/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}\\left(z^2\\right)$", - "Output Answer": [ - "$1-\\frac{2 z}{\\sqrt{1-z^4}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = y\nh = acos(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\frac{2 \\sqrt{2} \\sqrt{-x}}{x^2}$\n", - "Output Answer": [ - "$\\frac{15 i}{256 \\sqrt{2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(((2*sqrt(2)*sqrt(-x))/(x**2)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{-2 x-6} \\tan (6 x+7)$\n", - "Output Answer": [ - "$-4 e^{-2 (x+3)} \\left(\\tan (6 x+7)+6 (3 \\tan (6 x+7)-1) \\sec ^2(6 x+7)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(-2*x-6)*tan(6*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = \\sqrt[3]{x-z}$", - "Output Answer": [ - "$-e^{x-y}-\\frac{1}{3 \\sqrt[3]{x-z}^2}-\\sin (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**(x-y)\nh = cbrt(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z^4}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$1-\\frac{z^4}{x^2 \\sqrt{1-\\frac{z^8}{x^2}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((z**4)/x)\ng = y\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z^4-x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 \\sqrt{z^4-x}} & 0 & \\frac{2 z^3}{\\sqrt{z^4-x}} \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z**4-x)\ng = y\nh = (1/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (x+4)-\\sin (6)$\n", - "Output Answer": [ - "$-\\cos (x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(x+4)-sin(6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = y^4 z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & e^y & 0 \\\\\n 0 & 4 y^3 z^4 & 4 y^4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = math.e**y\nh = y**4*z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$-e^{y-x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = cbrt(z)\nh = x**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y)\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\cosh ^{-1}(x y-z)$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{x y-z-1} \\sqrt{x y-z+1}},y-\\frac{1}{3 \\sqrt[3]{x}^2},\\frac{y}{\\sqrt{x y-z-1} \\sqrt{x y-z+1}}-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = acosh(x*y-z)\nh = acosh(x*y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x y}{z}$, $g(x,y,z) = y^4$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{z} & \\frac{x}{z} & -\\frac{x y}{z^2} \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x*y)/z)\ng = y**4\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cbrt(x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x+3} \\cos (4 x+5)$\n", - "Output Answer": [ - "$e^{5 x+3} (9 \\cos (4 x+5)-40 \\sin (4 x+5))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x+3)*cos(4*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\sin (y)-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = cos(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y+z)^2}$, $g(x,y,z) = \\sin ^{-1}\\left(x^5 y\\right)$, and $h(x,y,z) = \\log \\left(x^5+y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{2}{(y+z)^3} & -\\frac{2}{(y+z)^3} \\\\\n \\frac{5 x^4 y}{\\sqrt{1-x^{10} y^2}} & \\frac{x^5}{\\sqrt{1-x^{10} y^2}} & 0 \\\\\n \\frac{5 x^4}{x^5+y} & \\frac{1}{x^5+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y+z)**2))\ng = asin(x**5*y)\nh = log(x**5+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$e^{\\frac{2 x^2}{5}}$\n", - "Output Answer": [ - "$\\frac{18 e^{2/5}}{25}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**((2*x**2)/5))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\sinh (x y) & x \\sinh (x y) & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x*y)\ng = cos(y)\nh = cos(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\tanh ^{-1}(y z)$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\frac{2 x^3}{\\sqrt{x^4}}+\\frac{z}{1-y^2 z^2}+e^{y+z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**4)\ng = atanh(y*z)\nh = math.e**(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y**5)\nh = tan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt[3]{x^4 z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 x^3 z}{3 \\sqrt[3]{x^4 z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**4)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x^5}{y z}\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 x^4}{y z \\sqrt{1-\\frac{x^{10}}{y^2 z^2}}} & \\frac{x^5}{y^2 z \\sqrt{1-\\frac{x^{10}}{y^2 z^2}}} & \\frac{x^5}{y z^2 \\sqrt{1-\\frac{x^{10}}{y^2 z^2}}} \\\\\n 0 & -\\frac{z}{y^2 \\left(\\frac{z^2}{y^2}+1\\right)} & \\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos((x**5)/(y*z))\ng = atan(z/y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(x-y)^{3/2}}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{y^2 z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 (x-y)^{5/2}} & \\frac{3}{2 (x-y)^{5/2}} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & -\\frac{2}{y^3 z^2} & -\\frac{2}{y^2 z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x-y)**(3/2)))\ng = asin(y)\nh = (1/(y**2*z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(-2 x-7)^3}-\\tan (7 x+5)$\n", - "Output Answer": [ - "$\\frac{6}{(2 x+7)^4}-7 \\sec ^2(7 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((-2*x-7)**3))-tan(7*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x^5$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = x**5\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n -\\frac{z}{3 x^2 \\sqrt[3]{\\frac{z}{x}}^2} & 0 & \\frac{1}{3 x \\sqrt[3]{\\frac{z}{x}}^2} \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+z)\ng = cbrt(z/x)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^5}$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-1)^2 \\left(\\frac{15}{8}-\\frac{\\sin (1)}{2}\\right)+(x-1) \\left(\\frac{5}{2}+\\cos (1)\\right)+1+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**5)\ng = sin(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & -\\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y)\ng = tan(y)\nh = log((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^5$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**5\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 9 x^2$ on the interval $x = 5$ to $x = 6$\n", - "Output Answer": [ - "$\\frac{1}{36} \\left(-90 \\sqrt{8101}+108 \\sqrt{11665}-\\sinh ^{-1}(90)+\\sinh ^{-1}(108)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 9*x**2\na = 5\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cos(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-7 x^3-\\frac{11}{2}}+\\cos (9 x+2)$\n", - "Output Answer": [ - "$-21 e^{-7 x^3-\\frac{11}{2}} x^2-9 \\sin (9 x+2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-7*x**3-(11/2))+cos(9*x+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = x y^5$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & -\\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n y^5 & 5 x y^4 & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x*z)\ng = x*y**5\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log \\left(y-z^2\\right)$, and $h(x,y,z) = \\sin ^{-1}\\left(z^2\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{2 z}{y-z^2},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = log(y-z**2)\nh = log(y-z**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\sec ^2\\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = tan((x/y))\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x z}{y}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tanh ^{-1}(x y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{3 y \\sqrt[3]{\\frac{x z}{y}}^2} & -\\frac{x z}{3 y^2 \\sqrt[3]{\\frac{x z}{y}}^2} & \\frac{x}{3 y \\sqrt[3]{\\frac{x z}{y}}^2} \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{y}{1-(x y+z)^2} & \\frac{x}{1-(x y+z)^2} & \\frac{1}{1-(x y+z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt((x*z)/y)\ng = sin(y)\nh = atanh(x*y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos (x y-z)$\n", - "Output Answer": [ - "$\\{-y \\sin (x y-z),-x \\sin (x y-z),\\sin (x y-z)\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y-z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(y^4\\right)$, and $h(x,y,z) = e^{z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -4 y^3 \\sin \\left(y^4\\right) & 0 \\\\\n 0 & 0 & 5 e^{z^5} z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(y**4)\nh = math.e**(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^4\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$3 (x+1) \\sin (1)+(x+1)^2 \\left(-6 \\sin (1)-\\frac{15 \\cos (1)}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**4)\ng = cos(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (1-8 x)-\\cos (2-9 x)$\n", - "Output Answer": [ - "$\\frac{8}{8 x-1}-9 \\sin (2-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(1-8*x)-cos(2-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2-\\frac{1}{2 x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{25}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan \\left(x^5\\right)$", - "Output Answer": [ - "$\\left\\{0,-5 x^4 \\sec ^2\\left(x^5\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**25\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(9-\\frac{11 x}{2}\\right)-\\sin (x+8)$\n", - "Output Answer": [ - "$\\frac{11}{2} \\cos \\left(9-\\frac{11 x}{2}\\right)-\\cos (x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(9-((11*x)/2))-sin(x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(2 x+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$-4 \\cos \\left(2 x+\\frac{17}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2*x+(17/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^4$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{2}{z^3},4 (x+z)^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**4\ng = (1/(z**2))\nh = (1/(z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^2\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\frac{2}{x}-\\sin (y+z)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**2)\ng = math.e**y\nh = cos(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cosh \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{y \\sinh \\left(\\frac{y}{z}\\right)}{z^2}+\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = sqrt(y)\nh = cosh(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = y^3 z$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 3 y^2 z & y^3 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z)\ng = y**3*z\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x y)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{x}-\\sin (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y)\ng = x+y\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{13 x}{5}+\\frac{32}{5}\\right)^4-\\sin \\left(\\frac{24 x}{5}+7\\right)$\n", - "Output Answer": [ - "$\\frac{4}{5} \\left(\\frac{13}{125} (13 x+32)^3-6 \\cos \\left(\\frac{24 x}{5}+7\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((13*x)/5)+(32/5))**4-sin(((24*x)/5)+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = y^4 z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n 0 & 4 y^3 z^4 & 4 y^4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = cosh(y)\nh = y**4*z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x+3}+\\log (-7 x-3)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+3)^2}-\\frac{4}{(4 x+3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x+3)+log(-7*x-3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(z^2\\right)^{3/2}}$, $g(x,y,z) = \\tan \\left(z^2\\right)$, and $h(x,y,z) = z^2-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{3 z}{\\left(z^2\\right)^{5/2}} \\\\\n 0 & 0 & 2 z \\sec ^2\\left(z^2\\right) \\\\\n 0 & -1 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((z**2)**(3/2)))\ng = tan(z**2)\nh = z**2-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$-\\tan \\left(\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{3}{2} \\left(1+\\tan ^2\\left(\\frac{3}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-tan(((3*x)/2)))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z^{10}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\frac{10}{z^{11}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = atan(y)\nh = (1/(z**10))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = (x-z)^3$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$4 x^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = (x-z)**3\nh = (1/(x**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\frac{1}{y}-\\frac{y}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = log(y*z)\nh = (y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x+1} \\sqrt{8-5 x}$\n", - "Output Answer": [ - "$\\frac{e^{7 x+1} \\left(4900 x^2-14980 x+11399\\right)}{4 (8-5 x)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x+1)*sqrt(8-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2 y z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x y z & x^2 z & x^2 y \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2*y*z\ng = sqrt(y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}+\\cos (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = sin(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = (y+z)^5$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{-5 (y+z)^4,\\frac{1}{\\sqrt{1-z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = (y+z)**5\nh = (y+z)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6 x)-\\tan ^{-1}(4-4 x)$\n", - "Output Answer": [ - "$\\frac{4}{(4-4 x)^2+1}+6 \\cos (6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x)-atan(4-4*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = (x+y+z)^2$", - "Output Answer": [ - "$2 (x+y+z)+\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acosh(y)\nh = (x+y+z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{10} z^2}$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{y \\left(-e^{y z}\\right),-\\frac{2}{x^{10} z^3},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**10*z**2))\ng = math.e**(y*z)\nh = math.e**(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\left(7 x^2-5\\right)^3-\\sin \\left(7-3 x^2\\right)$\n", - "Output Answer": [ - "$6 \\left(-35 \\left(49 x^4-42 x^2+5\\right)+6 x^2 \\sin \\left(7-3 x^2\\right)+\\cos \\left(7-3 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(7*x**2-5)**3-sin(7-3*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{\\frac{z^2}{y}}$", - "Output Answer": [ - "$3 x^2+\\frac{2 z}{3 y \\sqrt[3]{\\frac{z^2}{y}}^2}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sqrt(y)\nh = cbrt((z**2)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh \\left(x z^3\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z^3 \\cosh \\left(x z^3\\right) & 0 & 3 x z^2 \\cosh \\left(x z^3\\right) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{3 z^2}{2 \\sqrt{z^3}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x*z**3)\ng = cos(y)\nh = sqrt(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(y z)^{3/2}}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y*z)**(3/2)))\ng = asin(y)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,x \\sec ^2(x z),0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{5 x}-\\cos (7 x+8)$\n", - "Output Answer": [ - "$\\frac{1}{5 x^2}+7 \\sin (7 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(5*x))-cos(7*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $x^2$", - "Output Answer": [ - "$12-7 (x+4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = x**2\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sqrt(x)\nh = (1/(x**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$\\frac{1}{x^2}$\n", - "Output Answer": [ - "$\\frac{7}{65536}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S((1/(x**2)))\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(x^5+2\\right)$\n", - "Output Answer": [ - "$10 x^3 \\left(5 x^5 \\tan \\left(x^5+2\\right)+2\\right) \\sec ^2\\left(x^5+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(x**5+2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y z)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{y}{\\sqrt{1-y^2 z^2}},-\\frac{z}{\\sqrt{1-y^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y*z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^2$, $g(x,y,z) = \\cosh \\left(y^2\\right)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$2 y \\sinh \\left(y^2\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**2\ng = cosh(y**2)\nh = x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = e^x$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n e^x & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = math.e**x\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(8 x^2-8\\right)^5}+\\sin (3-5 x)$\n", - "Output Answer": [ - "$-\\frac{80 x}{\\left(8 x^2-8\\right)^6}-5 \\cos (3-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((8*x**2-8)**5))+sin(3-5*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = \\sinh \\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}-\\frac{x \\cosh \\left(\\frac{x}{y}+z\\right)}{y^2}+\\sinh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = sinh((x/y)+z)\nh = cosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6 x+4)$\n", - "Output Answer": [ - "$-6 \\sin (6 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6*x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\tanh (x)$", - "Output Answer": [ - "$\\frac{x^3}{3}-x+\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = tanh(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = acos(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{x}{y^3}-z\\right)^{3/2}$, $g(x,y,z) = \\tanh \\left(y^3\\right)$, and $h(x,y,z) = \\sqrt{y^3}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{\\frac{x}{y^3}-z}}{2 y^3}+3 y^2 \\text{sech}^2\\left(y^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/(y**3))-z)**(3/2)\ng = tanh(y**3)\nh = sqrt(y**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{y}{z}}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 z \\sqrt{\\frac{y}{z}}} & -\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}} \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((y/z))\ng = x\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^4$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-4 (x+y)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**4\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x-y)$, $g(x,y,z) = e^{x+y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x-y) & -\\cos (x-y) & 0 \\\\\n e^{x+y} & e^{x+y} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x-y)\ng = math.e**(x+y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\tanh ^{-1}\\left(x^4 z\\right)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^y & 0 \\\\\n \\frac{4 x^3 z}{1-x^8 z^2} & 0 & \\frac{x^4}{1-x^8 z^2} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**y\ng = atanh(x**4*z)\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = y^4$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = acos(y)\nh = y**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh \\left(x^2 z\\right)$", - "Output Answer": [ - "$4 x^2 z^2 \\sinh \\left(x^2 z\\right)+x^4 \\sinh \\left(x^2 z\\right)+2 z \\cosh \\left(x^2 z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x**2*z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = e^{z (x+y)}$", - "Output Answer": [ - "$\\left\\{z e^{z (x+y)}-\\sec ^2(x+z),z \\left(-e^{z (x+y)}\\right),\\sec ^2(x+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(x+z)\nh = tan(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$-\\sin (x)+\\cos (y)+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(y)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4+y$, $g(x,y,z) = \\sin \\left(x^4-y+z\\right)$, and $h(x,y,z) = x^4-z$", - "Output Answer": [ - "$\\left\\{-\\cos \\left(x^4-y+z\\right),-4 x^3,4 x^3 \\cos \\left(x^4-y+z\\right)-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4+y\ng = sin(x**4-y+z)\nh = sin(x**4-y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-\\frac{x^3}{3}+\\sqrt{x^4}-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y^5$, and $h(x,y,z) = e^{y^5}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x}}{2}+5 y^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y**5\nh = math.e**(y**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(z^2\\right)$, $g(x,y,z) = (x+y)^{3/2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,2 z \\cosh \\left(z^2\\right),\\frac{3 \\sqrt{x+y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(z**2)\ng = (x+y)**(3/2)\nh = (x+y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh ^{-1}\\left(x-y+z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{1-\\left(x-y+z^2\\right)^2} & -\\frac{1}{1-\\left(x-y+z^2\\right)^2} & \\frac{2 z}{1-\\left(x-y+z^2\\right)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y\nh = atanh(x-y+z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = e^{\\frac{z}{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}-\\frac{z e^{\\frac{z}{y}}}{y^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = math.e**(z/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y*z)\ng = cos(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (3 x)$ on the interval $x = 4$ to $x = 14$\n", - "Output Answer": [ - "$-\\sqrt{17}+\\sqrt{197}+\\tanh ^{-1}\\left(\\sqrt{17}\\right)-\\tanh ^{-1}\\left(\\sqrt{197}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x)\na = 4\nb = 14\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(y*z))\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = x^5+y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2},5 x^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = x**5+y\nh = x**5+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = asin(y+z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(5-x)$\n", - "Output Answer": [ - "$\\frac{x-5}{\\left(1-(x-5)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(5-x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x}{z^2 \\sqrt{\\frac{x}{z}-1} \\sqrt{\\frac{x}{z}+1}}-\\cos (x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x/z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\sqrt{\\frac{x}{y z}}$, and $h(x,y,z) = \\frac{x+y}{z}$", - "Output Answer": [ - "$-\\frac{x}{2 y^2 z \\sqrt{\\frac{x}{y z}}}-\\frac{x+y}{z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = sqrt((x/(y*z)))\nh = ((x+y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cosh ^{-1}(x)$", - "Output Answer": [ - "$x+\\left(i x-\\frac{i \\pi }{2}\\right) (-1)^{\\left\\lfloor \\frac{\\arg (x)}{2 \\pi }\\right\\rfloor }$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = acosh(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5 x-1) \\cos \\left(3 x^5+7\\right)$\n", - "Output Answer": [ - "$\\frac{5 \\cos \\left(3 x^5+7\\right)}{5 x-1}-15 x^4 \\log (5 x-1) \\sin \\left(3 x^5+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x-1)*cos(3*x**5+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{5}{2}-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$-324 \\sin ^4\\left(\\frac{1}{2} (5-9 x)\\right) \\csc ^3(5-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan((5/2)-((9*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\sec ^2(x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = cbrt(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(x+8) \\cos (5-5 x)$\n", - "Output Answer": [ - "$-5 \\sin ^{-1}(x+8) \\sin (5-5 x)-\\frac{\\cos (5-5 x)}{\\sqrt{1-(x+8)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(x+8)*cos(5-5*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{3}{2 (x+y)^{5/2}}+\\cos (x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/((x+y)**(3/2)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(4-4 x^2\\right)+\\log (-5 x-5)$\n", - "Output Answer": [ - "$\\frac{3 x-1}{x^2-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4-4*x**2)+log(-5*x-5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y-x}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n \\frac{1}{2 (y-x)^{3/2}} & -\\frac{1}{2 (y-x)^{3/2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = (1/(sqrt(y-x)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x+4}-\\log (-7 x-2)$\n", - "Output Answer": [ - "$\\frac{49}{(7 x+2)^2}-\\frac{1}{4 (x+4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x+4)-log(-7*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = cbrt(y)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\cosh (x y-z)$", - "Output Answer": [ - "$-\\frac{2}{x^3}-\\sinh (x y-z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = math.e**z\nh = cosh(x*y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{1}{2}-9 x} \\left(\\frac{7 x}{2}+\\frac{9}{2}\\right)^5$\n", - "Output Answer": [ - "$-\\frac{1}{32} e^{\\frac{1}{2}-9 x} (7 x+9)^4 (63 x+46)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((1/2)-9*x)*(((7*x)/2)+(9/2))**5, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\sin ^{-1}(x y)$, and $h(x,y,z) = \\cosh ^{-1}(x y)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{\\sqrt{x y-1} \\sqrt{x y+1}},-\\frac{y}{\\sqrt{x y-1} \\sqrt{x y+1}},\\frac{y}{\\sqrt{1-x^2 y^2}}-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = asin(x*y)\nh = asin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\left(\\frac{1}{2}+\\frac{1}{\\sqrt{5}}\\right) (x-2)+\\log (2)+\\sinh ^{-1}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{2 x^4-4}-\\tan (7 x+5)$\n", - "Output Answer": [ - "$-8 e^{2 x^4-4} x^3-7 \\sec ^2(7 x+5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(2*x**4-4)-tan(7*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4}{z^4}$, $g(x,y,z) = \\left(\\frac{x}{y}\\right)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{4 x^3}{z^4}-\\frac{3 x \\sqrt{\\frac{x}{y}}}{2 y^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(z**4))\ng = (x/y)**(3/2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{9}{2}-\\frac{7 x}{2}}$\n", - "Output Answer": [ - "$-\\frac{49}{16 \\left(\\frac{9}{2}-\\frac{7 x}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt((9/2)-((7*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x-y)$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x-y) & -\\cos (x-y) & 0 \\\\\n \\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}} & -\\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x-y)\ng = acos(y/x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(y z)$", - "Output Answer": [ - "$\\left\\{\\frac{z}{\\sqrt{1-y^2 z^2}},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & z e^{y z} & y e^{y z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y**(3/2)\nh = math.e**(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{9 x+\\frac{9}{2}}$\n", - "Output Answer": [ - "$9 e^{9 x+\\frac{9}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(9*x+(9/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-8}-\\tan (x+6)$\n", - "Output Answer": [ - "$64 e^{-8 (x+1)}-2 \\tan (x+6) \\sec ^2(x+6)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-8)-tan(x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$-\\frac{z^2}{2 y^4 \\left(\\frac{z}{y}-1\\right)^{3/2} \\sqrt{\\frac{z}{y}+1}}-\\frac{z^2}{2 y^4 \\sqrt{\\frac{z}{y}-1} \\left(\\frac{z}{y}+1\\right)^{3/2}}+\\frac{2 z}{y^3 \\sqrt{\\frac{z}{y}-1} \\sqrt{\\frac{z}{y}+1}}-\\frac{1}{2 y^2 \\left(\\frac{z}{y}-1\\right)^{3/2} \\sqrt{\\frac{z}{y}+1}}-\\frac{1}{2 y^2 \\sqrt{\\frac{z}{y}-1} \\left(\\frac{z}{y}+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(z/y)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$2 x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cos(z)\nh = x-y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$8$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 8\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{y^3},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\{1,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^5}}$, $g(x,y,z) = \\frac{x^5 z}{y}$, and $h(x,y,z) = e^{\\frac{x^5}{z}}$", - "Output Answer": [ - "$-\\frac{x^5 z}{y^2}-\\frac{x^5 e^{\\frac{x^5}{z}}}{z^2}-\\frac{5 x^4}{2 \\left(x^5\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**5)))\ng = ((x**5*z)/y)\nh = math.e**((x**5)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-5 x}+\\tan (5 x+8)$\n", - "Output Answer": [ - "$5 \\sec ^2(5 x+8)-\\frac{5}{2 \\sqrt{8-5 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-5*x)+tan(5*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (7 x+9)+\\sin (\\sin (1-7 x))$\n", - "Output Answer": [ - "$7 (\\cos (7 x+9)-\\cos (1-7 x) \\cos (\\sin (1-7 x)))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7*x+9)+sin(sin(1-7*x)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = sqrt(z)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x y^4 z$", - "Output Answer": [ - "$12 x y^2 z$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y**4*z\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = (x-y)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{3 \\sqrt{x-y}}{2}+\\frac{1}{2 \\sqrt{x+z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = (x-y)**(3/2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x}},y-x e^{x y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = (y z)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{3}{2} z \\sqrt{y z} & \\frac{3}{2} y \\sqrt{y z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = cos(y)\nh = (y*z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x-3}-\\cos (9-4 x)$\n", - "Output Answer": [ - "$4 e^{4 x-3}-4 \\sin (9-4 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x-3)-cos(9-4*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(x+y)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = acos(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sqrt{-x}-\\sin (3 x)$\n", - "Output Answer": [ - "$-\\frac{1}{40 \\sqrt{5}}-\\frac{9 \\sin (15)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt(-x)-sin(3*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2-2 x)+\\log (2)$\n", - "Output Answer": [ - "$\\frac{1}{x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2-2*x)+log(2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\sqrt{y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(y**2))\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-5 x^2-5}+\\sin \\left(e^{3 x^3+5}\\right)$\n", - "Output Answer": [ - "$9 e^{3 x^3+5} x^2 \\cos \\left(e^{3 x^3+5}\\right)-10 e^{-5 \\left(x^2+1\\right)} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-5*x**2-5)+sin(math.e**(3*x**3+5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\frac{1}{2 x \\sqrt{\\frac{z}{x}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = tan(z)\nh = sqrt((z/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-6 x}-\\sqrt{5 x-4}$\n", - "Output Answer": [ - "$-\\frac{5}{2 \\sqrt{5 x-4}}-\\frac{3}{\\sqrt{8-6 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-6*x)-sqrt(5*x-4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(y^5+z\\right)$\n", - "Output Answer": [ - "$\\left\\{0,5 y^4 \\cos \\left(y^5+z\\right),\\cos \\left(y^5+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**5+z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x z)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{x^2 z^2+1} & 0 & \\frac{x}{x^2 z^2+1} \\\\\n 1 & 1 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x*z)\ng = x+y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x+9}+\\log \\left(\\frac{10 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{2 \\sqrt{x+9}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x+9)+log(((10*x)/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = z$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = z\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt{x^5}$", - "Output Answer": [ - "$\\begin{cases}\n (x+4) (20 i \\cos (4)-32 i \\sin (4))-32 i \\cos (4) & \\Im(x)<0 \\\\\n (-20 i \\cos (4)+32 i \\sin (4)) (x+4)+32 i \\cos (4) & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sqrt(x**5)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cosh (2 x)$\n", - "Output Answer": [ - "$4 \\cosh (2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cosh(2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3 x+3}-\\cos (x+6)$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{3 x+3}}+\\sin (x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3*x+3)-cos(x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{7}{2}-6 x}$\n", - "Output Answer": [ - "$36 e^{\\frac{7}{2}-6 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**((7/2)-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y z}\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-\\frac{x}{y^2 z \\sqrt{1-\\frac{x^2}{y^2 z^2}}}+\\sec ^2(x)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = asin(x/(y*z))\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (x-6) \\sin (1-6 x)$\n", - "Output Answer": [ - "$\\frac{\\sin (1-6 x)}{x-6}-6 \\log (x-6) \\cos (1-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x-6)*sin(1-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7-2 x^2}-e^{6 x-7}$\n", - "Output Answer": [ - "$-4 e^{7-2 x^2} x-6 e^{6 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7-2*x**2)-math.e**(6*x-7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (x+9)$\n", - "Output Answer": [ - "$\\cos (x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(x+9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{5 x}{2}-7}-\\frac{1}{\\left(-\\frac{5 x}{2}-\\frac{17}{2}\\right)^4}$\n", - "Output Answer": [ - "$\\frac{320}{(5 x+17)^5}+\\frac{5}{4 \\sqrt{\\frac{5 x}{2}-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((5*x)/2)-7)-(1/((-((5*x)/2)-(17/2))**4)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh (\\cos (8 x+9))-(9 x-9)^4$\n", - "Output Answer": [ - "$-36 (9 x-9)^3-8 \\sin (8 x+9) \\sinh (\\cos (8 x+9))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cosh(cos(8*x+9))-(9*x-9)**4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z-x}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 \\sqrt{z-x}} & 0 & \\frac{1}{2 \\sqrt{z-x}} \\\\\n 0 & 0 & \\cos (z) \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z-x)\ng = sin(z)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{x-y^2}$\n", - "Output Answer": [ - "$\\left\\{e^{x-y^2},-2 y e^{x-y^2},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-y**2)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(\\frac{15 x}{2}+4\\right)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{15} (15 x+8)}{\\left(-15 x^2-16 x-4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(((15*x)/2)+4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin ^{-1}(y z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{z}{\\sqrt{1-y^2 z^2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = asin(y*z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = tan(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(y-x^3\\right)$, $g(x,y,z) = \\sin \\left(x^3\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 x^2}{y-x^3} & \\frac{1}{y-x^3} & 0 \\\\\n 3 x^2 \\cos \\left(x^3\\right) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y-x**3)\ng = sin(x**3)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-5} \\tan ^{-1}(3-2 x)$\n", - "Output Answer": [ - "$e^{5 x-5} \\left(\\frac{1}{-2 x^2+6 x-5}+5 \\tan ^{-1}(3-2 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-5)*atan(3-2*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+y-z)$, $g(x,y,z) = \\cosh (x+y)$, and $h(x,y,z) = \\frac{1}{x-y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+y-z) & -\\sin (x+y-z) & \\sin (x+y-z) \\\\\n \\sinh (x+y) & \\sinh (x+y) & 0 \\\\\n -\\frac{1}{(x-y+z)^2} & \\frac{1}{(x-y+z)^2} & -\\frac{1}{(x-y+z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+y-z)\ng = cosh(x+y)\nh = (1/(x-y+z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$5 x^4+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sin(y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$4 x^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = sqrt(x)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((y/x))\ng = tan(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{6 x}{3 x^2-1}-\\frac{5 x^4}{2 \\sqrt{x^5+3}}$\n", - "Output Answer": [ - "$\\log \\left(3 x^2-1\\right)-\\sqrt{x^5+3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((6*x)/(3*x**2-1))-((5*x**4)/(2*sqrt(x**5+3)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = z\nh = sqrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = tanh(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(\\cos ^{-1}(3 x+2)\\right)+\\cos (5 x+7)$\n", - "Output Answer": [ - "$\\frac{3}{\\sqrt{1-(3 x+2)^2} \\sqrt{1-\\cos ^{-1}(3 x+2)^2}}-5 \\sin (5 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(acos(3*x+2))+cos(5*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$10 e^{2 x^5} x^4$\n", - "Output Answer": [ - "$e^{2 x^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 10*math.e**(2*x**5)*x**4\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (2 x)+\\cos (x+6)$\n", - "Output Answer": [ - "$\\frac{1}{x}-\\sin (x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(2*x)+cos(x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(6-6 x)-\\sin \\left(1-x^2\\right)$\n", - "Output Answer": [ - "$2 x \\cos \\left(1-x^2\\right)-\\frac{6}{\\sqrt{1-36 (x-1)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(6-6*x)-sin(1-x**2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = math.e**y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y \\left(\\frac{x^2}{y^2}+1\\right)} & -\\frac{x}{y^2 \\left(\\frac{x^2}{y^2}+1\\right)} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x/y)\ng = sqrt(y+z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(2 x^5-2\\right)^2}+\\sin (4 x+3)$\n", - "Output Answer": [ - "$4 \\left(\\cos (4 x+3)-\\frac{5 x^4}{8 \\left(x^5-1\\right)^3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((2*x**5-2)**2))+sin(4*x+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x+y}$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = \\sin ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x+y)^2} & -\\frac{1}{(x+y)^2} & 0 \\\\\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x+y))\ng = (1/((x+y)**(3/2)))\nh = asin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{x}{3 \\sqrt[3]{x y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh ^{-1}\\left(x^3 y-z\\right)$", - "Output Answer": [ - "$-\\frac{9 x^4 y^2 \\left(x^3 y-z\\right)}{\\left(\\left(x^3 y-z\\right)^2+1\\right)^{3/2}}-\\frac{x^6 \\left(x^3 y-z\\right)}{\\left(\\left(x^3 y-z\\right)^2+1\\right)^{3/2}}+\\frac{6 x y}{\\sqrt{\\left(x^3 y-z\\right)^2+1}}-\\frac{x^3 y-z}{\\left(\\left(x^3 y-z\\right)^2+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x**3*y-z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(y+z)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{1-(y+z)^2} & \\frac{1}{1-(y+z)^2} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(y+z)\ng = tan(z)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\cos (x+y)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y)\ng = sqrt(z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\cos ^{-1}(x y)$", - "Output Answer": [ - "$\\frac{1}{z}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (y/z)\nh = acos(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$(x+2)^2 \\left(\\frac{\\sin (2)}{2}-\\frac{2}{25}\\right)+(x+2) \\left(\\cos (2)-\\frac{1}{5}\\right)-\\sin (2)+\\tan ^{-1}(2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos ^{-1}(z-x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\frac{1}{\\sqrt{1-(z-x)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = sqrt(y)\nh = acos(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(3-\\frac{x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{4} \\cos \\left(3-\\frac{x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3-(x/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = e^{x+z}$", - "Output Answer": [ - "$\\left\\{0,-e^{x+z},y e^{x y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(x*y)\nh = math.e**(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(3-9 x)^5}-e^{5 x-6}$\n", - "Output Answer": [ - "$\\frac{45}{(3-9 x)^6}-5 e^{5 x-6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((1/((3-9*x)**5))-math.e**(5*x-6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y**5\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\cos (y)-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sin(y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^{z^4}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{x}{2 y^2 \\left(\\frac{x}{y}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((x/y))))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(2-x^2\\right)^3+\\tan (5-2 x)$\n", - "Output Answer": [ - "$-6 x \\left(x^2-2\\right)^2-2 \\sec ^2(5-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2-x**2)**3+tan(5-2*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x-z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tanh \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-(x-z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x-z)^2}} \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & -\\frac{z \\text{sech}^2\\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\text{sech}^2\\left(\\frac{z}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x-z)\ng = y**3\nh = tanh(z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-24 x^3 \\sin \\left(6 x^4+7\\right)$\n", - "Output Answer": [ - "$\\cos \\left(6 x^4+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -24*x**3*sin(6*x**4+7)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2-\\frac{7 x^5}{2}}$\n", - "Output Answer": [ - "$\\frac{35 x^3 \\left(32-21 x^5\\right)}{4 \\sqrt{8-14 x^5} \\left(7 x^5-4\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2-((7*x**5)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cosh \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{x}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{z}{y}\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & \\frac{3 z}{2 y^2 \\left(\\frac{z}{y}\\right)^{5/2}} & -\\frac{3}{2 y \\left(\\frac{z}{y}\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = x\nh = (1/((z/y)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}}+\\frac{1}{y}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y/x)\ng = log(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-z}$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = (y+z)^3$", - "Output Answer": [ - "$\\left\\{3 (y+z)^2,-\\frac{1}{3 \\sqrt[3]{x-z}^2},-\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-z)\ng = cbrt(y/x)\nh = cbrt(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z^5}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}+z^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$\\frac{1}{y \\sqrt{1-\\left(\\frac{x}{y}+z^2\\right)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x/y)+z**2)\ng = y\nh = (x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (x-y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n -\\sin (x-y+z) & \\sin (x-y+z) & -\\sin (x-y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z\nh = cos(x-y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x} \\tan (9 x+3)$\n", - "Output Answer": [ - "$e^{7 x} \\left(7 \\tan (9 x+3)+9 \\sec ^2(9 x+3)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x)*tan(9*x+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\sin (x-z),\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = cbrt(x+y)\nh = cbrt(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3 x^2-5}+e^{x+3}$\n", - "Output Answer": [ - "$\\frac{3 x}{\\sqrt{3 x^2-5}}+e^{x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3*x**2-5)+math.e**(x+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{z^2}+\\sec ^2(y),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = (y/z)\nh = (y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{\\left(x+y^4\\right)^2}{z^2}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{\\frac{2 \\left(x+y^4\\right)^2}{z^3},0,\\frac{2 \\left(x+y^4\\right)}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = (((x+y**4)**2)/(z**2))\nh = (((x+y**4)**2)/(z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y^4+z}$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{2 y^3}{\\sqrt{y^4+z}} & \\frac{1}{2 \\sqrt{y^4+z}} \\\\\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sqrt(y**4+z)\nh = log(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (z)$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{3 \\sqrt[3]{y z}^2},\\cosh (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(z)\ng = cbrt(y*z)\nh = cbrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z (x+y)$, $g(x,y,z) = y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$z+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z*(x+y)\ng = y\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = (z/y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = cbrt(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{y^4}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{4 y^3}{z^4} & -\\frac{4 y^4}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y)\nh = ((y**4)/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(9 x^2-2\\right)^5+e^{-9 x}$\n", - "Output Answer": [ - "$90 x \\left(2-9 x^2\\right)^4-9 e^{-9 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((9*x**2-2)**5+math.e**(-9*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\cos (x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y\nh = (1/(y**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(7-2 x^4\\right)-\\sin ^{-1}\\left(7-9 x^4\\right)$\n", - "Output Answer": [ - "$\\frac{36 x^3}{\\sqrt{1-\\left(7-9 x^4\\right)^2}}-8 x^3 \\sec ^2\\left(7-2 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(7-2*x**4)-asin(7-9*x**4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x-z^2}^2}-2 z \\sin \\left(z^2\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-z**2)\ng = y\nh = cos(z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{x^3+y-z}$", - "Output Answer": [ - "$9 x^4 e^{x^3+y-z}+6 x e^{x^3+y-z}+2 e^{x^3+y-z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**3+y-z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = sqrt(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = cos(y)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh ^{-1}\\left(x^4\\right)$", - "Output Answer": [ - "$-\\frac{8 x^6}{\\left(x^4-1\\right)^{3/2} \\sqrt{x^4+1}}-\\frac{8 x^6}{\\sqrt{x^4-1} \\left(x^4+1\\right)^{3/2}}+\\frac{12 x^2}{\\sqrt{x^4-1} \\sqrt{x^4+1}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x**4)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = -\\tan ^{-1}(x-z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x-z)^2+1},2 z,-\\frac{1}{(x-z)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = -atan(x-z)\nh = -atan(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan (y-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -tan(y-z)\ng = tan(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-1) \\left(\\frac{\\sin (1)}{\\sqrt{2}}+\\cos (1) \\sinh ^{-1}(1)\\right)+\\sin (1) \\sinh ^{-1}(1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tanh ^{-1}\\left(y+z^4\\right)$, and $h(x,y,z) = \\sqrt[3]{y z^4}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{4 y z^3}{3 \\sqrt[3]{y z^4}^2}+\\frac{1}{1-\\left(y+z^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atanh(y+z**4)\nh = cbrt(y*z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y**5\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x^4-7}$\n", - "Output Answer": [ - "$28 e^{7 x^4-7} x^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x**4-7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (x z)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = tan(x*z)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan ^{-1}(x-y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{(x-y)^2+1} & -\\frac{1}{(x-y)^2+1} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = atan(x-y)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{y z^4}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{y^2 z^4},-\\frac{4}{y z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y*z**4))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $e^{x^2}$", - "Output Answer": [ - "$\\frac{319 e^4 (x-2)^2}{16 \\sqrt{2}}+\\frac{17 e^4 (x-2)}{2 \\sqrt{2}}+\\sqrt{2} e^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = math.e**(x**2)\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (8-5 x)-\\sqrt{2 x-2}$\n", - "Output Answer": [ - "$\\frac{1}{(2 x-2)^{3/2}}-25 \\cos (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8-5*x)-sqrt(2*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z^2}{x^2}$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2 z^2}{x^3} & 0 & \\frac{2 z}{x^2} \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n -1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((z**2)/(x**2))\ng = cbrt(x)\nh = y-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = \\frac{1}{y+z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(y+z)^2},\\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}},\\sec ^2(x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/x)\ng = tan(x+y)\nh = tan(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\text{sech}^2(x)+z \\sec ^2(y z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = tan(y*z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8 x+2)^5}$\n", - "Output Answer": [ - "$\\frac{15}{(4 x+1)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8*x+2)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{x}-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = acos(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = x y$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$x+\\sinh (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = x*y\nh = cbrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-x}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 (z-x)^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x-y^5}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x-y^5}},-\\frac{5 y^4}{2 \\sqrt{x-y^5}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y**5)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{\\left(5 x^2+7\\right)^4}-\\sin (1)$\n", - "Output Answer": [ - "$\\frac{40 x}{\\left(5 x^2+7\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/((5*x**2+7)**4))-sin(1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{32 \\cos \\left(\\frac{15}{2}-\\frac{x}{2}\\right)}{1419857}$\n", - "Output Answer": [ - "$-\\frac{16 \\sin \\left(\\frac{15-x}{2}\\right)}{1419857}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((32*cos((15/2)-(x/2)))/1419857), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x+4}+\\log (5)$\n", - "Output Answer": [ - "$-\\frac{9}{(6 x+4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x+4)+log(5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z \\left(x^5+y\\right)$\n", - "Output Answer": [ - "$\\left\\{5 x^4 z,z,x^5+y\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z*(x**5+y)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)} & 0 & -\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = atan(x/z)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\left(\\frac{z}{y}\\right)^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{1-x^2} & 0 & 0 \\\\\n 0 & -\\frac{3 z \\sqrt{\\frac{z}{y}}}{2 y^2} & \\frac{3 \\sqrt{\\frac{z}{y}}}{2 y} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x)\ng = (z/y)**(3/2)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6-x^3}+\\sqrt{4-4 x}$\n", - "Output Answer": [ - "$-\\frac{9 x^4}{4 \\left(6-x^3\\right)^{3/2}}-\\frac{3 x}{\\sqrt{6-x^3}}-\\frac{4}{(4-4 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6-x**3)+sqrt(4-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\log (x-y)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{z^2}-\\frac{1}{x-y},-\\frac{1}{x-y},\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((y/x))\ng = (y/z)\nh = (y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = e^{z^5-y}$, and $h(x,y,z) = \\cos \\left(x z^5\\right)$", - "Output Answer": [ - "$-5 x z^4 \\sin \\left(x z^5\\right)+\\sec ^2(x)-e^{z^5-y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = math.e**(z**5-y)\nh = cos(x*z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = (1/(z**2))\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{x+3}$\n", - "Output Answer": [ - "$e^{x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{5 x-3}}{(-9 x-2)^4}$\n", - "Output Answer": [ - "$\\frac{e^{5 x-3} (45 x-26)}{(9 x+2)^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(5*x-3))/((-9*x-2)**4)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(1-x^2\\right)$\n", - "Output Answer": [ - "$2 \\left(2 x^2 \\sin \\left(1-x^2\\right)+\\cos \\left(1-x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(1-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(9 x^5\\right)-\\tan (7 x+4)$\n", - "Output Answer": [ - "$\\frac{45 x^4}{\\sqrt{1-81 x^{10}}}-7 \\sec ^2(7 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(9*x**5)-tan(7*x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$7 x-\\frac{25}{3}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 7*x-(25/3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-3 x^2-7\\right)$\n", - "Output Answer": [ - "$-\\frac{6 \\left(3 x^2-7\\right)}{\\left(3 x^2+7\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x**2-7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4 x+\\frac{9}{2}\\right)-\\cos \\left(\\frac{3}{2}-\\frac{x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{4} \\left(\\cos \\left(\\frac{3-x}{2}\\right)-64 \\cos \\left(4 x+\\frac{9}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4*x+(9/2))-cos((3/2)-(x/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{1}{x+y}$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{1,1,-\\frac{1}{(x+y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = (1/(x+y))\nh = (1/(x+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{1}{\\sqrt{x y z}}$", - "Output Answer": [ - "$\\left\\{-\\frac{x z}{2 (x y z)^{3/2}}-1,\\frac{y z}{2 (x y z)^{3/2}},-x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\log \\left(\\frac{z}{x^4}\\right)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n -\\frac{4}{x} & 0 & \\frac{1}{z} \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = log((z/(x**4)))\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x y}$, $g(x,y,z) = \\sqrt{x-y}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2 y} & -\\frac{1}{x y^2} & 0 \\\\\n \\frac{1}{2 \\sqrt{x-y}} & -\\frac{1}{2 \\sqrt{x-y}} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x*y))\ng = sqrt(x-y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos (x y-z)$, and $h(x,y,z) = \\log \\left(\\frac{x z}{y}\\right)$", - "Output Answer": [ - "$\\frac{1}{z}-x \\sin (x y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = cos(x*y-z)\nh = log(((x*z)/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(x+y^2\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\left(x+y^2\\right)^2+1} & \\frac{2 y}{\\left(x+y^2\\right)^2+1} & 0 \\\\\n 0 & 2 y & 0 \\\\\n -\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}} & 0 & \\frac{1}{2 x \\sqrt{\\frac{z}{x}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+y**2)\ng = y**2\nh = sqrt((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = log(y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x+2} \\cos (6 x+3)$\n", - "Output Answer": [ - "$-e^{5 x+2} (60 \\sin (6 x+3)+11 \\cos (6 x+3))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x+2)*cos(6*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^2}$ and $g(x) = $x^5$", - "Output Answer": [ - "$12 (x-2)^5+60 (x-2)^4+160 (x-2)^3+240 (x-2)^2+192 (x-2)+64$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**2)\ng = x**5\nseries = f.subs(x, g).series(x, 2, 5)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3-2 x^5}-\\tan (1-8 x)$\n", - "Output Answer": [ - "$8 \\sec ^2(1-8 x)-\\frac{5 x^4}{\\sqrt{3-2 x^5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3-2*x**5)-tan(1-8*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(y z^3\\right)^{3/2}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{3}{2} z^3 \\sqrt{y z^3},\\frac{9}{2} y z^2 \\sqrt{y z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y*z**3)**(3/2)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^2}$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{-\\cos (y+z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2)\ng = sin(y+z)\nh = sin(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan ^{-1}(y z)$", - "Output Answer": [ - "$\\frac{y}{y^2 z^2+1}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = cos(y)\nh = atan(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{2}{\\sqrt{1-4 x}}$\n", - "Output Answer": [ - "$\\sqrt{1-4 x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(2/(sqrt(1-4*x)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = x-y\nh = asin(x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{z}{x}\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{3 z}{2 x^2 \\left(\\frac{z}{x}\\right)^{5/2}} & 0 & -\\frac{3}{2 x \\left(\\frac{z}{x}\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = acos(y)\nh = (1/((z/x)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{2 \\sqrt{y}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(x y^5\\right)$, $g(x,y,z) = \\sqrt{y^5-z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y^5 \\sinh \\left(x y^5\\right) & 5 x y^4 \\sinh \\left(x y^5\\right) & 0 \\\\\n 0 & \\frac{5 y^4}{2 \\sqrt{y^5-z}} & -\\frac{1}{2 \\sqrt{y^5-z}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x*y**5)\ng = sqrt(y**5-z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^5}}$, $g(x,y,z) = \\sinh ^{-1}(z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{z^2+1}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**5)))\ng = asinh(z)\nh = asinh(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\tan (z (x+y))$", - "Output Answer": [ - "$\\left\\{z \\sec ^2(z (x+y))-y \\sec ^2(y z),-z \\sec ^2(z (x+y)),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(y*z)\nh = tan(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log \\left(-5 x-\\frac{5}{2}\\right) \\sin (4-x)$\n", - "Output Answer": [ - "$\\frac{(8 x+4) \\cos (4-x)+\\left((2 x+1)^2 \\log \\left(-5 x-\\frac{5}{2}\\right)+4\\right) \\sin (4-x)}{(2 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(-5*x-(5/2))*sin(4-x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y-z}^2} & -\\frac{1}{3 \\sqrt[3]{y-z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = atan(y)\nh = cbrt(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (2 x+4) \\left(-\\tan ^{-1}(7-x)\\right)$\n", - "Output Answer": [ - "$\\frac{\\cos (2 (x+2))}{(x-7)^2+1}+2 \\sin (2 (x+2)) \\tan ^{-1}(7-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2*x+4)*(-atan(7-x)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\{-z \\sin (y z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z^5}$, $g(x,y,z) = \\log \\left(x-y-z^5\\right)$, and $h(x,y,z) = \\sqrt[3]{y-z^5}$", - "Output Answer": [ - "$\\left\\{\\frac{5 z^4}{x-y-z^5}+\\frac{1}{3 \\sqrt[3]{y-z^5}^2},\\frac{5 z^4}{2 \\sqrt{x+z^5}},\\frac{1}{x-y-z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z**5)\ng = log(x-y-z**5)\nh = log(x-y-z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = z**(3/2)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{6150 x^2}{\\left(41 x^3-30\\right)^3}$\n", - "Output Answer": [ - "$\\frac{25}{\\left(41 x^3-30\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((6150*x**2)/((41*x**3-30)**3))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sin \\left(x^2\\right)$", - "Output Answer": [ - "$\\frac{x^3}{3}+x^2+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sin(x**2)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(x^3+5\\right)$\n", - "Output Answer": [ - "$-\\frac{3 x \\left(x^3-10\\right)}{\\left(x^3+5\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x**3+5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$e^x+3 z^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(z)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^4}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$-\\frac{2 x^3}{\\left(x^4\\right)^{3/2}}+\\frac{1}{y}+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**4)))\ng = log(y)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\tan ^{-1}(x y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x}{z^2},\\frac{y}{x^2 y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = atan(x*y)\nh = atan(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(6-\\frac{3 x}{2}\\right)^3}$\n", - "Output Answer": [ - "$-\\frac{32}{9 (x-4)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((6-((3*x)/2))**3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x^4+\\frac{1}{2}}-\\sin \\left(\\frac{9}{2}-\\frac{x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(8 e^{x^4+\\frac{1}{2}} x^3+\\cos \\left(\\frac{9-x}{2}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x**4+(1/2))-sin((9/2)-(x/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos ^{-1}(z-y)$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(z-y)^2}} & -\\frac{1}{\\sqrt{1-(z-y)^2}} \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = acos(z-y)\nh = y**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6-6 x^4}+\\tan ^{-1}(\\sin (8 x))$\n", - "Output Answer": [ - "$\\frac{8 \\cos (8 x)}{\\sin ^2(8 x)+1}-\\frac{12 x^3}{\\sqrt{6-6 x^4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6-6*x**4)+atan(sin(8*x)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(7-9 x^3\\right)$\n", - "Output Answer": [ - "$-\\frac{54 x \\left(162 x^6-63 x^3-50\\right)}{\\left(81 x^6-126 x^3+50\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(7-9*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{z^4 (x-y)}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z^4 (x-y)^2},\\frac{1}{z^4 (x-y)^2},-\\frac{4}{z^5 (x-y)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**4*(x-y)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sqrt{x z}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$-\\frac{y}{x^2}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = sqrt(x*z)\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x-y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{(x-y)^2}{2 z^4 \\left(\\frac{x-y}{z}-1\\right)^{3/2} \\sqrt{\\frac{x-y}{z}+1}}-\\frac{(x-y)^2}{2 z^4 \\sqrt{\\frac{x-y}{z}-1} \\left(\\frac{x-y}{z}+1\\right)^{3/2}}+\\frac{2 (x-y)}{z^3 \\sqrt{\\frac{x-y}{z}-1} \\sqrt{\\frac{x-y}{z}+1}}-\\frac{1}{z^2 \\left(\\frac{x-y}{z}-1\\right)^{3/2} \\sqrt{\\frac{x-y}{z}+1}}-\\frac{1}{z^2 \\sqrt{\\frac{x-y}{z}-1} \\left(\\frac{x-y}{z}+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh((x-y)/z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$2 x+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = math.e**x\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\frac{y}{2 \\sqrt{x y}}+\\frac{1}{z \\sqrt{1-\\frac{y^2}{z^2}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = asin(y/z)\nh = (1/(y**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = \\sin (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cbrt(x*z)\nh = sin(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\left(y-z^3\\right)^2$", - "Output Answer": [ - "$\\left\\{-2 \\left(z^3-y\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = sqrt(y)\nh = acosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^5}$, $g(x,y,z) = y z$, and $h(x,y,z) = -\\tan \\left(x^5-y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{2 \\sqrt{x^5}} & 0 & 0 \\\\\n 0 & z & y \\\\\n -5 x^4 \\sec ^2\\left(x^5-y\\right) & \\sec ^2\\left(x^5-y\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**5)\ng = y*z\nh = -tan(x**5-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-7 x-4)^5}$\n", - "Output Answer": [ - "$-\\frac{1470}{(7 x+4)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-7*x-4)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\left(y^3\\right)^{3/2}}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{1-x^2} & 0 & 0 \\\\\n 0 & -\\frac{9 y^2}{2 \\left(y^3\\right)^{5/2}} & 0 \\\\\n 0 & 0 & \\sinh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x)\ng = (1/((y**3)**(3/2)))\nh = cosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(6 x^2+5\\right)+\\cos (x+6)$\n", - "Output Answer": [ - "$\\frac{12 x}{\\sqrt{1-\\left(6 x^2+5\\right)^2}}-\\sin (x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(6*x**2+5)+cos(x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+\\frac{1}{y^2+1}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = atan(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(z^5\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{5 z^4}{\\sqrt{1-z^{10}}} \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z**5)\ng = y**4\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tanh \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$4 x^3+\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = tanh(x/z)\nh = atan(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\frac{1}{x+y}+x e^{x z}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y)\ng = math.e**y\nh = math.e**(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\sinh (x-y+z)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$-\\cosh (x-y+z)+y \\sec ^2(x y)+\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = sinh(x-y+z)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-2 x-1} \\cos (1-8 x)$\n", - "Output Answer": [ - "$-4 e^{-2 x-1} (8 \\sin (1-8 x)+15 \\cos (1-8 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-2*x-1)*cos(1-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = \\cos \\left(x^5\\right)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,-5 x^4 \\sin \\left(x^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5)\ng = cos(x**5)\nh = cos(x**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\sqrt{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n \\frac{1}{2 z \\sqrt{\\frac{x}{z}}} & 0 & -\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (y/z)\nh = sqrt((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tanh ^{-1}\\left(\\frac{z}{y^4}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\text{sech}^2(x)-\\frac{4 z}{y^5 \\left(1-\\frac{z^2}{y^8}\\right)}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = atanh(z/(y**4))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{z-y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{1}{(z-y)^2} & -\\frac{1}{(z-y)^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = (1/(z-y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{\\sec ^2\\left(\\frac{x}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan((x/y))\nh = tan((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{x^2 z^2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{x-z}}$", - "Output Answer": [ - "$\\frac{1}{2 (x-z)^{3/2}}+\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(x**2*z**2))\nh = (1/(sqrt(x-z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $x$", - "Output Answer": [ - "$(x-4)^2 \\left(\\tanh ^3(4)-\\tanh (4)\\right)+(x-4) \\left(2-\\tanh ^2(4)\\right)+4+\\tanh (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = x\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y-x}}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt[3]{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 (y-x)^{3/2}} & -\\frac{1}{2 (y-x)^{3/2}} & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x-z}^2} & 0 & -\\frac{1}{3 \\sqrt[3]{x-z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y-x)))\ng = (1/(y**2))\nh = cbrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(z \\left(x+y^3\\right)\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z}{\\sqrt{1-z^2 \\left(x+y^3\\right)^2}},\\frac{3 y^2 z}{\\sqrt{1-z^2 \\left(x+y^3\\right)^2}},\\frac{x+y^3}{\\sqrt{1-z^2 \\left(x+y^3\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z*(x+y**3))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^3\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$-3 x^2 \\sin \\left(x^3\\right)+\\frac{1}{3 \\sqrt[3]{y}^2}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**3)\ng = cbrt(y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x^2-5}$\n", - "Output Answer": [ - "$14 e^{7 x^2-5} \\left(14 x^2+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x**2-5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan ^{-1}(8-8 x)-\\tan (5 x+4)$\n", - "Output Answer": [ - "$\\frac{8}{(8-8 x)^2+1}-5 \\sec ^2(5 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-atan(8-8*x)-tan(5*x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = (x+z)^3$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = (x+z)**3\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\frac{1}{\\sqrt{y z}}$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\frac{y}{2 (y z)^{3/2}}+\\sec ^2(y),0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (1/(sqrt(y*z)))\nh = (1/(sqrt(y*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sin ^{-1}(x+y)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\left\\{0,x-z \\cos (x z),\\frac{1}{\\sqrt{1-(x+y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = asin(x+y)\nh = asin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = x y z$, and $h(x,y,z) = \\cos (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n y z & x z & x y \\\\\n -z \\sin (x z) & 0 & -x \\sin (x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = x*y*z\nh = cos(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,\\cos (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(x+y)\nh = sin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{4 x-3} \\sin \\left(7 x^3+9\\right)$\n", - "Output Answer": [ - "$e^{4 x-3} \\left(\\left(441 x^4-16\\right) \\sin \\left(7 x^3+9\\right)-42 x (4 x+1) \\cos \\left(7 x^3+9\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(4*x-3)*sin(7*x**3+9)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2 y^2$, $g(x,y,z) = \\sqrt{\\frac{x}{z^4}}$, and $h(x,y,z) = \\sin \\left(z^4\\right)$", - "Output Answer": [ - "$2 x y^2+4 z^3 \\cos \\left(z^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2*y**2\ng = sqrt((x/(z**4)))\nh = sin(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = z (x-y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y \\sin \\left(\\frac{y}{x}\\right)}{x^2} & -\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n z & -z & x-y \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((y/x))\ng = z*(x-y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\frac{1}{(y z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{z}-\\frac{3 y}{2 (y z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = (y/z)\nh = (1/((y*z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{x}{2}-6}$\n", - "Output Answer": [ - "$-\\frac{1}{16 \\left(-\\frac{x}{2}-6\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-(x/2)-6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,\\cos (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cosh \\left(\\cos \\left(2-8 x^2\\right)\\right)$\n", - "Output Answer": [ - "$16 \\left(\\left(\\sin \\left(2-8 x^2\\right)-16 x^2 \\cos \\left(2-8 x^2\\right)\\right) \\sinh \\left(\\cos \\left(2-8 x^2\\right)\\right)+16 x^2 \\sin ^2\\left(2-8 x^2\\right) \\cosh \\left(\\cos \\left(2-8 x^2\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cosh(cos(2-8*x**2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(7-4 x)^2 (7 x-8)^4$\n", - "Output Answer": [ - "$4 (4 x-7) (7 x-8)^3 (42 x-65)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((7-4*x)**2*(7*x-8)**4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = e^{\\frac{y}{x}}$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n -\\frac{y e^{\\frac{y}{x}}}{x^2} & \\frac{e^{\\frac{y}{x}}}{x} & 0 \\\\\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = math.e**(y/x)\nh = tan(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}\\left(x^2\\right)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$x^2+\\sqrt{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x**2)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y**2)\nh = cos(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = (x y)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n \\frac{3}{2} y \\sqrt{x y} & \\frac{3}{2} x \\sqrt{x y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (z/y)\nh = (x*y)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{x+2} \\log (8 x-4)$\n", - "Output Answer": [ - "$e^{x+2} \\left(\\frac{8 (x-1)}{(1-2 x)^2}+\\log (8 x-4)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x+2)*log(8*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\sin (x+z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{-\\cos (x+z),0,\\cos (x+z)-\\frac{3 \\sqrt{y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = sin(x+z)\nh = sin(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y-z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{y}{3 \\sqrt[3]{x y-z}^2}+\\frac{1}{3 \\sqrt[3]{y}^2}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y-z)\ng = cbrt(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\sec ^2(x+z)+\\frac{1}{\\sqrt{1-y^2}}+y \\cos (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = asin(y)\nh = sin(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cos \\left(4 x^5\\right)-\\cos \\left(2 x^4\\right)$\n", - "Output Answer": [ - "$300 \\sin (1250)-5000 \\sin (12500)+500000 \\cos (1250)-78125000 \\cos (12500)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(4*x**5)-cos(2*x**4))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^3$", - "Output Answer": [ - "$-\\frac{3472}{289} (x-4)^2-\\frac{815 (x-4)}{17}-64+\\tan ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**3\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{6 x^2}{\\log (8-5 x)}$\n", - "Output Answer": [ - "$\\frac{6 x \\left(\\frac{5 x}{8-5 x}+2 \\log (8-5 x)\\right)}{\\log ^2(8-5 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((6*x**2)/(log(8-5*x))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (5-2 x)+\\tan \\left(\\frac{x}{2}+2\\right)$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(\\sec ^2\\left(\\frac{x+4}{2}\\right)-4 \\sec ^2(5-2 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(5-2*x)+tan((x/2)+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-(x+z)^2}},\\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\ng = cbrt(x/y)\nh = cbrt(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x-y) & \\sin (x-y) & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-y)\ng = sin(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{7-4 x^2}-\\tan ^{-1}(3 x+7)$\n", - "Output Answer": [ - "$\\frac{18 (3 x+7)}{\\left(9 x^2+42 x+50\\right)^2}+e^{7-4 x^2} \\left(8-64 x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(7-4*x**2)-atan(3*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{16 x}{3}-\\frac{14}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{64}{(7-8 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((16*x)/3)-(14/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 1 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-z)\ng = atan(x)\nh = x-y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y}-z^2\\right)^3$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 \\left(\\frac{x}{y}-z^2\\right)^2}{y},-\\frac{3 x \\left(\\frac{x}{y}-z^2\\right)^2}{y^2},-6 z \\left(\\frac{x}{y}-z^2\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/y)-z**2)**3\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((y/x))\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{1-4 x^5}$\n", - "Output Answer": [ - "$80 e^{1-4 x^5} x^3 \\left(5 x^5-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(1-4*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = sqrt(y)\nh = atan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x y)$, $g(x,y,z) = y^3$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\left\\{x,-y,-x \\text{sech}^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*y)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(3-x^3\\right)+\\cos (4 x+8)$\n", - "Output Answer": [ - "$-3 x^2 \\cos \\left(3-x^3\\right)-4 \\sin (4 (x+2))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3-x**3)+cos(4*x+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 0 & 1 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z-x\ng = tan(y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n -1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = sin(y)\nh = y-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(\\frac{5}{2}-7 x\\right)$\n", - "Output Answer": [ - "$-\\frac{49 \\left(\\frac{5}{2}-7 x\\right)}{\\left(1-\\left(\\frac{5}{2}-7 x\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin((5/2)-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-4 x-6}+\\tan (8 x+6)$\n", - "Output Answer": [ - "$8 \\sec ^2(8 x+6)-4 e^{-4 x-6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-4*x-6)+tan(8*x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3-2 x}+e^{5 x+1}$\n", - "Output Answer": [ - "$5 e^{5 x+1}-\\frac{1}{\\sqrt{3-2 x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3-2*x)+math.e**(5*x+1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin \\left(x+y^3\\right)$", - "Output Answer": [ - "$2 x+3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y**3\nh = sin(x+y**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\frac{1}{x}$\n", - "Output Answer": [ - "$-\\frac{1}{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S((1/x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^2}{z^2}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\frac{x}{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{2 y}{z^2} & -\\frac{2 y^2}{z^3} \\\\\n -\\sin (x) & 0 & 0 \\\\\n \\frac{1}{y z} & -\\frac{x}{y^2 z} & -\\frac{x}{y z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**2)/(z**2))\ng = cos(x)\nh = (x/(y*z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(2-9 x)-\\tan (4 x+4)$\n", - "Output Answer": [ - "$-\\frac{162 (2-9 x)}{\\left((2-9 x)^2+1\\right)^2}-32 \\tan (4 (x+1)) \\sec ^2(4 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(2-9*x)-tan(4*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\sqrt{7 x^2-7}\\right)-\\cosh (8 x+4)$\n", - "Output Answer": [ - "$\\frac{7 x \\cos \\left(\\sqrt{7 x^2-7}\\right)}{\\sqrt{7 x^2-7}}-8 \\sinh (8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(sqrt(7*x**2-7))-cosh(8*x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{1}{y+z} & \\frac{1}{y+z} \\\\\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = log(y+z)\nh = sin(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-x}},\\frac{1}{2 \\sqrt{y-x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = e^{\\frac{z}{x}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{y}{3 \\sqrt[3]{x y}^2}+\\cos (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y)\ng = math.e**(z/x)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{\\frac{z}{x}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**(z/x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-5 x-2}+\\tan ^{-1}(5-7 x)$\n", - "Output Answer": [ - "$-5 e^{-5 x-2}-\\frac{7}{(5-7 x)^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-5*x-2)+atan(5-7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$(x-4) \\left(-\\frac{\\sin (4)}{2}-\\frac{\\cos (4)}{16}\\right)+\\frac{\\cos (4)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$64 \\sqrt{-6 x-7}$\n", - "Output Answer": [ - "$-\\frac{192}{\\sqrt{-6 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(64*sqrt(-6*x-7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{2 x}{\\sqrt{1-2 x^2}}$\n", - "Output Answer": [ - "$\\sqrt{1-2 x^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((2*x)/(sqrt(1-2*x**2)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\cos \\left(y+z^4\\right)$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\left\\{4 z^3 \\sin \\left(y+z^4\\right)-\\frac{3}{2 y^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = cos(y+z**4)\nh = cos(y+z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^{z-x}$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$3 x^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = math.e**(z-x)\nh = (1/(y**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = y^2$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & -\\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = asin(y)\nh = log((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 z^3$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$3 x^2 z^3+\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*z**3\ng = asin(y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**y\nh = y**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{y}{\\sqrt{y^2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y**2)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{3}{2 y^{5/2}}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(y**(3/2)))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\log \\left(x^5\\right)$", - "Output Answer": [ - "$-\\frac{47}{30} (x-3)-5 \\log (3)+\\tan ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = log(x**5)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2-5 x^5\\right)-\\tan ^{-1}(1-4 x)$\n", - "Output Answer": [ - "$25 x^4 \\sin \\left(2-5 x^5\\right)+\\frac{4}{(1-4 x)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2-5*x**5)-atan(1-4*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{y^5}{z^5}$, and $h(x,y,z) = \\cos ^{-1}(x+z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+z)^2}}+\\frac{5 y^4}{z^5}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = ((y**5)/(z**5))\nh = acos(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(9 x^4-4\\right)$\n", - "Output Answer": [ - "$-\\frac{108 x^2 \\left(3 x^4+4\\right)}{\\left(4-9 x^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(9*x**4-4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x y}^2}+z \\cos (x z)+y \\sec ^2(y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z)\ng = cbrt(x*y)\nh = tan(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4 y^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$4 x^3 y^4-\\sin (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4*y**4\ng = y\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sin (x+y)$", - "Output Answer": [ - "$e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sqrt(x)\nh = sin(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+3 e^{z^3} z^2+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = math.e**(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x^5-9}$\n", - "Output Answer": [ - "$25 e^{5 x^5-9} x^3 \\left(25 x^5+4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x**5-9)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = x**(3/2)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\cos (y z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = cos(y*z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(x^2+7\\right)+\\sqrt{5 x-3}$\n", - "Output Answer": [ - "$2 x \\sec ^2\\left(x^2+7\\right)+\\frac{5}{2 \\sqrt{5 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(x**2+7)+sqrt(5*x-3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = \\frac{z^5}{y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y \\sin \\left(\\frac{y}{x}\\right)}{x^2} & -\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n 0 & -\\frac{5 z^5}{y^6} & \\frac{5 z^4}{y^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((y/x))\ng = cbrt(x*z)\nh = ((z**5)/(y**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(x)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos ^{-1}(2 x)$ on the interval $x = 3$ to $x = 9$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{5} \\left(E\\left(\\sin ^{-1}(18)|\\frac{1}{5}\\right)-E\\left(\\sin ^{-1}(6)|\\frac{1}{5}\\right)\\right)+i \\sqrt{31}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2*x)\na = 3\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5 z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x^5 y z$", - "Output Answer": [ - "$\\left\\{x^5 z,\\frac{x^5}{3 \\sqrt[3]{x^5 z}^2}-5 x^4 y z,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5*z)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = log(y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4-4 x} \\log (4 x-2)$\n", - "Output Answer": [ - "$-\\frac{2 e^{4-4 x} ((4 x-2) \\log (4 x-2)-1)}{2 x-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4-4*x)*log(4*x-2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = (z-x)^5$", - "Output Answer": [ - "$5 (z-x)^4+\\frac{1}{2 \\sqrt{x}}-\\frac{2}{y^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(y**2))\nh = (z-x)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(\\frac{x}{y^2 z}\\right)$", - "Output Answer": [ - "$-\\frac{1}{x^2}+\\frac{2}{y^2}+\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/(y**2*z)))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x^2\\right)^{3/2}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos \\left(x^2+y\\right)$", - "Output Answer": [ - "$\\cos (y)-\\frac{3 x}{\\left(x^2\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**2)**(3/2)))\ng = sin(y)\nh = cos(x**2+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^2+z$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 y & 1 \\\\\n 3 x^2 & 0 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**2+z\ng = x**3\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (3 x+2)+1$\n", - "Output Answer": [ - "$3 \\sec ^2(3 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(3*x+2)+1, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$, $g(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},-\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x/z)\ng = log((y/z))\nh = log((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = y+z$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 1 & 1 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y)\ng = y+z\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x-z)$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x-z)^2}}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x-z)\ng = y-z\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x y+z)$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -y \\sin (x y+z) & -x \\sin (x y+z) & -\\sin (x y+z) \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*y+z)\ng = cbrt(y*z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n 4 x^3 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/z)\nh = x**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-7}-\\log (6-6 x)$\n", - "Output Answer": [ - "$\\frac{1}{1-x}+\\frac{1}{\\sqrt{2 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-7)-log(6-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = e^{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n -e^{z-x} & 0 & e^{z-x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = y\nh = math.e**(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y-z^5$, and $h(x,y,z) = \\log \\left(x+z^5\\right)$", - "Output Answer": [ - "$\\frac{5 z^4}{x+z^5}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y-z**5\nh = log(x+z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7 x-3} \\cos (2 x+7)$\n", - "Output Answer": [ - "$\\frac{\\left(-784 x^2+672 x-193\\right) \\cos (2 x+7)+56 (3-7 x) \\sin (2 x+7)}{4 (7 x-3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7*x-3)*cos(2*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(4 x^3+7\\right)+e^{6 x}$\n", - "Output Answer": [ - "$36 e^{6 x}-\\frac{3 x \\left(4 x^6-7 x^3-24\\right)}{\\sqrt{2} \\left(-2 x^6-7 x^3-6\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = acos(4*x**3+7)+math.e**(6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (5 x+6)}{\\sin ^{-1}\\left(2 x^2\\right)}$\n", - "Output Answer": [ - "$\\frac{-5 \\sin ^{-1}\\left(2 x^2\\right) \\sin (5 x+6)-\\frac{4 x \\cos (5 x+6)}{\\sqrt{1-4 x^4}}}{\\sin ^{-1}\\left(2 x^2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(5*x+6))/(asin(2*x**2))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$e^y-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = math.e**y\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$\\frac{1}{x}-\\frac{x}{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**2\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x^3-y-z\\right)^3$", - "Output Answer": [ - "$54 x^4 \\left(x^3-y-z\\right)+18 x \\left(x^3-y-z\\right)^2+12 \\left(x^3-y-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**3-y-z)**3\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x z^2}$", - "Output Answer": [ - "$-\\frac{x^2 z^2}{\\left(x z^2\\right)^{3/2}}-\\frac{z^4}{4 \\left(x z^2\\right)^{3/2}}+\\frac{x}{\\sqrt{x z^2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z**2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-8 x^4} \\log (2 x+6)$\n", - "Output Answer": [ - "$\\frac{e^{8-8 x^4} \\left(1-32 x^3 (x+3) \\log (2 (x+3))\\right)}{x+3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-8*x**4)*log(2*x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = atanh(y)\nh = atanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{6 x \\left(-9 x^4+4 \\left(9 x^4+x^2\\right) \\log \\left(9 x^2+1\\right)-6\\right)}{\\left(9 x^2+1\\right) \\left(3 x^4+2\\right)^3}$\n", - "Output Answer": [ - "$\\frac{\\log \\left(9 x^2+1\\right)}{\\left(3 x^4+2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((6*x*(-9*x**4+4*(9*x**4+x**2)*log(9*x**2+1)-6))/((9*x**2+1)*(3*x**4+2)**3))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = sqrt(y)\nh = sqrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (3 x+1)+\\cos (3 x+5)$\n", - "Output Answer": [ - "$3 (\\cos (3 x+1)-\\sin (3 x+5))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3*x+1)+cos(3*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = y$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left\\{z,\\frac{1}{2 \\sqrt{z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & -\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\cos \\left(\\frac{z}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = y**4\nh = sin((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{8 x+1}}{\\left(6 x^5-3\\right)^3}$\n", - "Output Answer": [ - "$-\\frac{2 \\left(116 x^5+15 x^4+2\\right)}{27 \\sqrt{8 x+1} \\left(1-2 x^5\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(8*x+1))/((6*x**5-3)**3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = asin(x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{15}{2}-8 x\\right)$\n", - "Output Answer": [ - "$64 \\sin \\left(\\frac{15}{2}-8 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((15/2)-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = (y/z)\nh = (z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x+z^4\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\frac{1}{\\left(x+z^4\\right)^2+1}+4 z^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+z**4)\ng = y\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-6 \\cos (9-6 x)$\n", - "Output Answer": [ - "$-6 \\left(\\frac{1}{6} \\cos (9) \\sin (6 x)-\\frac{1}{6} \\sin (9) \\cos (6 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -6*cos(9-6*x)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{y}{x^4 z}$", - "Output Answer": [ - "$\\frac{2 y}{x^4 z^3}+\\frac{20 y}{x^6 z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(x**4*z))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y+z}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (x+y+z)^{3/2}},0,\\sin (y)-\\frac{1}{2 (x+y+z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = (1/(sqrt(x+y+z)))\nh = (1/(sqrt(x+y+z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x^4}{y z^2}\\right)$", - "Output Answer": [ - "$-\\frac{x^8 \\sin \\left(\\frac{x^4}{y z^2}\\right)}{y^4 z^4}-\\frac{4 x^8 \\sin \\left(\\frac{x^4}{y z^2}\\right)}{y^2 z^6}-\\frac{16 x^6 \\sin \\left(\\frac{x^4}{y z^2}\\right)}{y^2 z^4}+\\frac{2 x^4 \\cos \\left(\\frac{x^4}{y z^2}\\right)}{y^3 z^2}+\\frac{6 x^4 \\cos \\left(\\frac{x^4}{y z^2}\\right)}{y z^4}+\\frac{12 x^2 \\cos \\left(\\frac{x^4}{y z^2}\\right)}{y z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((x**4)/(y*z**2)))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x-y-z$", - "Output Answer": [ - "$\\{-1,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x y z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{x},\\frac{1}{y},\\frac{5}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y*z**5)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$6 \\sin (8-6 x)$\n", - "Output Answer": [ - "$6 \\left(\\frac{1}{6} \\sin (8) \\sin (6 x)+\\frac{1}{6} \\cos (8) \\cos (6 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 6*sin(8-6*x)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt[3]{x+z}$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{2 \\sqrt{y z}},-\\frac{1}{3 \\sqrt[3]{x+z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y*z)\nh = sqrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y+z}}$", - "Output Answer": [ - "$-\\frac{1}{2 (y+z)^{3/2}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = cos(y)\nh = (1/(sqrt(y+z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x+z^3\\right)$, $g(x,y,z) = \\tanh \\left(y z^3\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z^3}{y}\\right)$", - "Output Answer": [ - "$\\sec ^2\\left(x+z^3\\right)-\\frac{3 z^2}{y \\sqrt{1-\\frac{z^6}{y^2}}}+z^3 \\text{sech}^2\\left(y z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z**3)\ng = tanh(y*z**3)\nh = acos((z**3)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x y z^3\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(x-y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x-y)^2+1},3 x y z^2 \\sec ^2\\left(x y z^3\\right)-\\frac{1}{(x-y)^2+1},-x z^3 \\sec ^2\\left(x y z^3\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y*z**3)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x+y}{z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},\\frac{1}{z},-\\frac{x+y}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(2 x^4-7\\right)^4+\\sin \\left(6 x^4+6\\right)$\n", - "Output Answer": [ - "$8 x^3 \\left(4 \\left(2 x^4-7\\right)^3+3 \\cos \\left(6 \\left(x^4+1\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2*x**4-7)**4+sin(6*x**4+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^3\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+2) \\left(12-\\sin (2)+12 \\tan ^2(8)\\right)-\\cos (2)-\\tan (8)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**3)\ng = cos(x)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}(7 x+3)$\n", - "Output Answer": [ - "$\\frac{98 (7 x+3)}{\\left((7 x+3)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(7*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^3\\right)$ and $g(x) = $e^{x^3}$", - "Output Answer": [ - "$(x-2) \\left(12 \\cos (8)-12 e^8\\right)-e^8+\\sin (8)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sin(x**3)\ng = math.e**(x**3)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x} \\sin ^{-1}(8 x+1)$\n", - "Output Answer": [ - "$2 e^{-6 x} \\left(\\frac{1}{\\sqrt{-x (4 x+1)}}-3 \\sin ^{-1}(8 x+1)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x)*asin(8*x+1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (8 x+8) \\tan (5 x+4)$\n", - "Output Answer": [ - "$(57 \\cos (3 x+4)-8 \\cos (7 x+4)+23 \\cos (13 x+12)+8 \\cos (23 x+20)) \\sec ^3(5 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(8*x+8)*tan(5*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$-\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2}+\\frac{\\cosh \\left(\\frac{x}{y}\\right)}{y}+y \\sec ^2(y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x/y)\ng = cbrt(x/y)\nh = tan(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(5-3 x^2\\right)-(3-7 x)^5$\n", - "Output Answer": [ - "$6 \\sin \\left(5-3 x^2\\right)-36 x^2 \\cos \\left(5-3 x^2\\right)+980 (7 x-3)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5-3*x**2)-(3-7*x)**5\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(3-7 x)$\n", - "Output Answer": [ - "$-\\frac{49 (3-7 x)}{\\left(1-(3-7 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(3-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = y\nh = cbrt(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (z-y)^3$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -3 (z-y)^2 & 3 (z-y)^2 \\\\\n 0 & \\cosh (y) & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z-y)**3\ng = sinh(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(8 x^5+5\\right)+\\log (7 x+1)$\n", - "Output Answer": [ - "$40 x^4 \\cos \\left(8 x^5+5\\right)+\\frac{7}{7 x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(8*x**5+5)+log(7*x+1), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2-\\frac{1}{(x-y)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(3-4 x^2\\right)$\n", - "Output Answer": [ - "$8 \\left(8 x^2 \\sin \\left(3-4 x^2\\right)+\\cos \\left(3-4 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(3-4*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos \\left(x^3\\right)$", - "Output Answer": [ - "$\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cos(x**3)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\log (y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y+z},0,\\frac{2}{y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2))\ng = log(y+z)\nh = log(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (5-7 x)}{\\sqrt{-2 x-8}}$\n", - "Output Answer": [ - "$\\frac{7 \\sin (5-7 x)}{\\sqrt{-2 x-8}}+\\frac{\\cos (5-7 x)}{(-2 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(5-7*x))/(sqrt(-2*x-8))), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x y^5}{z}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{y^5}{z \\left(\\frac{x^2 y^{10}}{z^2}+1\\right)},\\frac{5 x y^4}{z \\left(\\frac{x^2 y^{10}}{z^2}+1\\right)},-\\frac{x y^5}{z^2 \\left(\\frac{x^2 y^{10}}{z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x*y**5)/z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x+y}{z^2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{z^2},\\frac{1}{z^2},-\\frac{2 (x+y)}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/(z**2))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\log \\left(y-x^4\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{4 x^3}{y-x^4}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = log(y-x**4)\nh = log(y-x**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x y)$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\tan ^{-1}\\left(z^3\\right)$", - "Output Answer": [ - "$y \\text{sech}^2(x y)+\\frac{3 z^2}{z^6+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*y)\ng = z**3\nh = atan(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(x^2\\right)$, $g(x,y,z) = \\frac{x^2}{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x \\sinh \\left(x^2\\right) & 0 & 0 \\\\\n \\frac{2 x}{y} & -\\frac{x^2}{y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x**2)\ng = ((x**2)/y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sinh (x-y)$, and $h(x,y,z) = \\frac{x}{y z}$", - "Output Answer": [ - "$-\\frac{x}{y z^2}-\\cosh (x-y)+2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sinh(x-y)\nh = (x/(y*z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(8-4 x^3\\right)+(-4 x-5)^2$\n", - "Output Answer": [ - "$8 \\left(\\left(36 x^4 \\tan \\left(8-4 x^3\\right)-3 x\\right) \\sec ^2\\left(8-4 x^3\\right)+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8-4*x**3)+(-4*x-5)**2\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x^4}$", - "Output Answer": [ - "$\\begin{cases}\n x^{5/3} & x>0 \\\\\n -(-x)^{5/3} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x**4)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left\\{z \\sec ^2(y z),y \\sec ^2(y z),-z \\sec ^2(y z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y*z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}}+\\sec ^2(y)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/x)\ng = tan(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{x+y}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = log(x+y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = sqrt(y)\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^2}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$-\\frac{1}{9} (x+1)^2-\\frac{4 (x+1)}{3}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**2)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh \\left(e^{x+1}\\right)-\\cos ^{-1}(-3 x-5)$\n", - "Output Answer": [ - "$e^{x+1} \\sinh \\left(e^{x+1}\\right)-\\frac{3}{\\sqrt{1-(-3 x-5)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cosh(math.e**(x+1))-acos(-3*x-5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt[3]{\\frac{z}{y^3}}$, and $h(x,y,z) = \\cosh ^{-1}(x+z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 y^3 \\sqrt[3]{\\frac{z}{y^3}}^2},-\\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cbrt(z/(y**3))\nh = cbrt(z/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\left(8 x^4-4\\right)^4-\\tan \\left(5-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{3}{2} \\sec ^2\\left(5-\\frac{3 x}{2}\\right)-128 x^3 \\left(8 x^4-4\\right)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(8*x**4-4)**4-tan(5-((3*x)/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x^5}{y^3 z}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{5 x^4}{y^3 z \\sqrt{1-\\frac{x^{10}}{y^6 z^2}}},\\frac{3 x^5}{y^4 z \\sqrt{1-\\frac{x^{10}}{y^6 z^2}}},\\frac{x^5}{y^3 z^2 \\sqrt{1-\\frac{x^{10}}{y^6 z^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos((x**5)/(y**3*z))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y^4}$, $g(x,y,z) = \\sqrt[3]{y^4}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y^4}{2 \\sqrt{x y^4}} & \\frac{2 x y^3}{\\sqrt{x y^4}} & 0 \\\\\n 0 & \\frac{4 y^3}{3 \\sqrt[3]{y^4}^2} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y**4)\ng = cbrt(y**4)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{\\frac{y}{x}}$, $g(x,y,z) = e^{x-z}$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x \\left(\\frac{y^2}{x^2}+1\\right)}+e^{x-z},\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)},e^{x-z}-\\frac{e^{\\frac{y}{x}}}{x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y/x)\ng = math.e**(x-z)\nh = math.e**(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\tanh (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sin((y/z))\nh = tanh(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{5}{y}+\\frac{1}{1-z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y**5)\nh = atanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{x y-z}$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{x y-z}}+\\cos (x)+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sin(y)\nh = sqrt(x*y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{x}-\\frac{1}{2 \\sqrt{z-y}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(z-y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = y z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}} & 0 & \\frac{x}{z^2 \\sqrt{1-\\frac{x^2}{z^2}}} \\\\\n 0 & z & y \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x/z)\ng = y*z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\frac{1}{(y+z)^{3/2}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)}-\\frac{3}{2 (y+z)^{5/2}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z/x)\ng = (1/((y+z)**(3/2)))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y-x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}}-1,0,\\frac{1}{\\sqrt{1-(y-x)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y-x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{(y-x)^{3/2}}$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left\\{0,-\\cos (x),\\frac{3}{2 (y-x)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/((y-x)**(3/2)))\nh = (1/((y-x)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x^3}{y}-z\\right)$", - "Output Answer": [ - "$-\\frac{x^6 \\left(\\frac{x^3}{y}-z\\right)}{y^4 \\left(\\left(\\frac{x^3}{y}-z\\right)^2+1\\right)^{3/2}}-\\frac{9 x^4 \\left(\\frac{x^3}{y}-z\\right)}{y^2 \\left(\\left(\\frac{x^3}{y}-z\\right)^2+1\\right)^{3/2}}+\\frac{2 x^3}{y^3 \\sqrt{\\left(\\frac{x^3}{y}-z\\right)^2+1}}+\\frac{6 x}{y \\sqrt{\\left(\\frac{x^3}{y}-z\\right)^2+1}}-\\frac{\\frac{x^3}{y}-z}{\\left(\\left(\\frac{x^3}{y}-z\\right)^2+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(((x**3)/y)-z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = y^5 z^5$, and $h(x,y,z) = \\sqrt{z-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 5 y^4 z^5 & 5 y^5 z^4 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z-y}} & \\frac{1}{2 \\sqrt{z-y}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = y**5*z**5\nh = sqrt(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x^5}{y}-z\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{3 x^{10}}{4 y^4 \\sqrt{\\frac{x^5}{y}-z}}+\\frac{75 x^8}{4 y^2 \\sqrt{\\frac{x^5}{y}-z}}+\\frac{3 x^5 \\sqrt{\\frac{x^5}{y}-z}}{y^3}+\\frac{30 x^3 \\sqrt{\\frac{x^5}{y}-z}}{y}+\\frac{3}{4 \\sqrt{\\frac{x^5}{y}-z}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x**5)/y)-z)**(3/2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$e^{x^4}$\n", - "Output Answer": [ - "$32864 e^{256}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(x**4))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x^4\\right)^{3/2}}$, $g(x,y,z) = \\left(x^4+z\\right)^2$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-2 \\left(x^4+z\\right),0,8 x^3 \\left(x^4+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**4)**(3/2)))\ng = (x**4+z)**2\nh = (x**4+z)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,\\cos (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sin(x+y)\nh = sin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & -\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = sin((x/y))\nh = tan((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{y}}$, $g(x,y,z) = \\frac{y^3}{z^3}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{3 y^2}{z^3}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/y))\ng = ((y**3)/(z**3))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x+z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(y**3)\nh = tan(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x/y}$", - "Output Answer": [ - "$1-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y\nh = math.e**(x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+y)\ng = asin(y)\nh = cbrt(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = y^4$", - "Output Answer": [ - "$\\left\\{4 y^3,\\frac{1}{3 x \\sqrt[3]{\\frac{z}{x}}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z/x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(\\frac{3}{2}-\\frac{17 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{17}{2} \\sec ^2\\left(\\frac{1}{2} (3-17 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan((3/2)-((17*x)/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(-\\frac{7 x}{2}\\right)$ on the interval $x = 0$ to $x = 10$\n", - "Output Answer": [ - "$\\int_0^{10} \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((7*x)/2))\na = 0\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x/y)\ng = cos(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(8-4 x)$\n", - "Output Answer": [ - "$\\frac{64 (x-2)}{\\left(-16 x^2+64 x-63\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(8-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\{0,0,\\cos (x)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = (x+y)^4$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left\\{1,0,4 (x+y)^3-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (x+y)**4\nh = (x+y)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4-x}+\\cosh (8 x+7)$\n", - "Output Answer": [ - "$64 \\cosh (8 x+7)-\\frac{1}{4 (4-x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4-x)+cosh(8*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(6-4 x^2\\right)$\n", - "Output Answer": [ - "$8 \\left(8 x^2 \\sin \\left(6-4 x^2\\right)+\\cos \\left(6-4 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(6-4*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (x+6) \\left(-\\cosh \\left(1-2 x^2\\right)\\right)$\n", - "Output Answer": [ - "$4 x \\sin (x+6) \\sinh \\left(1-2 x^2\\right)-\\cos (x+6) \\cosh \\left(1-2 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(x+6)*(-cosh(1-2*x**2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\sqrt{x^2}$", - "Output Answer": [ - "$(x-4) \\left(\\frac{1}{16}-\\frac{\\log (2)}{8}\\right)+\\frac{\\log (2)}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = sqrt(x**2)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{7-3 x}{2 \\sqrt{2}}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((7-3*x)/(2*sqrt(2)))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{z}}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{3 x^2 \\sqrt[3]{\\frac{z}{x}}^2}-\\frac{1}{2 z^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(z)))\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = (x+y)^3$, and $h(x,y,z) = e^{\\frac{x+y}{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 3 (x+y)^2 & 3 (x+y)^2 & 0 \\\\\n \\frac{e^{\\frac{x+y}{z}}}{z} & \\frac{e^{\\frac{x+y}{z}}}{z} & -\\frac{(x+y) e^{\\frac{x+y}{z}}}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = (x+y)**3\nh = math.e**((x+y)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-4 x^2-2\\right)^2+\\sin (3-4 x)$\n", - "Output Answer": [ - "$16 \\left(12 x^2-\\sin (3-4 x)+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-4*x**2-2)**2+sin(3-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin \\left(\\frac{z^5}{y}\\right)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{-\\frac{5 z^4 \\cos \\left(\\frac{z^5}{y}\\right)}{y}-\\sin (y),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sin(((z**5)/y))\nh = sin(((z**5)/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^2 y}$, $g(x,y,z) = y z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{x y}{\\sqrt{x^2 y}} & \\frac{x^2}{2 \\sqrt{x^2 y}} & 0 \\\\\n 0 & z & y \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**2*y)\ng = y*z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (8 x+7)-\\cos (6 x)$\n", - "Output Answer": [ - "$36 \\cos (6 x)-64 \\cos (8 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8*x+7)-cos(6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\frac{1}{4 x^2}$\n", - "Output Answer": [ - "$-\\frac{1}{54}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S((1/(4*x**2)))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3+z$, $g(x,y,z) = \\tan \\left(\\frac{x^3 z}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 1 \\\\\n \\frac{3 x^2 z \\sec ^2\\left(\\frac{x^3 z}{y}\\right)}{y} & -\\frac{x^3 z \\sec ^2\\left(\\frac{x^3 z}{y}\\right)}{y^2} & \\frac{x^3 \\sec ^2\\left(\\frac{x^3 z}{y}\\right)}{y} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3+z\ng = tan(((x**3*z)/y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(y^4\\right)$\n", - "Output Answer": [ - "$\\left\\{0,4 y^3 \\cos \\left(y^4\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**4)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x^5+y}$", - "Output Answer": [ - "$5 x^4 \\sec ^2\\left(x^5\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = y\nh = sqrt(x**5+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (4-3 x)-e^{\\frac{15 x^3}{2}+\\frac{1}{2}}$\n", - "Output Answer": [ - "$-\\frac{9}{4} \\left(5 e^{\\frac{15 x^3}{2}+\\frac{1}{2}} x \\left(45 x^3+4\\right)+4 \\cos (4-3 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(4-3*x)-math.e**(((15*x**3)/2)+(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x+y-z^2\\right)^3$\n", - "Output Answer": [ - "$\\left\\{3 \\left(x+y-z^2\\right)^2,3 \\left(x+y-z^2\\right)^2,-6 z \\left(x+y-z^2\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y-z**2)**3\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(6-9 x^2\\right)+\\sin (6 x+3)$\n", - "Output Answer": [ - "$6 \\left(\\cos (6 x+3)-3 x \\cos \\left(6-9 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6-9*x**2)+sin(6*x+3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^2\\right)$, $g(x,y,z) = \\log \\left(z^5-x^2\\right)$, and $h(x,y,z) = \\log \\left(x^2-z^5\\right)$", - "Output Answer": [ - "$-\\frac{5 z^4}{x^2-z^5}-\\frac{2 x}{\\sqrt{1-x^4}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**2)\ng = log(z**5-x**2)\nh = log(x**2-z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\tan (2 x+4)}$\n", - "Output Answer": [ - "$-\\frac{(2 \\cos (4 (x+2))-1) \\sec ^4(2 (x+2))}{\\tan ^{\\frac{3}{2}}(2 (x+2))}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(tan(2*x+4))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (z-y)^2$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -2 (z-y) & 2 (z-y) \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z-y)**2\ng = (1/(sqrt(y)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x^2-4}$\n", - "Output Answer": [ - "$-\\frac{2}{\\left(x^2-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x**2-4)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z (x-y)}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{x-y}{3 \\sqrt[3]{z (x-y)}^2}-z e^{x z},\\frac{z}{3 \\sqrt[3]{z (x-y)}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z*(x-y))\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\cos \\left(2 x^2\\right)\\right)-\\cos (4-4 x)$\n", - "Output Answer": [ - "$-4 \\left(x \\tan \\left(2 x^2\\right)+\\sin (4-4 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(cos(2*x**2))-cos(4-4*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = -\\tan \\left(y-z^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2\\left(y-z^2\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-z}$, $g(x,y,z) = y$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-z}}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-z)\ng = y\nh = x-y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n -\\cos (x-z) & 0 & \\cos (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = atan(y)\nh = -sin(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$-\\frac{1}{6 x^2}+\\frac{1}{x^4}+\\frac{1}{120}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**5\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(3 x-1)^4+\\cos (2-4 x)$\n", - "Output Answer": [ - "$108 (1-3 x)^2-16 \\cos (2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (3*x-1)**4+cos(2-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = e^z$, and $h(x,y,z) = (y+z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & 0 & e^z \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = math.e**z\nh = (y+z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = x z$, and $h(x,y,z) = e^{y-x}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = x*z\nh = math.e**(y-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(2 x^2+5\\right)+e^{-2 x-9}$\n", - "Output Answer": [ - "$4 x \\cos \\left(2 x^2+5\\right)-2 e^{-2 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(2*x**2+5)+math.e**(-2*x-9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x+5}-e^{4 x-8}$\n", - "Output Answer": [ - "$4 e^{4 x-8} \\left(9 e^{2 x+13}-4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x+5)-math.e**(4*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(z),y,-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y*z)\nh = log(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x+1) \\left(-1-\\tan ^2(1)+\\frac{\\tan (1)}{3}\\right)+\\tan (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-\\frac{9 x}{2}-\\frac{9}{2}\\right)^2}$\n", - "Output Answer": [ - "$\\frac{8}{27 (x+1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-((9*x)/2)-(9/2))**2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{x^2 z^2}$", - "Output Answer": [ - "$1-\\frac{2}{x^2 z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = y\nh = (1/(x**2*z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-2 x-5)-\\tan \\left(6-x^2\\right)$\n", - "Output Answer": [ - "$\\frac{2 x+5}{2 \\left(-x^2-5 x-6\\right)^{3/2}}+\\left(2-8 x^2 \\tan \\left(6-x^2\\right)\\right) \\sec ^2\\left(6-x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-2*x-5)-tan(6-x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x^3 z^3$", - "Output Answer": [ - "$\\left\\{0,-3 x^2 z^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x^2\\right)$, $g(x,y,z) = y^5$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x \\sec ^2\\left(x^2\\right) & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x**2)\ng = y**5\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(z)\ng = y\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+5 y^4+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y**5\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = y\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x z^3\\right)$, $g(x,y,z) = \\tanh ^{-1}(x)$, and $h(x,y,z) = \\cosh ^{-1}\\left(z^3-x\\right)$", - "Output Answer": [ - "$\\frac{3 z^2}{\\sqrt{-x+z^3-1} \\sqrt{-x+z^3+1}}-z^3 \\sin \\left(x z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z**3)\ng = atanh(x)\nh = acosh(z**3-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$4 x^3-\\frac{y e^{y/z}}{z^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = math.e**(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\frac{1}{z (x+y)}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n -\\frac{1}{z (x+y)^2} & -\\frac{1}{z (x+y)^2} & -\\frac{1}{z^2 (x+y)} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = (z/x)\nh = (1/(z*(x+y)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\sec ^2(x)-\\frac{z}{y^2 \\sqrt{\\frac{z}{y}-1} \\sqrt{\\frac{z}{y}+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = acosh(z/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{4 x^3 \\left(\\frac{\\sin \\left(x^4+7\\right)}{\\sqrt{-x^8-6 x^4-8}}+\\cos ^{-1}\\left(x^4+3\\right) \\cos \\left(x^4+7\\right)\\right)}{\\cos ^{-1}\\left(x^4+3\\right)^2}$\n", - "Output Answer": [ - "$\\frac{\\sin \\left(x^4+7\\right)}{\\cos ^{-1}\\left(x^4+3\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((4*x**3*(((sin(x**4+7))/(sqrt(-x**8-6*x**4-8)))+acos(x**4+3)*cos(x**4+7)))/(acos(x**4+3)**2))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(8 x)-\\sin (2-9 x)$\n", - "Output Answer": [ - "$\\frac{512 x}{\\left(1-64 x^2\\right)^{3/2}}+81 \\sin (2-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(8*x)-sin(2-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$5 x^4+\\frac{z}{3 \\sqrt[3]{y z}^2}+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = cbrt(y*z)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y z^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}\\left(y z^2\\right)$", - "Output Answer": [ - "$\\frac{2 y z}{\\sqrt{1-y^2 z^4}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y*z**2)\ng = y\nh = asin(y*z**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^3}$ and $g(x) = $x^2$", - "Output Answer": [ - "$\\frac{3 (x-2)^2}{32 \\sqrt{2}}-\\frac{x-2}{4 \\sqrt{2}}+\\frac{1}{\\sqrt{2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**3)\ng = x**2\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin (x-y-z)$", - "Output Answer": [ - "$-3 \\sin (x-y-z)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y-z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7 x^3+5\\right)+\\sqrt{-4 x-2}$\n", - "Output Answer": [ - "$\\frac{21 x^2}{7 x^3+5}-\\frac{2}{\\sqrt{-4 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x**3+5)+sqrt(-4*x-2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = x^5 y^5$", - "Output Answer": [ - "$\\left\\{5 x^5 y^4,-5 x^4 y^5,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos ^{-1}(x+y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+y)^2}}+e^x+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = acos(x+y)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{y^3}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{x}{z}\\right)}{z}-\\frac{3 y^2}{2 \\left(y^3\\right)^{3/2}}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/z))\ng = (1/(sqrt(y**3)))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(2-\\frac{9 x}{2}\\right)^4}+\\frac{1}{\\left(2 x-\\frac{13}{2}\\right)^3}$\n", - "Output Answer": [ - "$192 \\left(\\frac{135}{(4-9 x)^6}+\\frac{8}{(4 x-13)^5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((2-((9*x)/2))**4))+(1/((2*x-(13/2))**3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log (x+8) \\tan (x+6)$\n", - "Output Answer": [ - "$\\frac{\\tan (x+6)-2 (x+8) \\sec ^2(x+6) ((x+8) \\log (x+8) \\tan (x+6)+1)}{(x+8)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(x+8)*tan(x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{y}{x}}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{x}{y}+z^4$", - "Output Answer": [ - "$-\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}}+\\frac{1}{y}+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((y/x))\ng = log(y)\nh = (x/y)+z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8 x-9}-\\sin \\left(8-6 x^4\\right)$\n", - "Output Answer": [ - "$4 \\left(6 x^3 \\cos \\left(8-6 x^4\\right)+\\frac{1}{\\sqrt{8 x-9}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8*x-9)-sin(8-6*x**4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5-6 x}-\\sin ^{-1}(5 x+7)$\n", - "Output Answer": [ - "$-\\frac{5}{\\sqrt{1-(5 x+7)^2}}-\\frac{3}{\\sqrt{5-6 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5-6*x)-asin(5*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x-4} \\cos (2-9 x)$\n", - "Output Answer": [ - "$\\frac{\\left(-324 x^2+2592 x-5185\\right) \\cos (2-9 x)+36 (x-4) \\sin (2-9 x)}{4 (x-4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x-4)*cos(2-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\frac{1}{\\sqrt{y^4}}$, and $h(x,y,z) = \\sqrt{y^4}$", - "Output Answer": [ - "$\\left\\{\\frac{2 y^3}{\\sqrt{y^4}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = (1/(sqrt(y**4)))\nh = (1/(sqrt(y**4)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3 x+3)-\\log \\left(4-4 x^5\\right)$\n", - "Output Answer": [ - "$-\\frac{5 x^4}{x^5-1}-3 \\sin (3 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3*x+3)-log(4-4*x**5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (3 x)$ on the interval $x = 2$ to $x = 5$\n", - "Output Answer": [ - "$\\int_2^5 \\sqrt{9 \\sec ^4(3 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x)\na = 2\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^2}$, $g(x,y,z) = \\frac{1}{\\sqrt{x-y^2-z}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{y}{\\left(x-y^2-z\\right)^{3/2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**2)\ng = (1/(sqrt(x-y**2-z)))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{17 x}{2}-\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{289}{(13-17 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((17*x)/2)-(13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\sec ^2(x)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = e^{x-y}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+z) & 0 & -\\sin (x+z) \\\\\n e^{x-y} & -e^{x-y} & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+z)\ng = math.e**(x-y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{5 (x-1)}{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-6 x-7}-\\log (9 x-6)$\n", - "Output Answer": [ - "$\\frac{3}{2-3 x}-\\frac{3}{\\sqrt{-6 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-6*x-7)-log(9*x-6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (3-x)-\\log (5 x+6)$\n", - "Output Answer": [ - "$\\frac{25}{(5 x+6)^2}+2 \\tan (3-x) \\sec ^2(3-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(3-x)-log(5*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-4 x-6)$\n", - "Output Answer": [ - "$-\\frac{4}{(2 x+3)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (9-4 x)+\\cos (5)$\n", - "Output Answer": [ - "$4 \\sin (9-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(9-4*x)+cos(5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = cos(y+z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{y^4}{z}\\right)$, $g(x,y,z) = \\frac{1}{x+z}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{y^4}\\right)$", - "Output Answer": [ - "$\\frac{\\cos \\left(\\frac{z}{y^4}\\right)}{y^4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((y**4)/z))\ng = (1/(x+z))\nh = sin((z/(y**4)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5 z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{x^5}{2 \\sqrt{x^5 z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5*z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{16 x^2}{5}+\\frac{37 x}{5}+\\frac{11}{5}}$\n", - "Output Answer": [ - "$\\frac{1}{5} e^{\\frac{1}{5} \\left(16 x^2+37 x+11\\right)} (32 x+37)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((16*x**2)/5)+((37*x)/5)+(11/5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = asin(y)\nh = cos(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{3 \\sqrt[3]{x}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cbrt(x)\nh = cbrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x y$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n y & x & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x*y\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$\\left(1+\\frac{1}{2 e^5}\\right) (x+5)^2+\\left(\\frac{1}{e^5}-10\\right) (x+5)+\\frac{1}{e^5}+25$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = log(y)\nh = asin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = (x+y)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 5 (x+y)^4 & 5 (x+y)^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sqrt(y)\nh = (x+y)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(x)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x/y}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{e^{x/y}}{y}-\\frac{1}{y^2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/y)\ng = (1/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^2$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,-2 y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**2\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & -\\frac{5}{z^6} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = asin(y)\nh = (1/(z**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan \\left(x^4+y\\right)$", - "Output Answer": [ - "$4 x^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = tan(x**4+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3-6 x} \\cos \\left(8-6 x^3\\right)$\n", - "Output Answer": [ - "$-6 e^{3-6 x} \\left(\\cos \\left(8-6 x^3\\right)-3 x^2 \\sin \\left(8-6 x^3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3-6*x)*cos(8-6*x**3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = sqrt(y*z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{4 y^3}{\\sqrt{1-y^8}} & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = acos(y**4)\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 \\sqrt{-x} \\sqrt{6 x-4}$\n", - "Output Answer": [ - "$-\\frac{2 \\sqrt{2} (3 x-1)}{\\sqrt{-x} \\sqrt{3 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2*sqrt(-x)*sqrt(6*x-4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\sec ^2(x+z)-\\frac{2}{y^3}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z)\ng = (1/(y**2))\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{x+z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(x+z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 \\sqrt{y z}},\\frac{y}{\\sqrt{1-y^2 z^2}},-\\frac{z}{\\sqrt{1-y^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y*z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4+z$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sinh ^{-1}\\left(x^4 z\\right)$", - "Output Answer": [ - "$\\left\\{0,1-\\frac{4 x^3 z}{\\sqrt{x^8 z^2+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4+z\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{y-z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sqrt(y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n z e^{x z} & 0 & x e^{x z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(x+y)\nh = math.e**(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(2 x^3+3\\right)+(8 x-2)^4$\n", - "Output Answer": [ - "$\\frac{6 x^2}{\\sqrt{1-\\left(2 x^3+3\\right)^2}}+32 (8 x-2)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(2*x**3+3)+(8*x-2)**4, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{\\frac{z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}} & \\frac{1}{2 y \\sqrt{\\frac{z}{y}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = sqrt((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log \\left(e^{7 x^3+3}\\right)}{(3-3 x)^5}$\n", - "Output Answer": [ - "$\\frac{5 \\log \\left(e^{7 x^3+3}\\right)-21 (x-1) x^2}{243 (x-1)^6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((log(math.e**(7*x**3+3)))/((3-3*x)**5)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+z)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}},\\frac{1}{\\sqrt{1-(x+z)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+z)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^x$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n e^x & 0 & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = math.e**x\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{-x-6} \\sin ^{-1}(3 x+7)$\n", - "Output Answer": [ - "$\\frac{\\sin ^{-1}(3 x+7)}{2 \\sqrt{-x-6}}-\\frac{3 \\sqrt{-x-6}}{\\sqrt{1-(3 x+7)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(-x-6)*asin(3*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = math.e**z\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = log(x+y)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),-\\frac{x}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^3}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 x^2}{2 \\sqrt{x^3}} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**3)\ng = cos(y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(y)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(y)\ng = math.e**z\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{7 x}{2}-2}-\\tan \\left(\\frac{15}{2}-4 x\\right)$\n", - "Output Answer": [ - "$\\frac{7}{2} e^{\\frac{7 x}{2}-2}+4 \\sec ^2\\left(\\frac{15}{2}-4 x\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((7*x)/2)-2)-tan((15/2)-4*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^3+z}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z-x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**3+z)\ng = x\nh = cbrt(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{12}$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**12\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z \\sqrt{\\frac{y}{z}}}-y,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^2\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{y-x^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\left(y-x^2\\right)^2},-\\frac{2 x}{\\left(y-x^2\\right)^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**2)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x y+z)$, $g(x,y,z) = \\tanh ^{-1}(x y)$, and $h(x,y,z) = \\sqrt[3]{x z}$", - "Output Answer": [ - "$\\frac{x}{1-x^2 y^2}+\\frac{y}{x y+z}+\\frac{x}{3 \\sqrt[3]{x z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y+z)\ng = atanh(x*y)\nh = cbrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (y-z)$, $g(x,y,z) = \\tanh (x)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,\\cos (y-z),\\text{sech}^2(x)+\\cos (y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(y-z)\ng = tanh(x)\nh = tanh(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,\\sin (y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^3}{x^3}$, $g(x,y,z) = \\left(\\frac{x}{y}\\right)^{3/2}$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 z^2}{x^3}-\\frac{1}{z},\\frac{3 \\sqrt{\\frac{x}{y}}}{2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**3)/(x**3))\ng = (x/y)**(3/2)\nh = (x/y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{1}{324} (x-3)^4-\\frac{1}{54} (x-3)^3+\\frac{1}{6} (x-3)^2+(x-3) (1+\\log (3))+3 \\log (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = log(x)\nseries = f.subs(x, g).series(x, 3, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2},-\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y/z)\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(y^2\\right)$, $g(x,y,z) = \\log \\left(y^2\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{2}{y}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y**2)\ng = log(y**2)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x y+z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -y \\sin (x y+z) & -x \\sin (x y+z) & -\\sin (x y+z) \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*y+z)\ng = log(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\frac{z}{3 \\sqrt[3]{y z}^2}-y \\sin (y z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y*z)\nh = cos(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y^2+1},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\cos (x z)$", - "Output Answer": [ - "$-x \\sin (x z)+\\frac{1}{x}+\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (y/x)\nh = cos(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(x z)$", - "Output Answer": [ - "$-\\frac{x}{\\sqrt{1-x^2 z^2}}+\\frac{1}{\\sqrt{1-x^2}}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = tan(y)\nh = acos(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = e^{-4 x}+\\log (-4 x)$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-4*x)+log(-4*x)\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\log (y-z)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z},1-\\sec ^2(x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = log(y-z)\nh = log(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z-x^5}$, $g(x,y,z) = \\cos \\left(x^5\\right)$, and $h(x,y,z) = z^2 \\left(x^5-y\\right)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 x^4}{2 \\sqrt{z-x^5}} & 0 & \\frac{1}{2 \\sqrt{z-x^5}} \\\\\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n 10 x^4 z^2 \\left(x^5-y\\right) & -2 z^2 \\left(x^5-y\\right) & 2 z \\left(x^5-y\\right)^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z-x**5)\ng = cos(x**5)\nh = z**2*(x**5-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$11 x \\sin \\left(\\frac{1}{2} \\left(1-11 x^2\\right)\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{1}{2} \\left(1-11 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 11*x*sin((1/2)*(1-11*x**2))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/x)\ng = log(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & \\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\sec ^2\\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = tan((y/z))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\frac{1}{(y z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{3 y}{2 (y z)^{5/2}}+2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**2\nh = (1/((y*z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{9 x^4}{2}-\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{108 x^2 \\left(3 x^4+11\\right)}{\\left(11-9 x^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((9*x**4)/2)-(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^3\\right)$ and $g(x) = $e^x$", - "Output Answer": [ - "$e (x-1)^3+\\frac{3}{2} e (x-1)^2+3 e (x-1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = log(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (\\cos (8-6 x))$\n", - "Output Answer": [ - "$-36 \\left(\\cos (8-6 x) \\cos (\\cos (8-6 x))+\\sin ^2(8-6 x) \\sin (\\cos (8-6 x))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(cos(8-6*x))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5 z^5$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5*z**5\ng = atan(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{33 x^2}{2 \\sqrt{1-\\frac{1}{4} \\left(11 x^3+13\\right)^2}}$\n", - "Output Answer": [ - "$-\\sin ^{-1}\\left(\\frac{11 x^3}{2}+\\frac{13}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((33*x**2)/(2*sqrt(1-(1/4)*(11*x**3+13)**2)))\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\frac{3}{2}-\\frac{17 x^4}{2}\\right)+\\cos \\left(\\frac{x}{2}+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$-34 x^3 \\sec ^2\\left(\\frac{1}{2} \\left(3-17 x^4\\right)\\right)-\\frac{1}{2} \\sin \\left(\\frac{x+17}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan((3/2)-((17*x**4)/2))+cos((x/2)+(17/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x-5)+\\sin ^{-1}(8 x+2)$\n", - "Output Answer": [ - "$\\frac{7}{7 x-5}+\\frac{8}{\\sqrt{1-4 (4 x+1)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x-5)+asin(8*x+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x^5 y\\right)^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh ^{-1}\\left(x^5+y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{15 x^4 y}{2 \\left(x^5 y\\right)^{5/2}} & -\\frac{3 x^5}{2 \\left(x^5 y\\right)^{5/2}} & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{5 x^4}{1-\\left(x^5+y\\right)^2} & \\frac{1}{1-\\left(x^5+y\\right)^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x**5*y)**(3/2)))\ng = y\nh = atanh(x**5+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x/y}$, $g(x,y,z) = \\sinh (y+z)$, and $h(x,y,z) = \\cos ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{e^{x/y}}{y} & -\\frac{x e^{x/y}}{y^2} & 0 \\\\\n 0 & \\cosh (y+z) & \\cosh (y+z) \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y-z)^2}} & \\frac{1}{\\sqrt{1-(y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x/y)\ng = sinh(y+z)\nh = acos(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{23 x}{3}+\\frac{8}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{23}{3} \\cos \\left(\\frac{1}{3} (23 x+8)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(((23*x)/3)+(8/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $e^{x^5}$", - "Output Answer": [ - "$(x-2) \\left(\\frac{e^{32}}{2}+80 e^{32} \\log (2)\\right)+e^{32} \\log (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = math.e**(x**5)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 y & 0 \\\\\n 0 & 1 & 0 \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**2\ng = y\nh = cos(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y-x)\ng = y\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2},0,y \\cos (x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y-z$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\{-z \\sin (y z),-1,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y-z\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}(y z)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{y^2 z^2+1},\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(y*z)\nh = atan(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y^3}-z\\right)^3$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 \\left(\\frac{x}{y^3}-z\\right)^2}{y^3},-\\frac{9 x \\left(\\frac{x}{y^3}-z\\right)^2}{y^4},-3 \\left(\\frac{x}{y^3}-z\\right)^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/(y**3))-z)**3\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5+y$, $g(x,y,z) = \\frac{x^5}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{x^5}{y^2}+5 x^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5+y\ng = ((x**5)/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y-x}$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{1}{3 \\sqrt[3]{y-x}^2}+\\frac{1}{\\sqrt{1-(y+z)^2}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y-x)\ng = asin(y+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\tanh ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n 0 & \\frac{1}{1-(y+z)^2} & \\frac{1}{1-(y+z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = asinh(y)\nh = atanh(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3-\\frac{11 x}{2}}-\\sin \\left(7-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{2} \\cos \\left(7-\\frac{9 x}{2}\\right)-\\frac{11}{2 \\sqrt{12-22 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3-((11*x)/2))-sin(7-((9*x)/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-4 x-8)^2 \\sqrt{2-2 x}$\n", - "Output Answer": [ - "$-\\frac{8 \\sqrt{2} (x+2) (5 x-2)}{\\sqrt{1-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-4*x-8)**2*sqrt(2-2*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y*z))\ng = log(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^2$, $g(x,y,z) = y+z$, and $h(x,y,z) = (y-x)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 2 z \\\\\n 0 & 1 & 1 \\\\\n -5 (y-x)^4 & 5 (y-x)^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**2\ng = y+z\nh = (y-x)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-5 x-4)-\\sin (9 x+1)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{5} (5 x+4)}{\\left(-5 x^2-8 x-3\\right)^{3/2}}+81 \\sin (9 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-5*x-4)-sin(9*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\{-\\sin (y),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (9 x+6)-e^{8 x-2}$\n", - "Output Answer": [ - "$-64 e^{8 x-2}-\\frac{9}{(3 x+2)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = log(9*x+6)-math.e**(8*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = e^{y^2 z}$, and $h(x,y,z) = \\frac{x}{y^2}-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & 2 y z e^{y^2 z} & y^2 e^{y^2 z} \\\\\n \\frac{1}{y^2} & -\\frac{2 x}{y^3} & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = math.e**(y**2*z)\nh = (x/(y**2))-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(-8 x^2-6\\right)^3}+\\sin ^{-1}(3 x+7)$\n", - "Output Answer": [ - "$\\frac{3 x}{\\left(4 x^2+3\\right)^4}+\\frac{3}{\\sqrt{1-(3 x+7)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((-8*x**2-6)**3))+asin(3*x+7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = \\cos ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n -\\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & -\\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = atan(z)\nh = acos(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y^2}{z}\\right)$, $g(x,y,z) = e^{y^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2 e^{y^2} y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((y**2)/z))\ng = math.e**(y**2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = (x/y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin \\left(x-z^5\\right)$, $g(x,y,z) = x-y$, and $h(x,y,z) = e^{z^5}$", - "Output Answer": [ - "$\\left\\{0,5 z^4 \\cos \\left(x-z^5\\right),1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-z**5)\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(\\frac{5 x}{2}\\right)$ on the interval $x = 3$ to $x = 6$\n", - "Output Answer": [ - "$-\\sqrt{10}+\\sqrt{37}+\\tanh ^{-1}\\left(\\sqrt{10}\\right)-\\tanh ^{-1}\\left(\\sqrt{37}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((5*x)/2))\na = 3\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\sinh ^{-1}(y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n 0 & \\frac{z}{\\sqrt{y^2 z^2+1}} & \\frac{y}{\\sqrt{y^2 z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*y)\ng = sin(x+y)\nh = asinh(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y^2$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 y^3$, $g(x,y,z) = \\tanh (z)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$3 x^2 y^3-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y**3\ng = tanh(z)\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(\\frac{z^5}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(x+y+z^2\\right)$", - "Output Answer": [ - "$\\frac{4 z^2 \\left(x+y+z^2\\right)}{\\left(1-\\left(x+y+z^2\\right)^2\\right)^{3/2}}+\\frac{2}{\\sqrt{1-\\left(x+y+z^2\\right)^2}}+\\frac{2 \\left(x+y+z^2\\right)}{\\left(1-\\left(x+y+z^2\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+y+z**2)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = (z-y)^4$", - "Output Answer": [ - "$\\left\\{-4 (z-y)^3,0,-\\sin (x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(x)\nh = cos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (4 x+1)}{(2 x-3)^4}$\n", - "Output Answer": [ - "$\\frac{4 (2 x-3) \\cos (4 x+1)-8 \\sin (4 x+1)}{(2 x-3)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(4*x+1))/((2*x-3)**4)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sin ^{-1}(x z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n \\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & \\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = asin(x*z)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(2 x^2+8\\right)$\n", - "Output Answer": [ - "$-4 \\left(\\sin \\left(2 \\left(x^2+4\\right)\\right)+4 x^2 \\cos \\left(2 \\left(x^2+4\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2*x**2+8)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{x+y+z}}+\\sin (x),-\\frac{1}{2 \\sqrt{x+y+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y+z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\log (x-y-z)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x-y-z},y,\\frac{1}{x-y-z}-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = log(x-y-z)\nh = log(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-6 x-6}-\\sqrt{1-x}$\n", - "Output Answer": [ - "$36 e^{-6 (x+1)}+\\frac{1}{4 (1-x)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-6*x-6)-sqrt(1-x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$\\frac{x^6}{720}+\\frac{2 x^5}{15}+\\frac{x^4}{24}+\\frac{x^3}{3}+\\frac{x^2}{2}+x+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cosh(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$2 x+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sqrt(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = y$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\frac{1}{(x+z)^2+1}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+z)\ng = y\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5-x^4}+\\sqrt{7-6 x}$\n", - "Output Answer": [ - "$4 e^{5-x^4} x^2 \\left(4 x^4-3\\right)-\\frac{9}{(7-6 x)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5-x**4)+sqrt(7-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$1-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = z-x\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$3 x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sin(z)\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = atan(z)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (2 x)$ on the interval $x = 4$ to $x = 14$\n", - "Output Answer": [ - "$\\int_4^{14} \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x)\na = 4\nb = 14\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y-z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{y-z} & -\\frac{1}{y-z} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(y-z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\frac{1}{\\sqrt{x+z}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = (1/(sqrt(x+z)))\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\frac{1}{x^8 y^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & -\\frac{1}{z \\sqrt{1-\\frac{y^2}{z^2}}} & \\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}} \\\\\n -\\frac{8}{x^9 y^2} & -\\frac{2}{x^8 y^3} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = acos(y/z)\nh = (1/(x**8*y**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cbrt(z)\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(4-\\frac{5 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{25}{2} \\tan \\left(4-\\frac{5 x}{2}\\right) \\sec ^2\\left(4-\\frac{5 x}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4-((5*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{y^2}{z^2}$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{2 y^2}{z^3}+\\frac{1}{(y+z)^2+1},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = ((y**2)/(z**2))\nh = ((y**2)/(z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-6 x}+\\tan (6 x)$\n", - "Output Answer": [ - "$6 \\sec ^2(6 x)-\\frac{3}{\\sqrt{8-6 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-6*x)+tan(6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y^3 z^5}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{\\sin \\left(\\frac{x}{y^3 z^5}\\right)}{y^3 z^5},\\frac{3 x \\sin \\left(\\frac{x}{y^3 z^5}\\right)}{y^4 z^5},\\frac{5 x \\sin \\left(\\frac{x}{y^3 z^5}\\right)}{y^3 z^6}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/(y**3*z**5)))\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh \\left(y^3\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 y^2 \\cosh \\left(y^3\\right) & 0 \\\\\n 0 & -\\frac{3 y^2}{\\sqrt{1-y^6}} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(y**3)\ng = acos(y**3)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y**3\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = tan(y)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{2}{3}-\\frac{14 x}{3}\\right)-\\cos \\left(\\frac{22}{3}-\\frac{14 x^3}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{14}{3} \\left(\\sin \\left(\\frac{2}{3} (1-7 x)\\right)-3 x^2 \\sin \\left(\\frac{2}{3} \\left(11-7 x^3\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((2/3)-((14*x)/3))-cos((22/3)-((14*x**3)/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7-4 x}+\\cos (7 x+6)$\n", - "Output Answer": [ - "$-4 e^{7-4 x}-7 \\sin (7 x+6)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7-4*x)+cos(7*x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh (y z)$", - "Output Answer": [ - "$y^2 \\cosh (y z)+z^2 \\cosh (y z)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y*z)\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y}$, $g(x,y,z) = x z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{y^2} & 0 \\\\\n z & 0 & x \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/y)\ng = x*z\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x+y^5}{z}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{z \\left(\\frac{\\left(x+y^5\\right)^2}{z^2}+1\\right)},\\frac{5 y^4}{z \\left(\\frac{\\left(x+y^5\\right)^2}{z^2}+1\\right)},-\\frac{x+y^5}{z^2 \\left(\\frac{\\left(x+y^5\\right)^2}{z^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x+y**5)/z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & e^y & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = math.e**y\nh = sin((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5-3 x^4}+\\cos (9-8 x)$\n", - "Output Answer": [ - "$36 e^{5-3 x^4} x^2 \\left(4 x^4-1\\right)-64 \\cos (9-8 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5-3*x**4)+cos(9-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin ^{-1}(x y)$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{1-x^2 y^2}}+\\frac{x}{2 \\sqrt{x z}}+\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asin(x*y)\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{y z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{z}{2 (y z)^{3/2}} & -\\frac{y}{2 (y z)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*y)\ng = sqrt(y)\nh = (1/(sqrt(y*z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{x^2 z^2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(x**2*z**2))\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\cos \\left(\\frac{x}{y}-z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{y}-z^2\\right)}{y} & \\frac{x \\sin \\left(\\frac{x}{y}-z^2\\right)}{y^2} & 2 z \\sin \\left(\\frac{x}{y}-z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = (x/y)\nh = cos((x/y)-z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x^4+y\\right)^5$\n", - "Output Answer": [ - "$\\left\\{20 x^3 \\left(x^4+y\\right)^4,5 \\left(x^4+y\\right)^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**4+y)**5\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(7 x+2)$\n", - "Output Answer": [ - "$-\\frac{98 (7 x+2)}{\\left((7 x+2)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(7*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{-e^{y+z},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(y+z)\nh = math.e**(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = x\nh = cbrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$1-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(x)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2 \\sqrt{\\frac{x^2}{y^2}+1}},-\\frac{1}{y \\sqrt{\\frac{x^2}{y^2}+1}},\\cos (x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log \\left(y^4\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{4}{y} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(y**4)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{x}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y z^3$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & z^3 & 3 y z^2 \\\\\n 1 & -1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = y*z**3\nh = x-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(y^2 z\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x^5}{y^2}}}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left\\{0,y^2 \\sinh \\left(y^2 z\\right),-\\frac{5 x^4}{2 y^2 \\left(\\frac{x^5}{y^2}\\right)^{3/2}}-2 y z \\sinh \\left(y^2 z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y**2*z)\ng = (1/(sqrt(((x**5)/(y**2)))))\nh = (1/(sqrt(((x**5)/(y**2)))))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(7 x^2+5\\right)-\\sqrt{x-2}$\n", - "Output Answer": [ - "$-\\frac{14 x}{\\sqrt{1-\\left(7 x^2+5\\right)^2}}-\\frac{1}{2 \\sqrt{x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(7*x**2+5)-sqrt(x-2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x^3+7}$\n", - "Output Answer": [ - "$\\frac{12 x \\left(x^3+7\\right)}{\\left(4 x^3+7\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x**3+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^9$, $g(x,y,z) = \\tan \\left(\\frac{x^3}{y}\\right)$, and $h(x,y,z) = \\frac{1}{y z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2 z},0,\\frac{3 x^2 \\sec ^2\\left(\\frac{x^3}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**9\ng = tan(((x**3)/y))\nh = tan(((x**3)/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = log(x*y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x^3-y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{9 x^4 \\sin \\left(\\frac{x^3-y}{z}\\right)}{z^2}-\\frac{\\sin \\left(\\frac{x^3-y}{z}\\right)}{z^2}-\\frac{\\left(x^3-y\\right)^2 \\sin \\left(\\frac{x^3-y}{z}\\right)}{z^4}+\\frac{2 \\left(x^3-y\\right) \\cos \\left(\\frac{x^3-y}{z}\\right)}{z^3}+\\frac{6 x \\cos \\left(\\frac{x^3-y}{z}\\right)}{z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((x**3-y)/z))\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & -1 \\\\\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-z\ng = cbrt(x+y)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y*z)\ng = y**5\nh = sqrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z^3$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{y^4}{z^{12}}$", - "Output Answer": [ - "$-\\frac{12 y^4}{z^{13}}+e^y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z**3\ng = math.e**y\nh = ((y**4)/(z**12))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(x+y^5\\right)$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = \\sqrt[3]{z-y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\left(x+y^5\\right)^2+1} & \\frac{5 y^4}{\\left(x+y^5\\right)^2+1} & 0 \\\\\n 0 & -5 y^4 \\sin \\left(y^5\\right) & 0 \\\\\n 0 & -\\frac{5 y^4}{3 \\sqrt[3]{z-y^5}^2} & \\frac{1}{3 \\sqrt[3]{z-y^5}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+y**5)\ng = cos(y**5)\nh = cbrt(z-y**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{x-z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x-z}},0,\\frac{1}{2 \\sqrt{x-z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(x-z)\nh = sqrt(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = \\log (z-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sin(y-z)\nh = log(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (z-x)$, and $h(x,y,z) = \\cos (x-y)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(z-x)\nh = cos(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^5-4}+\\sin (x+2)$\n", - "Output Answer": [ - "$\\frac{25 x^4}{2 \\sqrt{5 x^5-4}}+\\cos (x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**5-4)+sin(x+2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n -\\frac{1}{3 \\sqrt[3]{y-x}^2} & \\frac{1}{3 \\sqrt[3]{y-x}^2} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x*z)\ng = cbrt(y-x)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x}}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{2 x^2 \\left(\\frac{z}{x}\\right)^{3/2}},-\\frac{1}{(x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(y-z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}-\\frac{1}{(y-z)^2+1}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = sqrt(y)\nh = atan(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}}-1,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{3 y^2}{2 \\sqrt{y^3}}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y**3)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{16807 x^{15}}-\\tan ^{-1}(6 x+6)$\n", - "Output Answer": [ - "$\\frac{15}{16807 x^{16}}-\\frac{6}{(6 x+6)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/(16807*x**15))-atan(6*x+6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z^5}{x}\\right)$, $g(x,y,z) = \\cos \\left(\\frac{x}{z^5}\\right)$, and $h(x,y,z) = \\tan \\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & 0 & \\frac{5}{z} \\\\\n -\\frac{\\sin \\left(\\frac{x}{z^5}\\right)}{z^5} & 0 & \\frac{5 x \\sin \\left(\\frac{x}{z^5}\\right)}{z^6} \\\\\n 0 & 0 & 5 z^4 \\sec ^2\\left(z^5\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(((z**5)/x))\ng = cos((x/(z**5)))\nh = tan(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(7-2 x)^2}-\\log (-3 x-2)$\n", - "Output Answer": [ - "$\\frac{4}{(7-2 x)^3}-\\frac{3}{3 x+2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((7-2*x)**2))-log(-3*x-2), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\cos ^{-1}(x-z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-(x-z)^2}},-\\frac{2}{z^3},-\\frac{1}{\\sqrt{1-(x-z)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**2))\ng = acos(x-z)\nh = acos(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = (z-x)^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n -3 (z-x)^2 & 0 & 3 (z-x)^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = sin(y)\nh = (z-x)**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(6 x^5+5\\right)+\\cosh (x+4)$\n", - "Output Answer": [ - "$30 x^4 \\sec ^2\\left(6 x^5+5\\right)+\\sinh (x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(6*x**5+5)+cosh(x+4), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-7 x^2} \\tan (4 x+5)$\n", - "Output Answer": [ - "$2 e^{1-7 x^2} \\left(2 \\sec ^2(4 x+5)-7 x \\tan (4 x+5)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-7*x**2)*tan(4*x+5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z^4-x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 \\sqrt{z^4-x}} & 0 & \\frac{2 z^3}{\\sqrt{z^4-x}} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\text{sech}^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z**4-x)\ng = sqrt(y)\nh = tanh(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x/z}$, $g(x,y,z) = \\tan (x+y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\sec ^2(x+y+z)+\\frac{e^{x/z}}{z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/z)\ng = tan(x+y+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = x+y$, and $h(x,y,z) = (y+z)^2$", - "Output Answer": [ - "$\\left\\{-2 (-y-z),\\frac{1}{z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = x^3-z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 3 x^2 & 0 & -1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = x**3-z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\sqrt[3]{x z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{3 \\sqrt[3]{x z}^2},-\\sin (x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cos(x)\nh = cos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$7 x+e^{-4 x-9}+1$\n", - "Output Answer": [ - "$16 e^{-4 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 7*x+math.e**(-4*x-9)+1\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x y}^2}+e^x+\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(x*y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(\\frac{23}{3}-\\frac{22 x^5}{3}\\right)-\\frac{x}{3}+\\frac{16}{3}$\n", - "Output Answer": [ - "$\\frac{1}{3} \\left(110 x^4 \\cos \\left(\\frac{1}{3} \\left(23-22 x^5\\right)\\right)-1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin((23/3)-((22*x**5)/3))-(x/3)+(16/3), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 2 z \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**2\ng = y\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{10}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\cos ^{-1}\\left(z \\left(x^2+y\\right)\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{\\sqrt{1-z^2 \\left(x^2+y\\right)^2}}-\\sec ^2(z),\\frac{2 x z}{\\sqrt{1-z^2 \\left(x^2+y\\right)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**10\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y**3\nh = sqrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^5$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,5 (z-x)^4-\\frac{1}{z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**5\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^4+y+z}$, $g(x,y,z) = \\sinh (y+z)$, and $h(x,y,z) = \\sqrt{x^4+y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{4 x^3}{\\left(x^4+y+z\\right)^2} & -\\frac{1}{\\left(x^4+y+z\\right)^2} & -\\frac{1}{\\left(x^4+y+z\\right)^2} \\\\\n 0 & \\cosh (y+z) & \\cosh (y+z) \\\\\n \\frac{2 x^3}{\\sqrt{x^4+y+z}} & \\frac{1}{2 \\sqrt{x^4+y+z}} & \\frac{1}{2 \\sqrt{x^4+y+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**4+y+z))\ng = sinh(y+z)\nh = sqrt(x**4+y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(3 x^5+7\\right)$\n", - "Output Answer": [ - "$-\\frac{30 x^3 \\left(27 x^{10}+21 x^5-100\\right)}{\\left(9 x^{10}+42 x^5+50\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(3*x**5+7)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{9 x+\\frac{20}{3}}$\n", - "Output Answer": [ - "$81 e^{9 x+\\frac{20}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(9*x+(20/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(\\tan \\left(2-4 x^4\\right)\\right)-\\cos ^{-1}(x-6)$\n", - "Output Answer": [ - "$16 x^3 \\sec ^2\\left(2-4 x^4\\right) \\sec ^2\\left(\\tan \\left(2-4 x^4\\right)\\right)+\\frac{1}{\\sqrt{1-(x-6)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(tan(2-4*x**4))-acos(x-6), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(7 x+9)^4+e^5$\n", - "Output Answer": [ - "$588 (7 x+9)^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = (7*x+9)**4+math.e**5\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x^4+9}+\\tan (8-x)$\n", - "Output Answer": [ - "$28 e^{7 x^4+9} x^3-\\sec ^2(8-x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x**4+9)+tan(8-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = atan(y)\nh = cbrt(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = x\nh = cbrt(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-x-7}-e^{1-3 x}$\n", - "Output Answer": [ - "$-9 e^{1-3 x}-\\frac{1}{4 (-x-7)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(-x-7)-math.e**(1-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{-6 x^2-3}-\\sin ^{-1}(4 x+9)$\n", - "Output Answer": [ - "$\\frac{6 x}{\\sqrt{-6 x^2-3}}-\\frac{4}{\\sqrt{1-(4 x+9)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(-6*x**2-3)-asin(4*x+9), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = x+z\nh = sin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-(y+z)^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = (y+z)^5$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{-5 (y+z)^4,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (y+z)**5\nh = (y+z)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt{y^4-z}$", - "Output Answer": [ - "$\\sec ^2(x)-\\frac{1}{2 \\sqrt{y^4-z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(x)\nh = sqrt(y**4-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}\\left(7 x^2+7\\right)+\\tan (7-4 x)$\n", - "Output Answer": [ - "$\\frac{686 x^4-672}{\\left(-49 x^4-98 x^2-48\\right)^{3/2}}+32 \\tan (7-4 x) \\sec ^2(7-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(7*x**2+7)+tan(7-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(x)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-\\frac{11 x^4}{2}}+\\tan \\left(7 x+\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$7 \\sec ^2\\left(7 x+\\frac{3}{2}\\right)-\\frac{11 x^3}{\\sqrt{7-\\frac{11 x^4}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-((11*x**4)/2))+tan(7*x+(3/2)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(z**2))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^5-\\log (-6 x)$\n", - "Output Answer": [ - "$-\\frac{1}{x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**5-log(-6*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = (x-z)^{3/2}$", - "Output Answer": [ - "$e^y-\\frac{3 \\sqrt{x-z}}{2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = math.e**y\nh = (x-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{y^2}{x}\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(y^2\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y^2 \\sec ^2\\left(\\frac{y^2}{x}\\right)}{x^2} & \\frac{2 y \\sec ^2\\left(\\frac{y^2}{x}\\right)}{x} & 0 \\\\\n 0 & \\frac{2 y}{\\sqrt{1-y^4}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(((y**2)/x))\ng = asin(y**2)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (9-6 x)+\\log (\\sin (3-x))$\n", - "Output Answer": [ - "$-\\cot (3-x)-6 \\sec ^2(9-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(9-6*x)+log(sin(3-x)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^2-y$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\cosh (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -1 & 2 z \\\\\n y \\sec ^2(x y) & x \\sec ^2(x y) & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**2-y\ng = tan(x*y)\nh = cosh(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6 x^5-7}$\n", - "Output Answer": [ - "$\\frac{15 x^4}{\\sqrt{6 x^5-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6*x**5-7), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(5-5 x)^5$\n", - "Output Answer": [ - "$500 (5-5 x)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5-5*x)**5\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{3 \\sqrt{y}}{2}+\\frac{1}{z^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**(3/2)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y^4}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{4 y^3}{3 \\sqrt[3]{y^4}^2} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(y**4)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (x)-\\frac{2}{y^3}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(y**2))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$", - "Output Answer": [ - "$(x+2)^3-6 (x+2)^2+12 (x+2)-8$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x\nseries = f.subs(x, g).series(x, -2, 4)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**3\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(y^2 z\\right)$\n", - "Output Answer": [ - "$\\left\\{0,-2 y z \\sin \\left(y^2 z\\right),-y^2 \\sin \\left(y^2 z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y**2*z)\nprint(gradient(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = \\sin ^{-1}(x y+z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+\\frac{1}{\\sqrt{1-(x y+z)^2}}+\\frac{x}{2 \\sqrt{x y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = sqrt(x*y)\nh = asin(x*y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{5 x-\\frac{9}{5}}-\\cos \\left(\\frac{16 x}{5}+\\frac{41}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{256}{25} \\cos \\left(\\frac{1}{5} (16 x+41)\\right)-\\frac{25}{4 \\left(5 x-\\frac{9}{5}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(5*x-(9/5))-cos(((16*x)/5)+(41/5))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4 x+5) \\cos \\left(x^3+8\\right)$\n", - "Output Answer": [ - "$-3 x^2 \\sin \\left(x^3+8\\right) \\cos (4 x+5)-4 \\sin (4 x+5) \\cos \\left(x^3+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x+5)*cos(x**3+8), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = y\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-8 x-6)+\\cos (2)$\n", - "Output Answer": [ - "$-\\frac{64 (-8 x-6)}{\\left(1-4 (4 x+3)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-8*x-6)+cos(2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{z}}{2}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(z)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(3-7 x)-\\tan \\left(7 x^5+2\\right)$\n", - "Output Answer": [ - "$-\\frac{49 (7 x-3)}{\\left(-49 x^2+42 x-8\\right)^{3/2}}-70 x^3 \\left(35 x^5 \\tan \\left(7 x^5+2\\right)+2\\right) \\sec ^2\\left(7 x^5+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(3-7*x)-tan(7*x**5+2)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2-4 x^3\\right)+\\sqrt{5 x-5}$\n", - "Output Answer": [ - "$12 x^2 \\sin \\left(2-4 x^3\\right)+\\frac{5}{2 \\sqrt{5 x-5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2-4*x**3)+sqrt(5*x-5), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{(y-z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{x-z}+\\frac{3}{2 (y-z)^{5/2}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = cos(y)\nh = (1/((y-z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{(x-y)^2}{z^2}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{2 (x-y)}{z^2}+\\frac{1}{\\sqrt{y^2+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x-y)**2)/(z**2))\ng = asinh(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4-2 x)-\\tan (1-x)$\n", - "Output Answer": [ - "$\\frac{1}{x-2}+\\sec ^2(1-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4-2*x)-tan(1-x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}\\left(x^3\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x-2) \\left(\\frac{6\\ 2^{2/3}}{65}-\\frac{\\tan ^{-1}(8)}{6 \\sqrt[3]{2}}\\right)+\\frac{\\tan ^{-1}(8)}{\\sqrt[3]{2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x**3)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x-y^2+z\\right)^5$", - "Output Answer": [ - "$-10 \\left(x-y^2+z\\right)^4+80 y^2 \\left(x-y^2+z\\right)^3+40 \\left(x-y^2+z\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y**2+z)**5\nprint(laplacian(f))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6)\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = x**5\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = y\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-3 x^3-\\frac{8}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{27 x \\left(16-9 x^3\\right)}{\\left(9 x^3+8\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x**3-(8/3))\nprint(diff(f, x, 2))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^4\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x-4) \\left(256+\\frac{1}{6 \\sqrt[3]{2}}+256 \\tan ^2(256)\\right)+2^{2/3}+\\tan (256)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**4)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\cos ^{-1}(x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{1}{\\sqrt{1-(x+y)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = acos(x+y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}+z}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}+z}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}+z}} & \\frac{1}{2 \\sqrt{\\frac{x}{y}+z}} \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y)+z)\ng = x\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^2}{z^4}$, $g(x,y,z) = \\sinh ^{-1}\\left(\\frac{z^2}{y^5}\\right)$, and $h(x,y,z) = \\sin \\left(z^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{y^5 \\sqrt{\\frac{z^4}{y^{10}}+1}},-\\frac{4 x^2}{z^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**2)/(z**4))\ng = asinh((z**2)/(y**5))\nh = asinh((z**2)/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh \\left(x^3\\right)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$3 x^2 \\sinh \\left(x^3\\right)-\\frac{3}{2 y^{5/2}}+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x**3)\ng = (1/(y**(3/2)))\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = y\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\cosh (y)$", - "Output Answer": [ - "$\\left\\{\\sinh (y)-y,\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan ^{-1}(y z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$e^x+\\frac{z}{y^2 z^2+1}+\\cos (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = atan(y*z)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (1)}{\\left(6 x^2-4\\right)^4}$\n", - "Output Answer": [ - "$\\frac{48 x \\tan (1)}{\\left(6 x^2-4\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(1))/((6*x**2-4)**4)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{14}{3}-\\frac{16 x}{3}\\right)^2+\\log \\left(\\frac{5 x}{3}-\\frac{5}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{512 x^2-960 x+457}{9 (x-1)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((14/3)-((16*x)/3))**2+log(((5*x)/3)-(5/3)), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = y\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = log(y)\nh = cos(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$32 x^3 \\cos \\left(3-8 x^4\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(3-8 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 32*x**3*cos(3-8*x**4)\nprint(integrate(f, x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{x+z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n -\\frac{1}{(x+z)^2} & 0 & -\\frac{1}{(x+z)^2} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = (1/(x+z))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(-2 x-8)-\\cos (7 x)$\n", - "Output Answer": [ - "$\\frac{2}{\\sqrt{1-4 (x+4)^2}}+7 \\sin (7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(-2*x-8)-cos(7*x), x))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = -\\tan ^{-1}(x-y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{(x-y)^2+1}+\\cos (x)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = -atan(x-y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "dev" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{y-x}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (y-x)^{3/2}},-\\frac{1}{2 (y-x)^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y-x)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^2$", - "Output Answer": [ - "$\\log (x)-x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**2\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = (x-y)^{3/2}$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n \\frac{3 \\sqrt{x-y}}{2} & -\\frac{3 \\sqrt{x-y}}{2} & 0 \\\\\n -1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**(3/2)\ng = (x-y)**(3/2)\nh = z-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos (y-z)$", - "Output Answer": [ - "$\\{-\\sin (y-z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = y+z\nh = (x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x-y-z^4\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\cosh \\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{4 z^3}{1-\\left(x-y-z^4\\right)^2},\\frac{1}{1-\\left(x-y-z^4\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x-y-z**4)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = \\tan \\left(x^2-z\\right)$, and $h(x,y,z) = \\tan \\left(x^2 z\\right)$", - "Output Answer": [ - "$\\left\\{\\sec ^2\\left(x^2-z\\right),-2 x z \\sec ^2\\left(x^2 z\\right),2 x \\sec ^2\\left(x^2-z\\right)-5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = tan(x**2-z)\nh = tan(x**2-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x+y}{z^3}$, $g(x,y,z) = \\log \\left(y+z^3\\right)$, and $h(x,y,z) = \\sqrt{z^3}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 z^2}{y+z^3},-\\frac{3 (x+y)}{z^4},-\\frac{1}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x+y)/(z**3))\ng = log(y+z**3)\nh = log(y+z**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\tan \\left(\\frac{x+y}{z}\\right)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n \\frac{\\sec ^2\\left(\\frac{x+y}{z}\\right)}{z} & \\frac{\\sec ^2\\left(\\frac{x+y}{z}\\right)}{z} & -\\frac{(x+y) \\sec ^2\\left(\\frac{x+y}{z}\\right)}{z^2} \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = tan(((x+y)/z))\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},-\\frac{1}{\\sqrt{1-z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x^5+z\\right)^2}$", - "Output Answer": [ - "$\\frac{150 x^8}{\\left(x^5+z\\right)^4}-\\frac{40 x^3}{\\left(x^5+z\\right)^3}+\\frac{6}{\\left(x^5+z\\right)^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**5+z)**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin \\left(z^4\\right)$", - "Output Answer": [ - "$-\\sin (x)+\\frac{1}{y^2+1}+4 z^3 \\cos \\left(z^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = atan(y)\nh = sin(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(1-5 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{10 \\left(75 x^4-10 x^2-2\\right)}{\\left(25 x^4-10 x^2+2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(1-5*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{1}{32} \\cos (4 x+5)$\n", - "Output Answer": [ - "$\\frac{1}{8} \\sin (4 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(1/32)*cos(4*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x-8}-\\log (x-1)$\n", - "Output Answer": [ - "$9 e^{3 x-8}+\\frac{1}{(x-1)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x-8)-log(x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = asin(x)\nh = asin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\{0,\\sin (x),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cosh(y)\nh = cosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^3$, $g(x,y,z) = e^{x+y^5}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 3 z^2 \\\\\n e^{x+y^5} & 5 y^4 e^{x+y^5} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**3\ng = math.e**(x+y**5)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh ^{-1}(x y+z)$", - "Output Answer": [ - "$\\frac{2 x^2 (x y+z)}{\\left(1-(x y+z)^2\\right)^2}+\\frac{2 y^2 (x y+z)}{\\left(1-(x y+z)^2\\right)^2}+\\frac{2 (x y+z)}{\\left(1-(x y+z)^2\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x*y+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y^5$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y+z}}$", - "Output Answer": [ - "$5 x^4 y^5+\\frac{1}{\\sqrt{y^2+1}}-\\frac{1}{2 (y+z)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y**5\ng = asinh(y)\nh = (1/(sqrt(y+z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(3 x^5+7\\right)$\n", - "Output Answer": [ - "$-30 x^3 \\left(15 x^5 \\tan \\left(3 x^5+7\\right)+2\\right) \\sec ^2\\left(3 x^5+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x**5+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$-\\frac{1}{6} (x+1)^3 \\sin (1)+(x+1) (1+\\sin (1))-\\frac{1}{2} (x+1)^2 \\cos (1)-1+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, -1, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{y^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x^4+y}{z}}$", - "Output Answer": [ - "$\\frac{16 x^6 e^{\\frac{x^4+y}{z}}}{z^2}+\\frac{e^{\\frac{x^4+y}{z}}}{z^2}+\\frac{2 \\left(x^4+y\\right) e^{\\frac{x^4+y}{z}}}{z^3}+\\frac{\\left(x^4+y\\right)^2 e^{\\frac{x^4+y}{z}}}{z^4}+\\frac{12 x^2 e^{\\frac{x^4+y}{z}}}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x**4+y)/z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^4}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\log \\left(x-y^4\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{4 y^3}{x-y^4},-\\frac{1}{x-y^4},-\\frac{2 y^3}{\\sqrt{y^4}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**4)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$4 x^3+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(4-7 x^5\\right) \\cosh \\left(6-5 x^3\\right)$\n", - "Output Answer": [ - "$-5 \\left(3 x^2 \\tan \\left(4-7 x^5\\right) \\sinh \\left(6-5 x^3\\right)+7 x^4 \\sec ^2\\left(4-7 x^5\\right) \\cosh \\left(6-5 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4-7*x**5)*cosh(6-5*x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = log(y)\nh = atan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = \\frac{1}{y^5}$, and $h(x,y,z) = e^{y^5 z}$", - "Output Answer": [ - "$\\left\\{5 y^4 z e^{y^5 z},\\frac{x}{3 \\sqrt[3]{x z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z)\ng = (1/(y**5))\nh = (1/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-x^2-2\\right)^4}+\\tan ^{-1}(6 x+2)$\n", - "Output Answer": [ - "$\\frac{80 x^2}{\\left(x^2+2\\right)^6}-\\frac{8}{\\left(x^2+2\\right)^5}-\\frac{72 (6 x+2)}{\\left((6 x+2)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-x**2-2)**4))+atan(6*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = x z$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\sec ^2(x+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = x*z\nh = tan(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x y^4+z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{y^4}{2 \\sqrt{x y^4+z}},\\frac{2 x y^3}{\\sqrt{x y^4+z}},\\frac{1}{2 \\sqrt{x y^4+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y**4+z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^4\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$4 x^3 \\cos \\left(x^4\\right)+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4)\ng = y\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(y+z)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{(y+z)^2+1}} & \\frac{1}{\\sqrt{(y+z)^2+1}} \\\\\n 0 & \\cosh (y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(y+z)\ng = sinh(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-\\frac{38 x}{5}-\\frac{36}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{361}{(19 x+18)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((38*x)/5)-(36/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(x^4-7\\right)$\n", - "Output Answer": [ - "$-\\frac{4 x^2 \\left(x^4+21\\right)}{\\left(x^4-7\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x**4-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(x**(3/2)))\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log \\left(y^5\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\cos (x)+\\frac{5}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = log(y**5)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x-1}$\n", - "Output Answer": [ - "$-\\frac{9}{4 (3 x-1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (x/y)\nh = (x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^5\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-3) \\left(\\left(405+405 \\tan ^2(243)\\right) \\sec (3)+\\tan (3) \\tan (243) \\sec (3)\\right)+\\tan (243) \\sec (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**5)\ng = cos(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x z^2\\right)$, $g(x,y,z) = y^5$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$z^2 \\cos \\left(x z^2\\right)+5 y^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z**2)\ng = y**5\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{20}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{x^5 y}}$", - "Output Answer": [ - "$20 x^{19}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**20\ng = y\nh = (1/(sqrt(x**5*y)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$-\\sin (x)+e^y+3 z^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**y\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x^5+y^5\\right)$\n", - "Output Answer": [ - "$\\left\\{5 x^4 \\sec ^2\\left(x^5+y^5\\right),5 y^4 \\sec ^2\\left(x^5+y^5\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5+y**5)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^5+z^3}$, $g(x,y,z) = \\frac{1}{\\sqrt{y^5}}$, and $h(x,y,z) = \\left(z^3\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 z^2}{\\left(y^5+z^3\\right)^2},\\frac{5 y^4}{\\left(y^5+z^3\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**5+z**3))\ng = (1/(sqrt(y**5)))\nh = (1/(sqrt(y**5)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{13 x}{5}+\\frac{42}{5}}$\n", - "Output Answer": [ - "$\\frac{169}{25} e^{\\frac{13 x}{5}+\\frac{42}{5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((13*x)/5)+(42/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x-z^3\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{x-z^3},0,-\\frac{3 z^2}{x-z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z**3)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin ^{-1}(y z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$5 x^4+\\frac{z}{\\sqrt{1-y^2 z^2}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = asin(y*z)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\{\\cos (y),0,-\\cos (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6-9 x^3\\right)+\\tan ^{-1}(6 x+4)$\n", - "Output Answer": [ - "$9 \\left(6 x \\sin \\left(6-9 x^3\\right)-81 x^4 \\cos \\left(6-9 x^3\\right)-\\frac{8 (6 x+4)}{\\left((6 x+4)^2+1\\right)^2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6-9*x**3)+atan(6*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = e^{x^2}$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{e^{16} (x-4) (64 \\log (2)-1)}{16 \\log ^2(2)}+\\frac{e^{16}}{2 \\log (2)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**2)\ng = log(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{\\sin (3 x+5)}{(1-2 x)^3}$\n", - "Output Answer": [ - "$\\frac{3 \\left(-12 x^2+12 x+13\\right) \\sin (3 x+5)+(36-72 x) \\cos (3 x+5)}{(2 x-1)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((sin(3*x+5))/((1-2*x)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{8}{5}-\\frac{x}{5}\\right)-\\log \\left(-6 x-\\frac{9}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{83}{(x-8) (10 x+3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log((8/5)-(x/5))-log(-6*x-(9/5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (2-5 x)$\n", - "Output Answer": [ - "$-50 \\tan (2-5 x) \\sec ^2(2-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y+z$, and $h(x,y,z) = (x+z)^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n 4 (x+z)^3 & 0 & 4 (x+z)^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y+z\nh = (x+z)**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^5\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = x^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 5 x^4 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**5)\ng = atan(y)\nh = x**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(5 x^5+2\\right)$\n", - "Output Answer": [ - "$100 x^3 \\cos \\left(5 x^5+2\\right)-625 x^8 \\sin \\left(5 x^5+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(5*x**5+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(z^5-x\\right)$, $g(x,y,z) = \\left(y+z^5\\right)^5$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^5}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{z^5-x} & 0 & \\frac{5 z^4}{z^5-x} \\\\\n 0 & 5 \\left(y+z^5\\right)^4 & 25 z^4 \\left(y+z^5\\right)^4 \\\\\n 0 & 0 & -\\frac{5 z^4}{2 \\left(z^5\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z**5-x)\ng = (y+z**5)**5\nh = (1/(sqrt(z**5)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (7-6 x)}{\\sqrt{7}}$\n", - "Output Answer": [ - "$\\frac{6 \\sec ^2(7-6 x)}{\\sqrt{7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(7-6*x))/(sqrt(7))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^5$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}-x \\sin (x y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**5\ng = cos(x*y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{x-5}}{27 x^3}$\n", - "Output Answer": [ - "$\\frac{e^{x-5} (x-3)}{27 x^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(x-5))/(27*x**3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (3-x)-\\log (6 x+7)$\n", - "Output Answer": [ - "$\\frac{36}{(6 x+7)^2}-\\cos (3-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3-x)-log(6*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x+y}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2},0,\\frac{1}{(x+y)^2}-\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x+y))\ng = acos(x/y)\nh = acos(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^3$", - "Output Answer": [ - "$40 (x+4)-48$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**3\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(5 x+1)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{5} (5 x+1)}{(-x (5 x+2))^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(5*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z (x+y))$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$z \\cos (z (x+y))$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z*(x+y))\ng = cbrt(x+z)\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = \\sqrt[3]{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = log(y*z)\nh = cbrt(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-6 x^5-7}$\n", - "Output Answer": [ - "$\\frac{15 x^3 \\left(9 x^5+28\\right)}{\\left(-6 x^5-7\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-6*x**5-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, $g(x,y,z) = \\sqrt{x-y}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n \\frac{1}{2 \\sqrt{x-y}} & -\\frac{1}{2 \\sqrt{x-y}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x/y)\ng = sqrt(x-y)\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{2 \\sqrt{x z}} & 0 & \\frac{x}{2 \\sqrt{x z}} \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*z)\ng = (1/(y**(3/2)))\nh = sin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{7 x^2}{5}+\\frac{26}{5}}-\\tan \\left(\\frac{38}{5}-\\frac{22 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{2}{5} \\left(7 e^{\\frac{7 x^2}{5}+\\frac{26}{5}} x+11 \\sec ^2\\left(\\frac{38}{5}-\\frac{22 x}{5}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((7*x**2)/5)+(26/5))-tan((38/5)-((22*x)/5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(4 x^2\\right) \\tan (x+6)$\n", - "Output Answer": [ - "$8 x \\sin \\left(4 x^2\\right) \\tan (x+6)-\\cos \\left(4 x^2\\right) \\sec ^2(x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(4*x**2)*tan(x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\frac{81 x^2}{4}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(((81*x**2)/4))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-2) \\left(\\tan (2)+2 \\log (2) \\left(1+\\tan ^2(2)\\right)\\right)+2 \\log (2) \\tan (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = tan(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sqrt(y*z)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(7 x+\\frac{17}{2}\\right)+\\tan \\left(\\frac{x}{2}+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{7}{\\left(7 x+\\frac{17}{2}\\right)^2+1}+\\frac{1}{2} \\sec ^2\\left(\\frac{x+7}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(7*x+(17/2))+tan((x/2)+(7/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\tanh ^{-1}\\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1-\\frac{1}{x \\left(1-\\frac{z^2}{x^2}\\right)},e^{x+z},-\\frac{z}{x^2 \\left(1-\\frac{z^2}{x^2}\\right)}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = atanh(z/x)\nh = atanh(z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y-z$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,-1,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y-z\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{20}$, $g(x,y,z) = \\frac{x^4 z}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{x^4 z}{y^2}+20 x^{19}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**20\ng = ((x**4*z)/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{5}{2}-\\frac{x}{2}\\right)^5+\\sqrt{\\cos \\left(\\frac{7}{2}-x\\right)}$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(\\frac{\\sin \\left(\\frac{7}{2}-x\\right)}{\\sqrt{\\cos \\left(\\frac{7}{2}-x\\right)}}-\\frac{5}{16} (x-5)^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((5/2)-(x/2))**5+sqrt(cos((7/2)-x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(x+y)$, and $h(x,y,z) = \\tanh ^{-1}(x)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{\\sqrt{1-(x+y)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = asin(x+y)\nh = atanh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\cosh ^{-1}\\left(\\frac{z^3}{x}\\right)$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x y}^2}+\\frac{3 z^2}{x \\sqrt{\\frac{z^3}{x}-1} \\sqrt{\\frac{z^3}{x}+1}}+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = cbrt(x*y)\nh = acosh((z**3)/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{7 x}{2}-5}$\n", - "Output Answer": [ - "$-\\frac{49}{16 \\left(\\frac{7 x}{2}-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((7*x)/2)-5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x^2 z}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x z e^{x^2 z} & 0 & x^2 e^{x^2 z} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x**2*z)\ng = asin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\cos (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = x**4\nh = sin((y/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = \\frac{1}{\\sqrt{z}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y*z)\ng = (1/(sqrt(z)))\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z^4}$", - "Output Answer": [ - "$\\sec ^2(x+y)+\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{4 z^3}{3 \\sqrt[3]{z^4}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = cbrt(y)\nh = cbrt(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(6 x+9)^4 \\sin ^{-1}(5 x+4)$\n", - "Output Answer": [ - "$\\frac{5 (6 x+9)^4}{\\sqrt{1-(5 x+4)^2}}+24 (6 x+9)^3 \\sin ^{-1}(5 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6*x+9)**4*asin(5*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sin (x+y)$", - "Output Answer": [ - "$\\left\\{\\cos (x+y)+\\frac{1}{z},-\\cos (x+y),-\\cos (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-y)\ng = log((y/z))\nh = log((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^{10}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-2) (5120+\\sin (2))+1024-\\cos (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**10\ng = cos(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh \\left(\\frac{x+y^3}{z}\\right)$", - "Output Answer": [ - "$\\frac{2 \\left(x+y^3\\right) \\text{sech}^2\\left(\\frac{x+y^3}{z}\\right)}{z^3}-\\frac{18 y^4 \\tanh \\left(\\frac{x+y^3}{z}\\right) \\text{sech}^2\\left(\\frac{x+y^3}{z}\\right)}{z^2}-\\frac{2 \\tanh \\left(\\frac{x+y^3}{z}\\right) \\text{sech}^2\\left(\\frac{x+y^3}{z}\\right)}{z^2}-\\frac{2 \\left(x+y^3\\right)^2 \\tanh \\left(\\frac{x+y^3}{z}\\right) \\text{sech}^2\\left(\\frac{x+y^3}{z}\\right)}{z^4}+\\frac{6 y \\text{sech}^2\\left(\\frac{x+y^3}{z}\\right)}{z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh((x+y**3)/z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+3 y^2 \\sec ^2\\left(y^3\\right)+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = tan(y**3)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{6 x+6} \\tan ^{-1}(4 x+6)$\n", - "Output Answer": [ - "$-\\frac{4 \\sqrt{6 x+6}}{(4 x+6)^2+1}-\\frac{3 \\tan ^{-1}(4 x+6)}{\\sqrt{6 x+6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(6*x+6)*atan(4*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -5 x^4 \\sin \\left(x^5\\right) & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**5)\ng = math.e**y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{y}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y*z)\ng = log(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\cos \\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = sin((z/y))\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{x y^5+z}$\n", - "Output Answer": [ - "$\\left\\{y^5 e^{x y^5+z},5 x y^4 e^{x y^5+z},e^{x y^5+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y**5+z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{x-y+z}$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$-\\frac{1}{2 \\sqrt{x-y+z}}+\\sec ^2(x)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sqrt(x-y+z)\nh = z-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-5 x-4} \\sqrt{3 x+9}$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{3} e^{-5 x-4} (10 x+29)}{2 \\sqrt{x+3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-5*x-4)*sqrt(3*x+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (x y z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n -y z \\sin (x y z) & -x z \\sin (x y z) & -x y \\sin (x y z) \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = cos(x*y*z)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 e^{3 x+8}$\n", - "Output Answer": [ - "$6 e^{3 x+8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(2*math.e**(3*x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^5}$, $g(x,y,z) = \\left(y^4-x^5\\right)^{3/2}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{15}{2} x^4 \\sqrt{y^4-x^5}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**5)\ng = (y**4-x**5)**(3/2)\nh = (y**4-x**5)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{\\frac{15 x^4}{2}+\\frac{9}{2}}-\\sin \\left(4-x^5\\right)$\n", - "Output Answer": [ - "$5 x^3 \\left(x \\cos \\left(4-x^5\\right)-\\frac{\\sqrt{6}}{\\sqrt{5 x^4+3}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(((15*x**4)/2)+(9/2))-sin(4-x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-8 x-8}$\n", - "Output Answer": [ - "$-\\frac{16}{(-8 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-8*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 2 y & 0 \\\\\n e^{x+y} & e^{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**2\nh = math.e**(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x-y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{(x-y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x-y)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{4-x^5}}{\\sqrt{-2 x-5}}$\n", - "Output Answer": [ - "$\\frac{e^{4-x^5} \\left(10 x^5+25 x^4+1\\right)}{(-2 x-5)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(4-x**5))/(sqrt(-2*x-5))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{15 x}{2}-\\log \\left(\\frac{7 x}{2}+7\\right)-8$\n", - "Output Answer": [ - "$\\frac{1}{(x+2)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((15*x)/2)-log(((7*x)/2)+7)-8\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x-8}+\\sin ^{-1}\\left(\\frac{3 x}{2}+5\\right)$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{1-\\left(\\frac{3 x}{2}+5\\right)^2}}-2 e^{-2 (x+4)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x-8)+asin(((3*x)/2)+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{3}{100} (x+3)^2+\\frac{11 (x+3)}{10}-3-\\tan ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = atan(x)\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = -\\tan ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+z} & 0 & e^{x+z} \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & -\\frac{1}{(y-z)^2+1} & \\frac{1}{(y-z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+z)\ng = acos(y)\nh = -atan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x-y)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = y\nh = tan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-6 x-6} (6 x+5)^4$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{\\frac{3}{2}} (6 x+5)^3 (54 x+53)}{\\sqrt{-x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-6*x-6)*(6*x+5)**4, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x+8}$\n", - "Output Answer": [ - "$-\\frac{1}{2 (x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (5-6 x)-\\cos ^{-1}(-x-4)$\n", - "Output Answer": [ - "$6 \\sin (5-6 x)-\\frac{1}{\\sqrt{-x^2-8 x-15}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5-6*x)-acos(-x-4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z-x)$, $g(x,y,z) = y$, and $h(x,y,z) = y^4$", - "Output Answer": [ - "$\\left\\{4 y^3,\\frac{1}{z-x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z-x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (8 x+4)-\\tan \\left(6-x^5\\right)$\n", - "Output Answer": [ - "$5 x^4 \\sec ^2\\left(6-x^5\\right)-8 \\sin (8 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(8*x+4)-tan(6-x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = \\cosh ^{-1}(x)$", - "Output Answer": [ - "$\\frac{1}{1-x^2}-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = cos(y+z)\nh = acosh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = e^{x y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n y e^{x y} & x e^{x y} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = math.e**(x*y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^5$, $g(x,y,z) = \\frac{x^2}{y^2}$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$-\\frac{2 x^2}{y^3}-5 (z-x)^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**5\ng = ((x**2)/(y**2))\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$x^3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(x**3)\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^5 z^5$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$5 y^4 z^5+\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**5*z**5\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\sec ^2(x)+\\cos (y)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(6 x+3)^5}-\\tan ^{-1}(7 x+7)$\n", - "Output Answer": [ - "$\\frac{686 (x+1)}{\\left((7 x+7)^2+1\\right)^2}+\\frac{1080}{(6 x+3)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((6*x+3)**5))-atan(7*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\cos (y)-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sin(y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (1/(y**2))\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = x^5 y^5$, and $h(x,y,z) = \\cosh ^{-1}(x+z)$", - "Output Answer": [ - "$5 x^5 y^4+\\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = x**5*y**5\nh = acosh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(5 x+5)^5 \\sin \\left(8-6 x^5\\right)$\n", - "Output Answer": [ - "$3125 (x+1)^4 \\left(30 x^4 (x+1) \\cos \\left(8-6 x^5\\right)-5 \\sin \\left(8-6 x^5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(5*x+5)**5*sin(8-6*x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x y)$, $g(x,y,z) = y^3$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left\\{0,-z,-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y\nh = atan(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\tan \\left(\\frac{18 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1944}{125} \\left(1+4 \\tan ^2\\left(\\frac{54}{5}\\right)+3 \\tan ^4\\left(\\frac{54}{5}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(tan(((18*x)/5)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}}-\\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2},0,-\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos((x/z))\nh = cos((x/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}(3-2 x)-\\tan (7 x+4)$\n", - "Output Answer": [ - "$\\frac{6-4 x}{\\left(2 x^2-6 x+5\\right)^2}-98 \\tan (7 x+4) \\sec ^2(7 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(3-2*x)-tan(7*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{y-x}^2} & \\frac{1}{3 \\sqrt[3]{y-x}^2} & 0 \\\\\n -\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}} & 0 & \\frac{1}{2 x \\sqrt{\\frac{z}{x}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = cbrt(y-x)\nh = sqrt((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = y^3$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = y**3\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{x^3-1}+i \\pi$\n", - "Output Answer": [ - "$-3 e^{x^3-1} x \\left(3 x^3+2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(x**3-1)+1j*pi\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{5 x}{2}+4\\right)$\n", - "Output Answer": [ - "$-\\frac{25}{(5 x+8)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((5*x)/2)+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 \\cos \\left(x^5\\right) & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x**5)\ng = acosh(y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{z-x}^2}+\\sec ^2(z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-4}-\\tan (8-2 x)$\n", - "Output Answer": [ - "$5 e^{5 x-4}+2 \\sec ^2(8-2 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-4)-tan(8-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(-\\frac{5 x}{3}\\right)$ on the interval $x = 1$ to $x = 2$\n", - "Output Answer": [ - "$-\\sqrt{2}+\\sqrt{5}+\\tanh ^{-1}\\left(\\sqrt{2}\\right)-\\tanh ^{-1}\\left(\\sqrt{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((5*x)/3))\na = 1\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(5 x+5)$\n", - "Output Answer": [ - "$-\\frac{125 (x+1)}{\\left(1-25 (x+1)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(5*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = cos(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = (x+y)^3$", - "Output Answer": [ - "$\\left\\{3 (x+y)^2,-3 (x+y)^2,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (8-3 x)+\\cos (1-5 x)$\n", - "Output Answer": [ - "$5 \\sin (1-5 x)-3 \\cos (8-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(8-3*x)+cos(1-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tanh (z)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = tanh(z)\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $x^6$", - "Output Answer": [ - "$\\frac{19 (x+1)}{3}-2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = x**6\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\tan ^{-1}(x-y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left\\{0,-z,\\frac{1}{(x-y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = atan(x-y)\nh = atan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(1-x)^4}$\n", - "Output Answer": [ - "$\\frac{20}{(x-1)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((1-x)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\sin \\left(x z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 1 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n z^3 \\cos \\left(x z^3\\right) & 0 & 3 x z^2 \\cos \\left(x z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-x\ng = cos(x)\nh = sin(x*z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & 0 & 2 z \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = z**2\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*z)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{x^2}}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos ^{-1}\\left(x^2 z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2 z}{3 x^3 \\sqrt[3]{\\frac{z}{x^2}}^2} & 0 & \\frac{1}{3 x^2 \\sqrt[3]{\\frac{z}{x^2}}^2} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{2 x z}{\\sqrt{1-x^4 z^2}} & 0 & -\\frac{x^2}{\\sqrt{1-x^4 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z/(x**2))\ng = cbrt(y)\nh = acos(x**2*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cbrt(y)\nh = cbrt(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y*z)\ng = sqrt(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = log(z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{y}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = (1/x)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x} \\cos (5 x+3)$\n", - "Output Answer": [ - "$\\frac{\\cos (5 x+3)-10 x \\sin (5 x+3)}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x)*cos(5*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (4) \\tan \\left(5 x^2+8\\right)$\n", - "Output Answer": [ - "$10 x \\tan (4) \\sec ^2\\left(5 x^2+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4)*tan(5*x**2+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (4 x+5)$\n", - "Output Answer": [ - "$32 \\tan (4 x+5) \\sec ^2(4 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (7-3 x)-\\sin (7 x+1)$\n", - "Output Answer": [ - "$49 \\sin (7 x+1)-9 \\cos (7-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7-3*x)-sin(7*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sin ^{-1}(y-z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(y-z)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = math.e**x\nh = asin(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{9-4 x}-\\cos (2-4 x)$\n", - "Output Answer": [ - "$-\\frac{2}{\\sqrt{9-4 x}}-4 \\sin (2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(9-4*x)-cos(2-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = x^5 z^5$", - "Output Answer": [ - "$\\left\\{0,-5 x^4 z^5,-\\frac{1}{3 \\sqrt[3]{y-x}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = cbrt(y-x)\nh = cbrt(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{11}{2}-3 x^2}-\\sin \\left(\\frac{13}{2}-\\frac{13 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{13}{2} \\cos \\left(\\frac{13 (x-1)}{2}\\right)-6 e^{\\frac{11}{2}-3 x^2} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((11/2)-3*x**2)-sin((13/2)-((13*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\{-\\sin (y+z),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x^3}{y}-z\\right)^5$", - "Output Answer": [ - "$\\frac{20 x^6 \\left(\\frac{x^3}{y}-z\\right)^3}{y^4}+\\frac{180 x^4 \\left(\\frac{x^3}{y}-z\\right)^3}{y^2}+\\frac{10 x^3 \\left(\\frac{x^3}{y}-z\\right)^4}{y^3}+\\frac{30 x \\left(\\frac{x^3}{y}-z\\right)^4}{y}+20 \\left(\\frac{x^3}{y}-z\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x**3)/y)-z)**5\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x+y+z$", - "Output Answer": [ - "$\\{1,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{x z^5}$, and $h(x,y,z) = \\frac{1}{\\sqrt{x z^5}}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{5 x z^4}{2 \\left(x z^5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(x*z**5)\nh = (1/(sqrt(x*z**5)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = log(y)\nh = cbrt(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x$, and $h(x,y,z) = \\cos (x+y)$", - "Output Answer": [ - "$e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = x\nh = cos(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$3 x^2+4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = y**4\nh = cos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin (4 x+6)}{(-8 x-6)^5}$\n", - "Output Answer": [ - "$\\frac{(4 x+3) \\cos (4 x+6)-5 \\sin (4 x+6)}{8 (4 x+3)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(4*x+6))/((-8*x-6)**5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(-\\frac{x}{2}\\right)$ on the interval $x = 5$ to $x = 14$\n", - "Output Answer": [ - "$-\\sqrt{26}+\\sqrt{197}+\\tanh ^{-1}\\left(\\sqrt{26}\\right)-\\tanh ^{-1}\\left(\\sqrt{197}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-(x/2))\na = 5\nb = 14\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\tan ^{-1}(y-z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{1}{(y-z)^2+1} & \\frac{1}{(y-z)^2+1} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = -atan(y-z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = sin(z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(x^4+8\\right)$\n", - "Output Answer": [ - "$4 x^2 \\left(4 x^4 \\sin \\left(x^4+8\\right)-3 \\cos \\left(x^4+8\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(x**4+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(9-2 x^5\\right)^2}$\n", - "Output Answer": [ - "$\\frac{40 x^3 \\left(11 x^5+18\\right)}{\\left(9-2 x^5\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((9-2*x**5)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x-9}$\n", - "Output Answer": [ - "$-2 e^{-2 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x-9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x z}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = (y/z)\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+y)\ng = cbrt(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = e^{x+y-z}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$e^{x+y-z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = math.e**(x+y-z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-2 x-7}+\\cos ^{-1}(2-x)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{-x^2+4 x-3}}-\\frac{1}{\\sqrt{-2 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-2*x-7)+acos(2-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(3 x+\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$-9 \\sin \\left(3 x+\\frac{13}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(3*x+(13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x^4-6}+e^{7-4 x}$\n", - "Output Answer": [ - "$8 e^{-4 x-6} \\left(e^{2 x \\left(x^3+2\\right)} \\left(8 x^4+3\\right) x^2+2 e^{13}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x**4-6)+math.e**(7-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\frac{1}{x}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cos(y)\nh = sqrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = e^{x-y}$", - "Output Answer": [ - "$\\left\\{-e^{x-y},\\sec ^2(y+z)-e^{x-y},\\frac{1}{x}-\\sec ^2(y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = log((x/y))\nh = log((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = z$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = z\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = e^{\\frac{x z}{y}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n \\frac{z e^{\\frac{x z}{y}}}{y} & -\\frac{x z e^{\\frac{x z}{y}}}{y^2} & \\frac{x e^{\\frac{x z}{y}}}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = cbrt(x+z)\nh = math.e**((x*z)/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (5-4 x)$\n", - "Output Answer": [ - "$4 \\sin (5-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x^2+1}}+\\frac{\\sec ^2\\left(\\frac{y}{x}\\right)}{x}+\\sec ^2(y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = tan((y/x))\nh = tan(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y+z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sinh (y-z)$", - "Output Answer": [ - "$\\left\\{\\cosh (y-z)-1,\\sec ^2(x+y+z),-\\sec ^2(x+y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y+z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\cos \\left(\\frac{38}{5}-\\frac{23 x}{5}\\right)\\right)$\n", - "Output Answer": [ - "$-\\frac{529}{25} \\sec ^2\\left(\\frac{1}{5} (38-23 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(cos((38/5)-((23*x)/5)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{z^3}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\sec ^2\\left(\\frac{x}{z^3}\\right)}{z^3} & 0 & -\\frac{3 x \\sec ^2\\left(\\frac{x}{z^3}\\right)}{z^4} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((x/(z**3)))\ng = cbrt(y)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = (y-x)^2$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n -2 (y-x) & 2 (y-x) & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = (y-x)**2\nh = y**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-1,\\frac{1}{2 \\sqrt{x+z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{32 x^3}{\\left(1-8 x^4\\right)^2+1}$\n", - "Output Answer": [ - "$-\\tan ^{-1}\\left(1-8 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((32*x**3)/((1-8*x**4)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\left(\\frac{1}{2}+e^2\\right) (x-2)+e^2+\\log (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = log(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (x+y)$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = tan(x+y)\nh = atan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (x z)$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n 0 & \\sec ^2(y+z) & \\sec ^2(y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = tan(x*z)\nh = tan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, $g(x,y,z) = x^3+z$, and $h(x,y,z) = e^{x^3-z}$", - "Output Answer": [ - "$\\left\\{-1,-3 x^2 e^{x^3-z},3 x^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**3)\ng = x**3+z\nh = x**3+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{y}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = log(y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = (x+z)^4$", - "Output Answer": [ - "$4 (x+z)^3-\\frac{1}{\\sqrt{1-y^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(y)\nh = (x+z)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x+2}-\\sqrt{-x-5}$\n", - "Output Answer": [ - "$3 e^{3 x+2}+\\frac{1}{2 \\sqrt{-x-5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x+2)-sqrt(-x-5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 \\sqrt{2} \\sqrt{x}+\\cos (2-9 x)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{2}}{\\sqrt{x}}+9 \\sin (2-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2*sqrt(2)*sqrt(x)+cos(2-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\pi /2}-\\log (1-6 x)$\n", - "Output Answer": [ - "$\\frac{6}{1-6 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-pi/2)-log(1-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(3 x-1)^2 \\tan (7 x+4)$\n", - "Output Answer": [ - "$-\\left((3 x-1) (21 x+3 \\sin (14 x+8)-7) \\sec ^2(7 x+4)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(3*x-1)**2*tan(7*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x^3}$, $g(x,y,z) = \\sin \\left(x^3\\right)$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 e^{x^3} x^2 & 0 & 0 \\\\\n 3 x^2 \\cos \\left(x^3\\right) & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x**3)\ng = sin(x**3)\nh = y+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-7 x} \\tan ^{-1}\\left(8 x^3+2\\right)$\n", - "Output Answer": [ - "$\\frac{24 \\sqrt{7-7 x} x^2}{\\left(8 x^3+2\\right)^2+1}-\\frac{7 \\tan ^{-1}\\left(8 x^3+2\\right)}{2 \\sqrt{7-7 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-7*x)*atan(8*x**3+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(6-6 x)^5 \\log (9 x+5)$\n", - "Output Answer": [ - "$\\frac{9 (6-6 x)^5}{9 x+5}-30 (6-6 x)^4 \\log (9 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6-6*x)**5*log(9*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^5\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{\\left(z-x^5\\right)^{3/2}}$", - "Output Answer": [ - "$-\\frac{3}{2 \\left(z-x^5\\right)^{5/2}}+\\frac{5}{x}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**5)\ng = log(y)\nh = (1/((z-x**5)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-\\frac{39 x}{5}-\\frac{27}{5}\\right)^4}$\n", - "Output Answer": [ - "$\\frac{2112500}{81 (13 x+9)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-((39*x)/5)-(27/5))**4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x y}{z}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$-\\frac{y \\sin \\left(\\frac{x y}{z}\\right)}{z}+\\frac{1}{3 \\sqrt[3]{y}^2}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((x*y)/z))\ng = cbrt(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^2}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{2 y}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**2)/(x**2))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\left\\{x,-y,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{z \\sin \\left(\\frac{z}{x}\\right)}{x^2}-\\frac{1}{\\sqrt{1-(x+z)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = sqrt(z)\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x+y)$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-(x+y)^2}} & -\\frac{1}{\\sqrt{1-(x+y)^2}} & 0 \\\\\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x+y)\ng = (1/(y*z))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(-x^5-8\\right)^4+\\sqrt{6 x^4+1}$\n", - "Output Answer": [ - "$4 x^3 \\left(5 x \\left(x^5+8\\right)^3+\\frac{3}{\\sqrt{6 x^4+1}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-x**5-8)**4+sqrt(6*x**4+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cos(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sin((x/y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-9 x-2)+\\sqrt{3}$\n", - "Output Answer": [ - "$\\frac{9}{9 x+2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-9*x-2)+sqrt(3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = x^5$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}},2 z,5 x^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = x**5\nh = x**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (7-9 x)+\\cos (9 x+8)$\n", - "Output Answer": [ - "$-162 \\cos \\left(\\frac{15}{2}\\right) \\cos \\left(9 x+\\frac{1}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7-9*x)+cos(9*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z)\ng = atanh(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z}{x^4 y}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 z}{x^5 y},-\\frac{z}{x^4 y^2},\\frac{1}{x^4 y}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/(x**4*y))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\cos (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(y+z)\nh = (y/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\tan (z (x+y))$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left\\{-\\left((x+y) \\sec ^2(z (x+y))\\right),-2 x,\\frac{x}{y^2}+z \\sec ^2(z (x+y))\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = tan(z*(x+y))\nh = tan(z*(x+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^4\\right)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{4 x^3}{\\sqrt{1-x^8}} & 0 & 0 \\\\\n 0 & \\cosh (y) & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x**4)\ng = sinh(y)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (5 x+9)$\n", - "Output Answer": [ - "$-25 \\cos (5 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (x)-e^{6 x+1}$\n", - "Output Answer": [ - "$-36 e^{6 x+1}-\\cos (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(x)-math.e**(6*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y z}$, $g(x,y,z) = \\frac{x-y}{z}$, and $h(x,y,z) = \\sin (x-z)$", - "Output Answer": [ - "$\\left\\{\\frac{x-y}{z^2},\\frac{y}{3 \\sqrt[3]{y z}^2}-\\cos (x-z),\\frac{1}{z}-\\frac{z}{3 \\sqrt[3]{y z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y*z)\ng = ((x-y)/z)\nh = ((x-y)/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sinh ^{-1}\\left(x y^5+z\\right)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\frac{5 x y^4}{\\sqrt{\\left(x y^5+z\\right)^2+1}}+\\sinh (x)+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = asinh(x*y**5+z)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$x^2$\n", - "Output Answer": [ - "$-8$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(x**2)\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = e^{x^3}$ and $g(x) = $x^3$", - "Output Answer": [ - "$6 e (x-1)+e$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**3)\ng = x**3\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (3 x)$ on the interval $x = 1$ to $x = 5$\n", - "Output Answer": [ - "$\\int_1^5 \\sqrt{9 \\sec ^4(3 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x)\na = 1\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (6 x+1)-\\cosh (4 x+7)$\n", - "Output Answer": [ - "$-\\frac{36}{(6 x+1)^2}-16 \\cosh (4 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6*x+1)-cosh(4*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(9-2 x^2\\right)-\\sin (2)$\n", - "Output Answer": [ - "$\\frac{2 \\left(x^4-20\\right)}{\\left(-x^4+9 x^2-20\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(9-2*x**2)-sin(2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/x))\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x^3 y^3$", - "Output Answer": [ - "$5 x^4+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(y)\nh = x**3*y**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-5 x^2-8$\n", - "Output Answer": [ - "$-10$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -5*x**2-8\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x^2+1}} & 0 & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(x)\ng = (y/z)\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{12 x^3}{\\sqrt{6 x^4+5}}+\\frac{2 x}{\\sqrt{1-\\left(x^2-2\\right)^2}}$\n", - "Output Answer": [ - "$\\sqrt{6 x^4+5}-\\sin ^{-1}\\left(2-x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((12*x**3)/(sqrt(6*x**4+5)))+((2*x)/(sqrt(1-(x**2-2)**2)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x+z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{y^5-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & \\frac{5 y^4}{2 \\sqrt{y^5-z}} & -\\frac{1}{2 \\sqrt{y^5-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+z)\ng = y**5\nh = sqrt(y**5-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$x \\cos (x y)-\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2}+\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(x*y)\nh = cbrt(x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7-x^4}$\n", - "Output Answer": [ - "$4 e^{7-x^4} x^2 \\left(4 x^4-3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7-x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{26 x}{5}+7\\right)$\n", - "Output Answer": [ - "$-\\frac{676}{(26 x+35)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((26*x)/5)+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-\\frac{7 x}{2}-7}-\\tan \\left(x+\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{7}{4 \\sqrt{-\\frac{7 x}{2}-7}}-\\sec ^2\\left(x+\\frac{13}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-((7*x)/2)-7)-tan(x+(13/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\sinh (z (x-y))$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 1 & -1 & 0 \\\\\n z \\cosh (z (x-y)) & -z \\cosh (z (x-y)) & (x-y) \\cosh (z (x-y)) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x-y\nh = sinh(z*(x-y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{z^2 (x+y)^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2}{z^2 (x+y)^3},-\\frac{2}{z^2 (x+y)^3},-\\frac{2}{z^3 (x+y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**2*(x+y)**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(z)\ng = log(z)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+y)^2}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+y)\ng = math.e**y\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\cos (y)-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = sin(y)\nh = sqrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(-\\frac{17 x}{2}-\\frac{5}{2}\\right)-\\sqrt{-8 x-3}$\n", - "Output Answer": [ - "$\\frac{17}{\\sqrt{-289 x^2-170 x-21}}+\\frac{4}{\\sqrt{-8 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(-((17*x)/2)-(5/2))-sqrt(-8*x-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{z-x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z-x}},0,-\\frac{1}{2 \\sqrt{z-x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(z-x)\nh = sqrt(z-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z^5}{y}\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = \\log \\left(z^5\\right)$", - "Output Answer": [ - "$\\frac{5}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((z**5)/y))\ng = x\nh = log(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh \\left(x^2-y+z\\right)$", - "Output Answer": [ - "$2 \\text{sech}^2\\left(x^2-y+z\\right)-8 x^2 \\tanh \\left(x^2-y+z\\right) \\text{sech}^2\\left(x^2-y+z\\right)-4 \\tanh \\left(x^2-y+z\\right) \\text{sech}^2\\left(x^2-y+z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x**2-y+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2-5 x^2\\right)+\\sqrt{3-9 x}$\n", - "Output Answer": [ - "$10 x \\sin \\left(2-5 x^2\\right)-\\frac{9}{2 \\sqrt{3-9 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2-5*x**2)+sqrt(3-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\cos ^{-1}\\left(x-y+z^3\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(x-z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n -\\frac{1}{\\sqrt{1-\\left(x-y+z^3\\right)^2}} & \\frac{1}{\\sqrt{1-\\left(x-y+z^3\\right)^2}} & -\\frac{3 z^2}{\\sqrt{1-\\left(x-y+z^3\\right)^2}} \\\\\n -\\frac{1}{\\sqrt{1-\\left(x-z^3\\right)^2}} & 0 & \\frac{3 z^2}{\\sqrt{1-\\left(x-z^3\\right)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((x/y))\ng = acos(x-y+z**3)\nh = acos(x-z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-9 x-1) \\cosh (2-4 x)$\n", - "Output Answer": [ - "$\\frac{9 \\cosh (2-4 x)}{9 x+1}-4 \\log (-9 x-1) \\sinh (2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-9*x-1)*cosh(2-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-3}+\\cos (3 x+2)$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{2 x-3}}-3 \\sin (3 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-3)+cos(3*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\log (3 x)+\\cos \\left(\\frac{x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{81}+\\frac{1}{48} \\sin \\left(\\frac{3}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(3*x)+cos((x/2)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{(z-x)^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x \\sqrt{1-\\frac{z^2}{x^2}}}-\\frac{3}{2 (z-x)^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (2 x)$ on the interval $x = 0$ to $x = 4$\n", - "Output Answer": [ - "$\\int_0^4 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x)\na = 0\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(6 x-8)^3 \\sin (1-9 x)$\n", - "Output Answer": [ - "$9 (8-6 x)^2 (2 \\sin (1-9 x)+(8-6 x) \\cos (1-9 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6*x-8)**3*sin(1-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{11 x}{2}+3\\right)-\\log \\left(\\frac{7}{2}-8 x\\right)$\n", - "Output Answer": [ - "$-\\frac{173}{176 x^2+19 x-42}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((11*x)/2)+3)-log((7/2)-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$1-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(x)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/y)\ng = asin(y+z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^2$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$e^{y+z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**2\ng = math.e**(y+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos ^{-1}\\left(y^2+z\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-\\left(y^2+z\\right)^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = acos(y**2+z)\nh = acos(y**2+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x-6}-\\tan ^{-1}(3-6 x)$\n", - "Output Answer": [ - "$e^{x-6}+\\frac{6}{(3-6 x)^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x-6)-atan(3-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = y$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = y\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x-z}}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\tanh (x-z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 (x-z)^{3/2}}-\\text{sech}^2(x-z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x-z)))\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (8-5 x)+\\cos (4)$\n", - "Output Answer": [ - "$5 \\sin (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(8-5*x)+cos(4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$e^x+3 e^{y^3} y^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = math.e**(y**3)\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n y \\cos (x y) & x \\cos (x y) & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = sin(x*y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (7-8 x)}{\\log (-x-2)}$\n", - "Output Answer": [ - "$\\frac{\\tan (7-8 x)+8 (x+2) \\log (-x-2) \\sec ^2(7-8 x)}{(x+2) \\log ^2(-x-2)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(7-8*x))/(log(-x-2))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y+z}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{3 \\sqrt[3]{y+z}^2},-\\frac{1}{3 \\sqrt[3]{y+z}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y+z)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\frac{x-y}{z}$", - "Output Answer": [ - "$-\\frac{x-y}{z^2}+2 y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2\nh = ((x-y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\cos ^{-1}(4-6 x)}$\n", - "Output Answer": [ - "$4 \\left(\\frac{2 \\sqrt{3} (3 x-2)}{\\left(-12 x^2+16 x-5\\right)^{3/2}}+\\frac{9}{1-4 (2-3 x)^2}\\right) e^{\\cos ^{-1}(4-6 x)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(acos(4-6*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{y}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (x/y)\nh = (x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = y^5$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 1 & 0 & -1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = y**5\nh = x-z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (4 x+2)-\\frac{1}{(6 x-3)^4}$\n", - "Output Answer": [ - "$4 \\left(\\frac{6}{(6 x-3)^5}+\\sec ^2(4 x+2)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4*x+2)-(1/((6*x-3)**4)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh \\left(x^5\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 \\cosh \\left(x^5\\right) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x**5)\ng = y\nh = sin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}\\left(x^3+z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{x^2}{\\sqrt[3]{x^3}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n -\\frac{3 x^2}{\\sqrt{1-\\left(x^3+z\\right)^2}} & 0 & -\\frac{1}{\\sqrt{1-\\left(x^3+z\\right)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**3)\ng = atan(y)\nh = acos(x**3+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{8 x}{16 x^4-48 x^2+35}-\\frac{15 x^4}{2 \\sqrt{-3 x^5-7}}$\n", - "Output Answer": [ - "$\\sqrt{-3 x^5-7}-\\frac{1}{2} \\log \\left(5-4 x^2\\right)+\\frac{1}{2} \\log \\left(7-4 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((8*x)/(16*x**4-48*x**2+35))-((15*x**4)/(2*sqrt(-3*x**5-7)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x^4 y\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{4}{x},\\frac{1}{y},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**4*y)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4}$, $g(x,y,z) = y z$, and $h(x,y,z) = x^4-y$", - "Output Answer": [ - "$4 e^{x^4} x^3+z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4)\ng = y*z\nh = x**4-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{x-y}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{(x-y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/(x-y))\nh = (1/(x-y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-4 x-7) \\tan ^{-1}\\left(x^4+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{4 (-4 x-7) x^3}{\\left(x^4+\\frac{15}{2}\\right)^2+1}-4 \\tan ^{-1}\\left(x^4+\\frac{15}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-4*x-7)*atan(x**4+(15/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2+y}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\log \\left(y+z^3\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y+z^3},0,\\frac{1}{\\left(x^2+y\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2+y))\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{33}{2} x^2 \\cos \\left(\\frac{1}{2} \\left(11 x^3+5\\right)\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(\\frac{1}{2} \\left(11 x^3+5\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(33/2)*x**2*cos((1/2)*(11*x**3+5))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\log (4 x)-\\tan (5 x)$\n", - "Output Answer": [ - "$\\frac{1}{375} \\left(-15624-62500 \\tan ^2(25)-46875 \\tan ^4(25)\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(4*x)-tan(5*x))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(8-8 x)^3}$\n", - "Output Answer": [ - "$\\frac{768}{(8-8 x)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8-8*x)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tanh ^{-1}(x-y)$, $g(x,y,z) = \\frac{1}{\\sqrt{x z}}$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 (x z)^{3/2}}+\\frac{1}{y-z},0,-\\frac{1}{1-(x-y)^2}-\\frac{z}{2 (x z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atanh(x-y)\ng = (1/(sqrt(x*z)))\nh = (1/(sqrt(x*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{z^3}{x}\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{3 z^6}{4 x^4 \\sqrt{\\frac{z^3}{x}}}+\\frac{27 z^4}{4 x^2 \\sqrt{\\frac{z^3}{x}}}+\\frac{3 z^3 \\sqrt{\\frac{z^3}{x}}}{x^3}+\\frac{9 z \\sqrt{\\frac{z^3}{x}}}{x}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**3)/x)**(3/2)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(-5 x-4) \\cos ^{-1}(7 x+4)$\n", - "Output Answer": [ - "$\\frac{5 \\cos ^{-1}(7 x+4)}{\\sqrt{1-(-5 x-4)^2}}-\\frac{7 \\cos ^{-1}(-5 x-4)}{\\sqrt{1-(7 x+4)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(-5*x-4)*acos(7*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$e^{x+y}-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = acos(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{x+14}$\n", - "Output Answer": [ - "$e^{x+14}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(x+14)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (2-6 x)+\\cos (3-x)$\n", - "Output Answer": [ - "$-36 \\sin (2-6 x)-\\cos (3-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2-6*x)+cos(3-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^4 z^8$", - "Output Answer": [ - "$12 x^2 z^8+56 x^4 z^6$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4*z**8\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{1,-1,\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = asin(x)\nh = asin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sinh ^{-1}(y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{(y-z)^2+1}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asinh(y-z)\nh = asinh(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(7-2 x^2\\right)+\\tan ^{-1}(7 x+2)$\n", - "Output Answer": [ - "$\\frac{7}{(7 x+2)^2+1}-4 x \\sec ^2\\left(7-2 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(7-2*x**2)+atan(7*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x^5-5}+\\sin \\left(9 x^2\\right)$\n", - "Output Answer": [ - "$5 e^{x^5-5} x^4+18 x \\cos \\left(9 x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x**5-5)+sin(9*x**2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (6 x+2) \\tan (4-5 x)$\n", - "Output Answer": [ - "$6 \\cos (6 x+2) \\tan (4-5 x)-5 \\sin (6 x+2) \\sec ^2(4-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(6*x+2)*tan(4-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\cosh (x)+2 z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = y\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x^3 y z^4\\right)$\n", - "Output Answer": [ - "$\\left\\{3 x^2 y z^4 \\sec ^2\\left(x^3 y z^4\\right),x^3 z^4 \\sec ^2\\left(x^3 y z^4\\right),4 x^3 y z^3 \\sec ^2\\left(x^3 y z^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**3*y*z**4)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = (y-x)^2$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 (y-x)+\\frac{1}{x}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = (y-x)**2\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\left(\\frac{z}{y}\\right)^{3/2}$, and $h(x,y,z) = x+y+z$", - "Output Answer": [ - "$\\left\\{1-\\frac{3 \\sqrt{\\frac{z}{y}}}{2 y},-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = (z/y)**(3/2)\nh = (z/y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = z-y\nh = z-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$8 x^3 \\sin \\left(1-2 x^4\\right)$\n", - "Output Answer": [ - "$\\cos \\left(1-2 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 8*x**3*sin(1-2*x**4)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$e^y+\\frac{1}{\\sqrt{z^2+1}}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**y\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-x)^5$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}\\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,0,-5 (y-x)^4\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**5\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{y \\sec ^2\\left(\\frac{y}{x}\\right)}{x^2}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = tan((y/x))\nh = tan((y/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $x^2$", - "Output Answer": [ - "$1280 (x-4)+1024$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = x**2\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y z)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left\\{0,x y \\sec ^2(x y z)-1,\\sec ^2(x)-x z \\sec ^2(x y z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y*z)\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\cos (x+7)+6 \\cos (6 x+2)$\n", - "Output Answer": [ - "$\\sin (6 x+2)+\\sin (7) \\cos (x)+\\cos (7) \\sin (x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(x+7)+6*cos(6*x+2)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\left(y^4+z\\right)^2$, and $h(x,y,z) = \\log \\left(x+y^4\\right)$", - "Output Answer": [ - "$8 y^3 \\left(y^4+z\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (y**4+z)**2\nh = log(x+y**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^2}{z^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{2 x}{z^2}+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**2)/(z**2))\ng = sqrt(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sinh \\left(y z^5\\right)$", - "Output Answer": [ - "$-\\frac{2}{x^3}+5 y z^4 \\cosh \\left(y z^5\\right)-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = cos(y)\nh = sinh(y*z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2 y^2}$, $g(x,y,z) = \\sqrt[3]{x-y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$-\\frac{2}{x^3 y^2}-\\frac{1}{3 \\sqrt[3]{x-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2*y**2))\ng = cbrt(x-y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\frac{1}{y^2+1}-\\frac{y}{z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(y)\nh = (y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 0 & e^y & 0 \\\\\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+y)\ng = math.e**y\nh = asin(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(4 x-7)-\\log (-x-8)$\n", - "Output Answer": [ - "$-\\frac{1}{x+8}-\\frac{4}{\\sqrt{1-(7-4 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(4*x-7)-log(-x-8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{17}{2}-8 x\\right)-\\log \\left(\\frac{11 x}{2}-3\\right)$\n", - "Output Answer": [ - "$\\frac{11}{6-11 x}+8 \\sin \\left(\\frac{17}{2}-8 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((17/2)-8*x)-log(((11*x)/2)-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n -\\frac{z}{3 x^2 \\sqrt[3]{\\frac{z}{x}}^2} & 0 & \\frac{1}{3 x \\sqrt[3]{\\frac{z}{x}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sin((y/z))\nh = cbrt(z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(x-y)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{1,-1,\\frac{1}{(x-y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atan(x-y)\nh = atan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$1-\\sqrt{5-x}$\n", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{5-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(1-sqrt(5-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^5}{x}$, $g(x,y,z) = y^{15}$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{y^5}{x^2}+15 y^{14}+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**5)/x)\ng = y**15\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^4$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^{x^4-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 4 y^3 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 4 x^3 e^{x^4-y} & -e^{x^4-y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**4\ng = sqrt(y)\nh = math.e**(x**4-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\{0,-\\cos (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-z)^3$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-z)**3\ng = (y/x)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-\\frac{1}{2 y^{3/2}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = (1/(sqrt(y)))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin \\left(\\frac{x z}{y}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{x \\cos \\left(\\frac{x z}{y}\\right)}{y},0,\\frac{z \\cos \\left(\\frac{x z}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(((x*z)/y))\nh = sin(((x*z)/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x}}}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{2 x \\left(\\frac{z}{x}\\right)^{3/2}}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = asin(y)\nh = (1/(sqrt((z/x))))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3-x}-\\sin (x+2)$\n", - "Output Answer": [ - "$-e^{3-x}-\\cos (x+2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3-x)-sin(x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{7 x}$\n", - "Output Answer": [ - "$\\frac{2}{7 x^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(7 x+4)+\\tan \\left(\\frac{7}{2}-x\\right)$\n", - "Output Answer": [ - "$\\frac{7}{\\sqrt{1-(7 x+4)^2}}-\\sec ^2\\left(\\frac{7}{2}-x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(7*x+4)+tan((7/2)-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (8 x+9)+\\tan (6-4 x)$\n", - "Output Answer": [ - "$8 \\cos (8 x+9)-4 \\sec ^2(6-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(8*x+9)+tan(6-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(y z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{y}{\\sqrt{y^2 z^2+1}},-\\frac{z}{\\sqrt{y^2 z^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(y*z)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (x+z)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(x+z)\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = acos(z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-7 x-8}+\\log (x+5)$\n", - "Output Answer": [ - "$\\frac{1}{x+5}-7 e^{-7 x-8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-7*x-8)+log(x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$-\\sin (3 x)$\n", - "Output Answer": [ - "$\\frac{81 \\sin (9)}{80}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-sin(3*x))\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-(5 x-4)^2}$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{5}}{\\left(-5 x^2+8 x-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-(5*x-4)**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{y}-z$, $g(x,y,z) = e^{\\frac{z}{y}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y} & -\\frac{x}{y^2} & -1 \\\\\n 0 & -\\frac{z e^{\\frac{z}{y}}}{y^2} & \\frac{e^{\\frac{z}{y}}}{y} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/y)-z\ng = math.e**(z/y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-2 x^2-3} \\tan (4 x+6)$\n", - "Output Answer": [ - "$-\\frac{\\left(8 x^2+x \\sin (8 x+12)+12\\right) \\sec ^2(4 x+6)}{\\sqrt{-2 x^2-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-2*x**2-3)*tan(4*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{2401}{\\log \\left(6-5 x^2\\right)}$\n", - "Output Answer": [ - "$\\frac{24010 x}{\\left(6-5 x^2\\right) \\log ^2\\left(6-5 x^2\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2401/(log(6-5*x**2))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\sin (x-z)+e^x-\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan((z/y))\nh = cos(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^2$, $g(x,y,z) = (y+z)^2$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2}-2 (y+z),2 z,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**2\ng = (y+z)**2\nh = (y+z)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = e^{\\frac{y}{x^3}}$, and $h(x,y,z) = \\cos \\left(\\frac{x^3}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{3 y e^{\\frac{y}{x^3}}}{x^4} & \\frac{e^{\\frac{y}{x^3}}}{x^3} & 0 \\\\\n -\\frac{3 x^2 \\sin \\left(\\frac{x^3}{z}\\right)}{z} & 0 & \\frac{x^3 \\sin \\left(\\frac{x^3}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = math.e**(y/(x**3))\nh = cos(((x**3)/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},0,3 x^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x**3\nh = x**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{(x+y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+y)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-2) \\left(-1+e^2-\\tan ^2(2)\\right)+e^2-\\tan (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = tan(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{2}{z^3} \\\\\n 0 & -\\frac{\\sin \\left(\\frac{y}{z}\\right)}{z} & \\frac{y \\sin \\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**2))\ng = cos((y/z))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-9 x^3}-\\sqrt{-\\frac{x}{2}-\\frac{9}{2}}$\n", - "Output Answer": [ - "$27 e^{-9 x^3} x \\left(27 x^3-2\\right)+\\frac{1}{4 \\sqrt{2} (-x-9)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-9*x**3)-sqrt(-(x/2)-(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x+9}+\\log (9 x)$\n", - "Output Answer": [ - "$2 e^{2 x+9}+\\frac{1}{x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x+9)+log(9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**4\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x^2 z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 2 x z^2 & 0 & 2 x^2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y\nh = x**2*z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2}-\\cos (z),0,-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = sin(z)\nh = sin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = x+z^3$", - "Output Answer": [ - "$\\left\\{0,-1,-\\frac{1}{\\sqrt{1-x^2}}-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = acos(x)\nh = acos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{1,-1,\\frac{1}{y \\sqrt{1-\\frac{x^2}{y^2}}}-x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = asin(x/y)\nh = asin(x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{x-y}{z}$", - "Output Answer": [ - "$\\cos (y)-\\frac{x-y}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = sin(y)\nh = ((x-y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5-y}$, $g(x,y,z) = \\frac{1}{y+z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{5 x^4}{3 \\sqrt[3]{x^5-y}^2}-\\frac{1}{(y+z)^2}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5-y)\ng = (1/(y+z))\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^2 y+z}}$", - "Output Answer": [ - "$\\frac{3 x^2 y^2}{\\left(x^2 y+z\\right)^{5/2}}+\\frac{3 x^4}{4 \\left(x^2 y+z\\right)^{5/2}}-\\frac{y}{\\left(x^2 y+z\\right)^{3/2}}+\\frac{3}{4 \\left(x^2 y+z\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**2*y+z)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{y \\sqrt{\\frac{z}{y}-1} \\sqrt{\\frac{z}{y}+1}},\\frac{z}{y^2 \\sqrt{\\frac{z}{y}-1} \\sqrt{\\frac{z}{y}+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(z/y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\sin \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{\\cos \\left(\\frac{y}{x}\\right)}{x}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = sin((y/x))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-8 x^3-8\\right)^2$\n", - "Output Answer": [ - "$384 x \\left(5 x^3+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-8*x**3-8)**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x-z)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{z}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(x-z)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x+\\frac{16}{3}}$\n", - "Output Answer": [ - "$49 e^{7 x+\\frac{16}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x+(16/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^5$, $g(x,y,z) = \\frac{x-y^4}{z}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 5 z^4 \\\\\n \\frac{1}{z} & -\\frac{4 y^3}{z} & -\\frac{x-y^4}{z^2} \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**5\ng = ((x-y**4)/z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\log (x y-z)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x y-z},0,\\frac{y}{x y-z}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = log(x*y-z)\nh = log(x*y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-x \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(8 x+4)^4-\\frac{1}{(5 x-4)^5}$\n", - "Output Answer": [ - "$32 (8 x+4)^3+\\frac{25}{(4-5 x)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8*x+4)**4-(1/((5*x-4)**5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5 x+3)-\\sin (6 x+6)$\n", - "Output Answer": [ - "$\\frac{5}{5 x+3}-6 \\cos (6 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x+3)-sin(6*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x^3+3}+\\sin (8 x+6)$\n", - "Output Answer": [ - "$3 e^{x^3+3} x^2+8 \\cos (8 x+6)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x**3+3)+sin(8*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (x-y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\tan (x-z)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x-z),-\\sec ^2(x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-y)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan \\left(\\frac{17}{2}-3 x^3\\right)-\\sin \\left(\\frac{15}{2}-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{2} \\left(2 x^2 \\sec ^2\\left(\\frac{17}{2}-3 x^3\\right)+\\cos \\left(\\frac{3}{2} (5-3 x)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan((17/2)-3*x**3)-sin((15/2)-((9*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos (x-z)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$e^x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cos(x-z)\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = sin(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = z$, and $h(x,y,z) = e^{x-z}$", - "Output Answer": [ - "$\\left\\{-1,-e^{x-z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{9-4 x} \\cosh (5-5 x)$\n", - "Output Answer": [ - "$\\frac{5 (4 x-9) \\sinh (5-5 x)-2 \\cosh (5-5 x)}{\\sqrt{9-4 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(9-4*x)*cosh(5-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = z\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(z^4-y\\right)$", - "Output Answer": [ - "$-\\frac{16 z^6 \\left(z^4-y\\right)}{\\left(1-\\left(z^4-y\\right)^2\\right)^{3/2}}-\\frac{12 z^2}{\\sqrt{1-\\left(z^4-y\\right)^2}}-\\frac{z^4-y}{\\left(1-\\left(z^4-y\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z**4-y)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-7 x-4)^4}$\n", - "Output Answer": [ - "$\\frac{980}{(7 x+4)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-7*x-4)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (9 x+4)-\\tan (7-6 x)$\n", - "Output Answer": [ - "$6 \\sec ^2(7-6 x)+9 \\sec ^2(9 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(9*x+4)-tan(7-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(y^5\\right)$, $g(x,y,z) = \\left(z-y^5\\right)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{15}{2} y^4 \\sqrt{z-y^5}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y**5)\ng = (z-y**5)**(3/2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{2}{2 x-9}$\n", - "Output Answer": [ - "$\\log (2 x-9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (2/(2*x-9))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (2-3 x)-\\frac{1}{(9 x-6)^3}$\n", - "Output Answer": [ - "$\\frac{9 (3 x-2)^3+4}{(2-3 x)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2-3*x)-(1/((9*x-6)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sin \\left(\\frac{x y}{z}\\right)$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\left\\{\\frac{x y \\cos \\left(\\frac{x y}{z}\\right)}{z^2},-\\frac{z}{2 \\sqrt{x z}},\\frac{y \\cos \\left(\\frac{x y}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = sin(((x*y)/z))\nh = sin(((x*y)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan \\left(x^2\\right)$", - "Output Answer": [ - "$4 (x-2) \\left(8+8 \\tan ^2(4)+3 \\tan (4)\\right)+8 \\tan (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = tan(x**2)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x^4-2}-\\log (-5 x-7)$\n", - "Output Answer": [ - "$-4 e^{-x^4-2} x^3-\\frac{5}{5 x+7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x**4-2)-log(-5*x-7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$y+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = tan(y)\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{2}{7 x-2}$\n", - "Output Answer": [ - "$-\\frac{196}{(7 x-2)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(2/(7*x-2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (-7 x-4)-\\tan (4 x+6)$\n", - "Output Answer": [ - "$-\\frac{7}{7 x+4}-4 \\sec ^2(4 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(-7*x-4)-tan(4*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-8 x^2-3} \\tan (7 x+4)$\n", - "Output Answer": [ - "$-\\frac{\\left(56 x^2+4 x \\sin (14 x+8)+21\\right) \\sec ^2(7 x+4)}{\\sqrt{-8 x^2-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-8*x**2-3)*tan(7*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (7-8 x) \\sin (2 x)$\n", - "Output Answer": [ - "$5 \\sin (7-10 x)-3 \\sin (7-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7-8*x)*sin(2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = log(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (x+7)+\\sin (4 x+6)$\n", - "Output Answer": [ - "$\\frac{1}{x+7}+4 \\cos (4 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(x+7)+sin(4*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(5 x-1)^2-\\sin (5 x+6)$\n", - "Output Answer": [ - "$-5 (10 x+\\cos (5 x+6)-2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(5*x-1)**2-sin(5*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\sec ^2(y)-\\frac{3}{2 z^{5/2}}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = tan(y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y}$, $g(x,y,z) = \\sinh (x+y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{y}{3 \\sqrt[3]{x y}^2}+\\cosh (x+y)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y)\ng = sinh(x+y)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cosh (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x-4) \\left(e^4 \\sinh (4)+e^4 \\cosh (4)\\right)+e^4 \\cosh (4)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cosh(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-5 x)$ on the interval $x = 5$ to $x = 14$\n", - "Output Answer": [ - "$-\\sqrt{26}+\\sqrt{197}+\\tanh ^{-1}\\left(\\sqrt{26}\\right)-\\tanh ^{-1}\\left(\\sqrt{197}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-5*x)\na = 5\nb = 14\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{y^4}{z}\\right)$", - "Output Answer": [ - "$\\frac{2 y^4 \\sec ^2\\left(\\frac{y^4}{z}\\right)}{z^3}+\\frac{2 y^8 \\tan \\left(\\frac{y^4}{z}\\right) \\sec ^2\\left(\\frac{y^4}{z}\\right)}{z^4}+\\frac{32 y^6 \\tan \\left(\\frac{y^4}{z}\\right) \\sec ^2\\left(\\frac{y^4}{z}\\right)}{z^2}+\\frac{12 y^2 \\sec ^2\\left(\\frac{y^4}{z}\\right)}{z}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((y**4)/z))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}},-\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z/y)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(3-2 x^2\\right)+\\log (3 x+1)$\n", - "Output Answer": [ - "$4 x \\sin \\left(3-2 x^2\\right)+\\frac{3}{3 x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3-2*x**2)+log(3*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x^2 z}{y}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{2 x z}{y \\sqrt{1-\\frac{x^4 z^2}{y^2}}},-\\frac{x^2 z}{y^2 \\sqrt{1-\\frac{x^4 z^2}{y^2}}},\\frac{x^2}{y \\sqrt{1-\\frac{x^4 z^2}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x**2*z)/y)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log \\left(y^2\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (x)+\\frac{2}{y}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = log(y**2)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-1}-\\cos ^{-1}\\left(-3 x^2-3\\right)$\n", - "Output Answer": [ - "$5 e^{5 x-1}-\\frac{6 x}{\\sqrt{-9 x^4-18 x^2-8}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-1)-acos(-3*x**2-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x y}{z}}$", - "Output Answer": [ - "$-\\frac{x^2 y^2}{4 z^4 \\left(\\frac{x y}{z}\\right)^{3/2}}-\\frac{x^2}{4 z^2 \\left(\\frac{x y}{z}\\right)^{3/2}}-\\frac{y^2}{4 z^2 \\left(\\frac{x y}{z}\\right)^{3/2}}+\\frac{x y}{z^3 \\sqrt{\\frac{x y}{z}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x*y)/z))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\cosh (x-z)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(z),-\\sinh (x-z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-3 x)$ on the interval $x = 4$ to $x = 6$\n", - "Output Answer": [ - "$-\\sqrt{17}+\\sqrt{37}+\\tanh ^{-1}\\left(\\sqrt{17}\\right)-\\tanh ^{-1}\\left(\\sqrt{37}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x)\na = 4\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (2-9 x)-\\tan \\left(3 x^4+5\\right)$\n", - "Output Answer": [ - "$9 \\sin (2-9 x)-12 x^3 \\sec ^2\\left(3 x^4+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(2-9*x)-tan(3*x**4+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$(x-4) \\left(\\frac{\\sin (4)}{4}+2 \\cos (4)\\right)+2 \\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = \\sqrt{\\frac{y}{x^2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 0 & \\cos (z) \\\\\n -\\frac{y}{x^3 \\sqrt{\\frac{y}{x^2}}} & \\frac{1}{2 x^2 \\sqrt{\\frac{y}{x^2}}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = sin(z)\nh = sqrt((y/(x**2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n 0 & \\cos (y) & 0 \\\\\n 1 & -1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+z)\ng = sin(y)\nh = x-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan \\left(y^2\\right)$, and $h(x,y,z) = \\sqrt{x+y^2}$", - "Output Answer": [ - "$\\left\\{\\frac{y}{\\sqrt{x+y^2}},-\\frac{1}{2 \\sqrt{x+y^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y**2)\nh = tan(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (5 x+6) \\tan ^{-1}(3 x+6)$\n", - "Output Answer": [ - "$-\\frac{54 (x+2) \\sin (5 x+6)}{\\left(9 (x+2)^2+1\\right)^2}+\\frac{30 \\cos (5 x+6)}{9 (x+2)^2+1}-25 \\sin (5 x+6) \\tan ^{-1}(3 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(5*x+6)*atan(3*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y^3}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = cbrt(y**3)\nh = cbrt(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(x^5+z\\right)^3$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 15 x^4 \\left(x^5+z\\right)^2 & 0 & 3 \\left(x^5+z\\right)^2 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x**5+z)**3\ng = y**3\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(4-6 x^2\\right)-\\sin ^{-1}(6 x+5)$\n", - "Output Answer": [ - "$-12 x \\sec ^2\\left(4-6 x^2\\right)-\\frac{6}{\\sqrt{1-(6 x+5)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4-6*x**2)-asin(6*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tanh (x z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-x \\text{sech}^2(x z),0,z \\text{sech}^2(x z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = tanh(x*z)\nh = tanh(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\left(y-x^4\\right)^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{\\left(y-x^4\\right)^3},-\\frac{8 x^3}{\\left(y-x^4\\right)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (9-3 x)+\\cosh (2 x+3)$\n", - "Output Answer": [ - "$\\frac{1}{x-3}+2 \\sinh (2 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(9-3*x)+cosh(2*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{3}{2}-7 x} \\log \\left(6 x^2-4\\right)$\n", - "Output Answer": [ - "$\\frac{e^{\\frac{3}{2}-7 x} \\left(6 x-7 \\left(3 x^2-2\\right) \\log \\left(6 x^2-4\\right)\\right)}{3 x^2-2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((3/2)-7*x)*log(6*x**2-4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(y z)$, $g(x,y,z) = \\sqrt{y-z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{\\sqrt{1-y^2 z^2}} & -\\frac{y}{\\sqrt{1-y^2 z^2}} \\\\\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y*z)\ng = sqrt(y-z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cbrt(y/z)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}-z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}-z}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}-z}} & -\\frac{1}{2 \\sqrt{\\frac{x}{y}-z}} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y)-z)\ng = sqrt(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x y z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$x z+e^x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = x*y*z\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2 z^2$, and $h(x,y,z) = \\frac{x}{y^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2 x}{y^3}-2 y^2 z,-\\frac{1}{y^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2*z**2\nh = y**2*z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-5 x) \\cos (3-4 x)$\n", - "Output Answer": [ - "$\\frac{\\cos (3-4 x)}{x}+4 \\log (-5 x) \\sin (3-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-5*x)*cos(3-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x-4}-\\sqrt{2 x-1}$\n", - "Output Answer": [ - "$-\\frac{1}{(2 x-1)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x-4)-sqrt(2*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x y^3}$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{x y^2}{\\sqrt[3]{x y^3}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y**3)\ng = sin(y**3)\nh = sin(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\frac{1}{(z (x+y))^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}-\\frac{3 z}{2 (z (x+y))^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = (1/((z*(x+y))**(3/2)))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+y+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = (x+z)^3$", - "Output Answer": [ - "$\\frac{1}{x+y+z}+3 (x+z)^2+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y+z)\ng = sqrt(y)\nh = (x+z)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{\\sqrt{1-x^2 z^2}} & 0 & -\\frac{x}{\\sqrt{1-x^2 z^2}} \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x*z)\ng = sin(y)\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x-y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n -\\frac{1}{z \\sqrt{1-\\frac{(x-y)^2}{z^2}}} & \\frac{1}{z \\sqrt{1-\\frac{(x-y)^2}{z^2}}} & \\frac{x-y}{z^2 \\sqrt{1-\\frac{(x-y)^2}{z^2}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(x+z)\nh = acos((x-y)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\sqrt{4 x^4+2}\\right)+1$\n", - "Output Answer": [ - "$\\frac{4 x^3}{2 x^4+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(sqrt(4*x**4+2))+1, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{3 \\sqrt[3]{y z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = cbrt(y*z)\nh = cbrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(6 x^3+4\\right)^3+\\sqrt{-4 x^4-5}$\n", - "Output Answer": [ - "$54 x^2 \\left(6 x^3+4\\right)^2-\\frac{8 x^3}{\\sqrt{-4 x^4-5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((6*x**3+4)**3+sqrt(-4*x**4-5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y^5$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -5 y^4 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n -\\frac{1}{2 \\sqrt{z-x}} & 0 & \\frac{1}{2 \\sqrt{z-x}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y**5\ng = sqrt(x)\nh = sqrt(z-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$(x-3) \\left(1+27 \\cos (27)+\\tan ^2(3)\\right)+\\sin (27)+\\tan (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = sin(x**3)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$(x-3)^2 \\sin (3) (-\\cosh (3))+(x-3) (\\cos (3) \\cosh (3)-\\sin (3) \\sinh (3))+\\cos (3) \\sinh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = -\\sin (x-y)$, and $h(x,y,z) = \\frac{1}{(z-x)^2}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2}{(z-x)^3},-\\cos (x-y)-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = -sin(x-y)\nh = -sin(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = x$, and $h(x,y,z) = (x y-z)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 1 & 0 & 0 \\\\\n 2 y (x y-z) & 2 x (x y-z) & -2 (x y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = x\nh = (x*y-z)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(x)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$0$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 0\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = atan(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (\\cos (8))$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(cos(8))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x-y-z)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\frac{x-y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x-y-z) & -\\sec ^2(x-y-z) & -\\sec ^2(x-y-z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n \\frac{1}{z} & -\\frac{1}{z} & -\\frac{x-y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x-y-z)\ng = cos(z)\nh = ((x-y)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 \\sqrt{z}}{2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z**(3/2)\nh = z**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$3 x^2-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = z-y\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2},\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{x}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{11 x}{2}+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$-484 \\sin ^4\\left(\\frac{1}{2} (11 x+17)\\right) \\csc ^3(11 x+17)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(((11*x)/2)+(17/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y^5}}$", - "Output Answer": [ - "$\\frac{75 x^2 y^8}{4 \\left(x y^5\\right)^{5/2}}+\\frac{3 y^{10}}{4 \\left(x y^5\\right)^{5/2}}-\\frac{10 x y^3}{\\left(x y^5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y**5)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z-y}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(z-y)\nh = sqrt(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = e^{x-y^4-z}$", - "Output Answer": [ - "$16 y^6 e^{x-y^4-z}-12 y^2 e^{x-y^4-z}+2 e^{x-y^4-z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-y**4-z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$e^x+\\frac{1}{y}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = log((y/x))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^2\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-2) \\left(4 \\cos (4) \\cot (2)+\\sin (4) \\left(-1-\\cot ^2(2)\\right)\\right)+\\sin (4) \\cot (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**2)\ng = tan(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$e^x+3 y^2+\\frac{1}{1-z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y**3\nh = atanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\frac{2}{z}-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = (y/z)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = x+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-x^5-2\\right) \\cos \\left(3 x^4+4\\right)$\n", - "Output Answer": [ - "$x^3 \\left(\\frac{5 x \\cos \\left(3 x^4+4\\right)}{x^5+2}-12 \\log \\left(-x^5-2\\right) \\sin \\left(3 x^4+4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-x**5-2)*cos(3*x**4+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{3 x}{2}+4\\right)$\n", - "Output Answer": [ - "$-\\frac{3}{2} \\sin \\left(\\frac{3 x}{2}+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((3*x)/2)+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (3 x+2)}{\\log (7-7 x)}$\n", - "Output Answer": [ - "$-\\frac{\\frac{\\cos (3 x+2)}{x-1}+3 \\log (7-7 x) \\sin (3 x+2)}{\\log ^2(7-7 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(3*x+2))/(log(7-7*x))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = x$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = x\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = -\\sin \\left(x^3-z^3\\right)$\n", - "Output Answer": [ - "$\\left\\{-3 x^2 \\cos \\left(x^3-z^3\\right),0,3 z^2 \\cos \\left(x^3-z^3\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x**3-z**3)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x \\sqrt{\\frac{y^2}{x^2}+1}},\\frac{y}{x^2 \\sqrt{\\frac{y^2}{x^2}+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4 z^4$, $g(x,y,z) = e^{\\frac{x}{y^2 z}}$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\left\\{\\frac{x e^{\\frac{x}{y^2 z}}}{y^2 z^2}-\\frac{2}{y^3},4 x^4 z^3,\\frac{e^{\\frac{x}{y^2 z}}}{y^2 z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4*z**4\ng = math.e**(x/(y**2*z))\nh = math.e**(x/(y**2*z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$-\\sin \\left(\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{81 \\sin (3)}{5120}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-sin(((3*x)/2)))\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$2 y+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((y/z))\ng = y**2\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x-2) \\left(\\cos (2)-e^2\\right)-e^2+\\sin (2)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin \\left(x y^4+z\\right)$", - "Output Answer": [ - "$\\left\\{4 x y^3 \\cos \\left(x y^4+z\\right),\\sec ^2(z)-y^4 \\cos \\left(x y^4+z\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{x^2},\\frac{1}{3 \\sqrt[3]{x}^2}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cbrt(x)\nh = cbrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (x/z)\nh = x-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4 z}$, $g(x,y,z) = \\frac{1}{\\sqrt{x^4 z}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{\\frac{x^4}{2 \\left(x^4 z\\right)^{3/2}},x^4 e^{x^4 z},-\\frac{2 x^3 z}{\\left(x^4 z\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4*z)\ng = (1/(sqrt(x**4*z)))\nh = (1/(sqrt(x**4*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\sinh (x-z)$", - "Output Answer": [ - "$\\left\\{0,-\\cosh (x-z),\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{z}{2 \\sqrt{y z}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt(y*z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^3\\right)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**3)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{y^6}{z^2}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{6 y^5}{z^2},-\\frac{2 y^6}{z^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**6)/(z**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\log \\left(x+y^4\\right)$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$-\\frac{1}{x^2}+\\frac{4 y^3}{x+y^4}+\\frac{1}{2 \\sqrt{z-x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = log(x+y**4)\nh = sqrt(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},\\frac{1}{2 \\sqrt{x+z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4 x+4)-\\tan (4-8 x)$\n", - "Output Answer": [ - "$8 \\sec ^2(4-8 x)-4 \\sin (4 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x+4)-tan(4-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{x z^4}$, and $h(x,y,z) = x+z^4$", - "Output Answer": [ - "$\\left\\{-\\frac{4 x z^3}{3 \\sqrt[3]{x z^4}^2},-1,\\frac{z^4}{3 \\sqrt[3]{x z^4}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(x*z**4)\nh = cbrt(x*z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (x-z)$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = \\frac{z^5}{x^5}$", - "Output Answer": [ - "$\\frac{5 z^4}{x^5}-\\sec ^2(x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-z)\ng = (1/(x**2))\nh = ((z**5)/(x**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(y-z^4\\right)$", - "Output Answer": [ - "$\\cos (x)+4 z^3 \\sin \\left(y-z^4\\right)+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(y)\nh = cos(y-z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\left((9 x-8) \\sin ^{-1}(7-8 x)\\right)$\n", - "Output Answer": [ - "$\\frac{-72 x^2+125 x-52}{\\left(-4 x^2+7 x-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((9*x-8)*asin(7-8*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(6 x^2+7\\right)+\\frac{1}{6-\\frac{x}{2}}$\n", - "Output Answer": [ - "$2 \\left(\\frac{1}{(x-12)^2}-6 x \\sin \\left(6 x^2+7\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6*x**2+7)+(1/(6-(x/2))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(z-y)^{3/2}}$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 (z-y)^{5/2}},-\\frac{y}{x^2 \\sqrt{\\frac{y}{x}-1} \\sqrt{\\frac{y}{x}+1}}-\\frac{3}{2 (z-y)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z-y)**(3/2)))\ng = acosh(y/x)\nh = acosh(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 1 & 1 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = y+z\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z^5$, $g(x,y,z) = \\cos \\left(\\frac{x}{z^5}\\right)$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z^5 & 0 & 5 x z^4 \\\\\n -\\frac{\\sin \\left(\\frac{x}{z^5}\\right)}{z^5} & 0 & \\frac{5 x \\sin \\left(\\frac{x}{z^5}\\right)}{z^6} \\\\\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z**5\ng = cos((x/(z**5)))\nh = atan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x-y}$, $g(x,y,z) = z^4$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{-4 z^3,-\\frac{1}{x^2+1},\\frac{1}{3 \\sqrt[3]{x-y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x-y)\ng = z**4\nh = z**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$-\\frac{1}{x^2}+4 y^3+\\cos (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y**4\nh = sin(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(x+3)$\n", - "Output Answer": [ - "$\\frac{x+3}{\\left(1-(x+3)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{35 x^4}{\\sqrt{1-\\left(7 x^5+5\\right)^2}}$\n", - "Output Answer": [ - "$\\sin ^{-1}\\left(7 x^5+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((35*x**4)/(sqrt(1-(7*x**5+5)**2)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = y^8$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{1}{x-z}+8 y^7+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = y**8\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y/x)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-3 x^2-7}+\\cos (7 x+5)$\n", - "Output Answer": [ - "$-6 e^{-3 x^2-7} x-7 \\sin (7 x+5)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-3*x**2-7)+cos(7*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-z)^{3/2}$, $g(x,y,z) = x^4 y^2$, and $h(x,y,z) = e^{\\frac{x^2}{z}}$", - "Output Answer": [ - "$2 x^4 y-\\frac{x^2 e^{\\frac{x^2}{z}}}{z^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-z)**(3/2)\ng = x**4*y**2\nh = math.e**((x**2)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{z^2}\\right)$, $g(x,y,z) = \\log \\left(y z^2\\right)$, and $h(x,y,z) = \\sin ^{-1}(x y)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{\\sqrt{1-x^2 y^2}}-\\frac{2}{z},-\\frac{y}{\\sqrt{1-x^2 y^2}}-\\frac{2 x \\cos \\left(\\frac{x}{z^2}\\right)}{z^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/(z**2)))\ng = log(y*z**2)\nh = log(y*z**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x-2} \\sin (5 x+2)$\n", - "Output Answer": [ - "$e^{7 x-2} (24 \\sin (5 x+2)+70 \\cos (5 x+2))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x-2)*sin(5*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(2-x)$\n", - "Output Answer": [ - "$-\\frac{x-2}{\\left(-x^2+4 x-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(2-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (\\sin (4))$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(sin(4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{5 z^4}{z^{10}+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = math.e**y\nh = atan(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$3^{2/3}-\\tan (5 x+1)$\n", - "Output Answer": [ - "$-5 \\sec ^2(5 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(3**(2/3)-tan(5*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{x z^5}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z^5}{3 \\sqrt[3]{x z^5}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^{y-x}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = math.e**(y-x)\nh = math.e**(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{x}{y}+z$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2},-\\frac{1}{y},-\\cos (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{3}{2}-6 x^3\\right)$\n", - "Output Answer": [ - "$36 x \\left(\\sin \\left(\\frac{3}{2}-6 x^3\\right)-9 x^3 \\cos \\left(\\frac{3}{2}-6 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((3/2)-6*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x+1}+\\cos (7 x+1)$\n", - "Output Answer": [ - "$-\\frac{1}{4 (x+1)^{3/2}}-49 \\cos (7 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x+1)+cos(7*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = cos(x*y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = \\sqrt[3]{x+y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{x+y}^2},-\\frac{1}{3 \\sqrt[3]{x+y}^2},\\frac{3 \\sqrt{x}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x**(3/2)\nh = x**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\cos ^{-1}(x+z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-(x+z)^2}},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{6 x-3}}{\\sqrt{-8 x^2-9}}$\n", - "Output Answer": [ - "$\\frac{e^{6 x-3} \\left(-48 x^2+8 x-54\\right)}{\\left(-8 x^2-9\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(6*x-3))/(sqrt(-8*x**2-9))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = sin(z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y^3}}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(sqrt(y**3)))\nh = (1/(sqrt(y**3)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = e^{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y+z)\nh = math.e**(z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left\\{z \\sec ^2(y z),0,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log((x/y))\nh = log((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-5 x-9)-\\sqrt{8 x^4-7}$\n", - "Output Answer": [ - "$\\frac{5}{5 x+9}-\\frac{16 x^3}{\\sqrt{8 x^4-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-5*x-9)-sqrt(8*x**4-7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = y$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$e^{x+y}+5 z^4+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = y\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(x-y^5+z\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\left(x-y^5+z\\right)^2+1} & -\\frac{5 y^4}{\\left(x-y^5+z\\right)^2+1} & \\frac{1}{\\left(x-y^5+z\\right)^2+1} \\\\\n 1 & 0 & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x-y**5+z)\ng = x\nh = tan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{64 x^2}-\\tan ^{-1}\\left(x^4+8\\right)$\n", - "Output Answer": [ - "$-\\frac{4 x^3}{\\left(x^4+8\\right)^2+1}-\\frac{1}{32 x^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(64*x**2))-atan(x**4+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x}{z}}$, $g(x,y,z) = e^{y-z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{2 z \\sqrt{\\frac{x}{z}}}+e^{y-z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/z))\ng = math.e**(y-z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z-x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-x)\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $e^x$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = math.e**x\nseries = f.subs(x, g).series(x, 2, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{\\frac{x}{y}-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\text{sech}^2(z) \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{e^{\\frac{x}{y}-z}}{y} & -\\frac{x e^{\\frac{x}{y}-z}}{y^2} & -e^{\\frac{x}{y}-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(z)\ng = tan(y)\nh = math.e**((x/y)-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{6 x+6}{\\sqrt{(6 x+6)^2+1}}$\n", - "Output Answer": [ - "$\\frac{648 (x+1)}{\\left(36 x^2+72 x+37\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((6*x+6)/(sqrt((6*x+6)**2+1)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 (x+y)^2 & 3 (x+y)^2 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+y)**3\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^4 y}$, $g(x,y,z) = \\cos \\left(x^4-y\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$-\\frac{4}{x^5 y}+\\sin \\left(x^4-y\\right)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**4*y))\ng = cos(x**4-y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x^3+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 e^{x^3+z} & 0 & e^{x^3+z} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x**3+z)\ng = y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x+2}+\\tan (6 x+5)$\n", - "Output Answer": [ - "$\\frac{7}{2 \\sqrt{7 x+2}}+6 \\sec ^2(6 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x+2)+tan(6*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5+y}{z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4}{z},\\frac{1}{z},-\\frac{x^5+y}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5+y)/z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\log \\left(\\frac{x}{y z}\\right)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$y-\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = log((x/(y*z)))\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = z^2$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & 0 & 2 z \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = z**2\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x^4-z\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{60 x^6}{\\left(x^4-z\\right)^{7/2}}-\\frac{18 x^2}{\\left(x^4-z\\right)^{5/2}}+\\frac{15}{4 \\left(x^4-z\\right)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**4-z)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y+z)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{(y z)^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 z}{2 (y z)^{5/2}},\\frac{1}{y+z},1-\\frac{1}{y+z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y+z)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sqrt{-x-3}-\\tan (5)$\n", - "Output Answer": [ - "$\\frac{1}{4 (-x-3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sqrt(-x-3)-tan(5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log (x y-z)$\n", - "Output Answer": [ - "$\\left\\{\\frac{y}{x y-z},\\frac{x}{x y-z},-\\frac{1}{x y-z}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y-z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos \\left(x^4\\right)$", - "Output Answer": [ - "$(x-3) \\left(\\left(1+\\tan ^2(3)\\right) \\sec (81)+108 \\tan (3) \\tan (81) \\sec (81)\\right)+\\tan (3) \\sec (81)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x**4)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x+9}+e^{7 x-2}$\n", - "Output Answer": [ - "$49 e^{7 x-2}-\\frac{16}{(8 x+9)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt(8*x+9)+math.e**(7*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (5 x+6)+\\cos (4 x+1)$\n", - "Output Answer": [ - "$-\\frac{25}{(5 x+6)^2}-16 \\cos (4 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5*x+6)+cos(4*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{y}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n -\\frac{1}{y \\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}} & \\frac{x}{y^2 \\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}} & -\\frac{1}{\\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/y)\ng = acos((x/y)+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{4 y^3}{y^8+1}+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(y**4)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(8 x^2+8\\right)-\\cos ^{-1}(3 x-8)$\n", - "Output Answer": [ - "$-\\frac{4 x^2}{\\left(x^2+1\\right)^2}+\\frac{2}{x^2+1}+\\frac{9 (3 x-8)}{\\left(1-(8-3 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(8*x**2+8)-acos(3*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = cbrt(z)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x-y-z)^{3/2}}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{3}{2 (x-y-z)^{5/2}},-\\frac{3}{2 (x-y-z)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x-y-z)**(3/2)))\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{5 x^4}{\\sqrt{\\frac{8}{3}-x^5} \\sqrt{4-x^5}}$\n", - "Output Answer": [ - "$2 \\sinh ^{-1}\\left(\\frac{1}{2} \\sqrt{8-3 x^5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((5*x**4)/(sqrt((8/3)-x**5)*sqrt(4-x**5)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\{-1,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{15 x^4}{\\sqrt{6 x^5+8}}-12 x^3 \\cos \\left(3 x^4+5\\right)$\n", - "Output Answer": [ - "$\\sqrt{6 x^5+8}-\\sin \\left(3 x^4+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((15*x**4)/(sqrt(6*x**5+8)))-12*x**3*cos(3*x**4+5)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y+z$, $g(x,y,z) = \\tanh (y+z)$, and $h(x,y,z) = (x+y+z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 1 \\\\\n 0 & \\text{sech}^2(y+z) & \\text{sech}^2(y+z) \\\\\n 5 (x+y+z)^4 & 5 (x+y+z)^4 & 5 (x+y+z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y+z\ng = tanh(y+z)\nh = (x+y+z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh (x+7)-\\cos (7-3 x)$\n", - "Output Answer": [ - "$\\sinh (x+7)-3 \\sin (7-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cosh(x+7)-cos(7-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y-z^3}$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y-z^3}^2} & -\\frac{z^2}{\\sqrt[3]{y-z^3}^2} \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(y-z**3)\nh = acos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y-x}}$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 y^2 \\left(\\frac{x}{y}\\right)^{3/2}}-1,\\frac{1}{2 y \\left(\\frac{x}{y}\\right)^{3/2}},\\frac{1}{2 (y-x)^{3/2}}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y-x)))\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x^3+4} \\log (6-4 x)$\n", - "Output Answer": [ - "$\\frac{\\frac{4 \\left(5 x^3+4\\right)}{2 x-3}+15 x^2 \\log (6-4 x)}{2 \\sqrt{5 x^3+4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x**3+4)*log(6-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (1-3 x) \\tan \\left(5-3 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{3 \\tan \\left(5-3 x^2\\right)}{1-3 x}+6 x \\log (1-3 x) \\sec ^2\\left(5-3 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(1-3*x)*tan(5-3*x**2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{1}{y \\sqrt{\\frac{x^2}{y^2}+1}}+\\cos (y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x/y)\ng = sin(y-z)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (7-5 x)-\\sin ^{-1}\\left(3 x^3\\right)$\n", - "Output Answer": [ - "$50 \\tan (7-5 x) \\sec ^2(7-5 x)-\\frac{9 x \\left(9 x^6+2\\right)}{\\left(1-9 x^6\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(7-5*x)-asin(3*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (8-7 x)$\n", - "Output Answer": [ - "$7 \\sin (8-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(8-7*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt{z-y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{z-y}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sqrt(z-y)\nh = sqrt(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,0,-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x^4$", - "Output Answer": [ - "$(x-3) (108-\\sin (3))+(x-3)^2 \\left(54-\\frac{\\cos (3)}{2}\\right)+81+\\cos (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x**4\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n 0 & \\cos (y+z) & \\cos (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = math.e**z\nh = sin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-4 x^2-2$\n", - "Output Answer": [ - "$-8$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -4*x**2-2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{(z-y)^2}$", - "Output Answer": [ - "$-\\frac{2}{(z-y)^3}-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = (1/((z-y)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-x^4} \\tan (6 x)$\n", - "Output Answer": [ - "$-2 e^{8-x^4} \\left(x^3 \\sin (12 x)-3\\right) \\sec ^2(6 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-x**4)*tan(6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x+y}{z^3}}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 z^3 \\sqrt[3]{\\frac{x+y}{z^3}}^2} & \\frac{1}{3 z^3 \\sqrt[3]{\\frac{x+y}{z^3}}^2} & -\\frac{x+y}{z^4 \\sqrt[3]{\\frac{x+y}{z^3}}^2} \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt((x+y)/(z**3))\ng = y**(3/2)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = x\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\sec ^2(x)+\\cos (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = sin(y)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin (5 x)$ on the interval $x = 3$ to $x = 3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(5*x)\na = 3\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x+4)^4-16 (x+4)^3+96 (x+4)^2-256 (x+4)+256$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**2\nseries = f.subs(x, g).series(x, -4, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\sin ^{-1}(x y+z)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{1-(x y+z)^2}}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = asin(x*y+z)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x-y)$, $g(x,y,z) = \\frac{1}{z-x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n \\frac{1}{(z-x)^2} & 0 & -\\frac{1}{(z-x)^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x-y)\ng = (1/(z-x))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(x y)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2 \\left(\\frac{z^2}{y^2}+1\\right)},0,\\frac{y}{\\sqrt{1-x^2 y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(x*y)\nh = asin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (7 x+5)-\\log (-x-9)$\n", - "Output Answer": [ - "$7 \\sec ^2(7 x+5)-\\frac{1}{x+9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(7*x+5)-log(-x-9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$\\frac{11}{2 \\sqrt{22 x-16}}+3 \\cos \\left(\\frac{15}{2}-3 x\\right)$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{22 x-16}-\\sin \\left(\\frac{15}{2}-3 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (11/(2*sqrt(22*x-16)))+3*cos((15/2)-3*x)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = \\cosh ^{-1}(y)$", - "Output Answer": [ - "$-\\sin (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**(x*z)\nh = acosh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{(x+y+z)^{3/2}}$", - "Output Answer": [ - "$\\frac{45}{4 (x+y+z)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y+z)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (y z)^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3}{2} z \\sqrt{y z} & \\frac{3}{2} y \\sqrt{y z} \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y*z)**(3/2)\ng = y\nh = cos(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\left\\{0,\\cos (x-z),\\sec ^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{9 x}{2}+8}+\\sin (3-9 x)$\n", - "Output Answer": [ - "$\\frac{9}{2} \\left(e^{\\frac{9 x}{2}+8}-2 \\cos (3-9 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((9*x)/2)+8)+sin(3-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{x}{z}}$, $g(x,y,z) = \\frac{1}{\\sqrt{z}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z^{3/2}},-\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/z))\ng = (1/(sqrt(z)))\nh = (1/(sqrt(z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(2-2 x^4\\right) \\cos (6 x+7)$\n", - "Output Answer": [ - "$-6 \\sin ^{-1}\\left(2-2 x^4\\right) \\sin (6 x+7)-\\frac{8 x^3 \\cos (6 x+7)}{\\sqrt{-4 x^8+8 x^4-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(2-2*x**4)*cos(6*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = sin(y)\nh = atan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x z)$, $g(x,y,z) = \\cosh (x-y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,-x \\sin (x z),\\sinh (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z)\ng = cosh(x-y)\nh = cosh(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = log(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3-6 x) \\cos (x+8)$\n", - "Output Answer": [ - "$\\frac{2 \\cos (x+8)}{2 x-1}-\\log (3-6 x) \\sin (x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3-6*x)*cos(x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(z-x^5\\right)^2$", - "Output Answer": [ - "$-40 x^3 \\left(z-x^5\\right)+50 x^8+2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x**5)**2\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\log \\left(x^2\\right)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = log(x**2)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sin (x+z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sin(x+z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = \\cos (y z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-z \\sin (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = cos(y*z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}},0,\\frac{2}{y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2))\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3-5 x^2}-e^{5 x-9}$\n", - "Output Answer": [ - "$-5 e^{-5 x^2-9} \\left(e^{12} \\left(2-20 x^2\\right)+5 e^{5 x (x+1)}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3-5*x**2)-math.e**(5*x-9)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-5 x-3}+\\log (8-4 x)$\n", - "Output Answer": [ - "$-\\frac{1}{(x-2)^2}-\\frac{25}{4 (-5 x-3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-5*x-3)+log(8-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x-y^4+z\\right)^4$", - "Output Answer": [ - "$192 y^6 \\left(x-y^4+z\\right)^2-48 y^2 \\left(x-y^4+z\\right)^3+24 \\left(x-y^4+z\\right)^2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y**4+z)**4\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = cos(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (x-6)-\\sqrt{-8 x-2}$\n", - "Output Answer": [ - "$\\frac{16}{(-8 x-2)^{3/2}}-\\frac{1}{(x-6)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(x-6)-sqrt(-8*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y z)^{3/2}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{3}{2} y \\sqrt{y z},-\\frac{3}{2} z \\sqrt{y z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y*z)**(3/2)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x-1} \\cos \\left(e^{2 x-8}\\right)$\n", - "Output Answer": [ - "$\\frac{5 \\cos \\left(e^{2 x-8}\\right)-4 e^{2 x-8} (5 x-1) \\sin \\left(e^{2 x-8}\\right)}{2 \\sqrt{5 x-1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x-1)*cos(math.e**(2*x-8)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y z^2$, and $h(x,y,z) = \\frac{x-y}{z^2}$", - "Output Answer": [ - "$\\left\\{-2 y z-\\frac{1}{z^2},-\\frac{1}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y*z**2\nh = y*z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y^3$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = y^3+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 3 y^2 & 0 \\\\\n 0 & \\frac{3 y^2}{2 \\sqrt{y^3}} & 0 \\\\\n 0 & 3 y^2 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y**3\ng = sqrt(y**3)\nh = y**3+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = sin(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (y)$, $g(x,y,z) = \\sqrt[3]{x+y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+y}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(y)\ng = cbrt(x+y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y+z)\nh = cos(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{13 x}{2}+8\\right)-\\sqrt{5 x+\\frac{15}{2}}$\n", - "Output Answer": [ - "$\\frac{\\sqrt{\\frac{5}{2}}}{(2 x+3)^{3/2}}-\\frac{169}{4} \\sin \\left(\\frac{13 x}{2}+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((13*x)/2)+8)-sqrt(5*x+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sqrt{1-8 x} \\sin ^{-1}\\left(2 x^5+6\\right)$\n", - "Output Answer": [ - "$\\frac{4 \\sin ^{-1}\\left(2 x^5+6\\right)}{\\sqrt{1-8 x}}-\\frac{10 \\sqrt{1-8 x} x^4}{\\sqrt{1-4 \\left(x^5+3\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sqrt(1-8*x)*asin(2*x**5+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\cos (y)+\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin(y)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin (4 x)$ on the interval $x = 2$ to $x = 2$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(4*x)\na = 2\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left\\{z \\sec ^2(y z)-y \\cos (y z),0,-\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = sin(y*z)\nh = sin(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{1}{x}-\\frac{3}{2 y^{5/2}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/x))\ng = (1/(y**(3/2)))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2}-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$5 x \\left(\\frac{2}{5 x^2-7}-3 x \\cos \\left(5 x^3+3\\right)\\right)$\n", - "Output Answer": [ - "$5 \\left(\\frac{1}{5} \\log \\left(7-5 x^2\\right)-\\frac{1}{5} \\sin \\left(5 x^3+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 5*x*((2/(5*x**2-7))-3*x*cos(5*x**3+3))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\sin ^{-1}(x+y)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{\\cosh \\left(\\frac{z}{x}\\right)}{x}-\\frac{z}{x^2 \\sqrt{1-\\frac{z^2}{x^2}}},\\frac{1}{\\sqrt{1-(x+y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(z/x)\ng = asin(x+y)\nh = asin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{y^4}{z^4}$", - "Output Answer": [ - "$\\left\\{\\frac{4 y^3}{z^4},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{13 x}{5}+3\\right)-\\cosh \\left(\\frac{28 x}{5}+\\frac{4}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{13}{13 x+15}-\\frac{28}{5} \\sinh \\left(\\frac{4}{5} (7 x+1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((13*x)/5)+3)-cosh(((28*x)/5)+(4/5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(x)\nh = asinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(7 x^2-9\\right)^2+e^{6 x^5}$\n", - "Output Answer": [ - "$30 e^{6 x^5} x^4+28 \\left(7 x^2-9\\right) x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((7*x**2-9)**2+math.e**(6*x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y-x$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n -1 & 1 & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = y-x\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{y-x}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n -e^{y-x} & e^{y-x} & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = math.e**(y-x)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = (x+y)^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,4 (x+y)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (x+y)**4\nh = (x+y)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{z^5}{y}\\right)$", - "Output Answer": [ - "$-\\frac{2 z^5 \\sin \\left(\\frac{z^5}{y}\\right)}{y^3}-\\frac{z^{10} \\cos \\left(\\frac{z^5}{y}\\right)}{y^4}-\\frac{25 z^8 \\cos \\left(\\frac{z^5}{y}\\right)}{y^2}-\\frac{20 z^3 \\sin \\left(\\frac{z^5}{y}\\right)}{y}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((z**5)/y))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\{0,-z \\cos (x z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-5 x-9}$\n", - "Output Answer": [ - "$-\\frac{25}{4 (-5 x-9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-5*x-9)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{x-y+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-y+z}}+\\cos (x-z)+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-z)\ng = cbrt(y)\nh = sqrt(x-y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\tan \\left(x^4 y\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 4 x^3 y \\sec ^2\\left(x^4 y\\right) & x^4 \\sec ^2\\left(x^4 y\\right) & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = tan(x**4*y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-8 x-7) \\sin ^{-1}(2-5 x)$\n", - "Output Answer": [ - "$\\frac{8 \\sin ^{-1}(2-5 x)}{8 x+7}-\\frac{5 \\log (-8 x-7)}{\\sqrt{1-(2-5 x)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-8*x-7)*asin(2-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(8 x^4-7\\right)^3}+\\frac{1}{\\left(\\frac{11 x}{2}-7\\right)^2}$\n", - "Output Answer": [ - "$24 \\left(\\frac{512 x^6}{\\left(8 x^4-7\\right)^5}-\\frac{12 x^2}{\\left(7-8 x^4\\right)^4}+\\frac{121}{(14-11 x)^4}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((8*x**4-7)**3))+(1/((((11*x)/2)-7)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-2 x-1)+\\log (6 x-7)$\n", - "Output Answer": [ - "$\\frac{8-24 x}{-12 x^2+8 x+7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-2*x-1)+log(6*x-7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3 x^2+4\\right)$\n", - "Output Answer": [ - "$-\\frac{6 \\left(3 x^2-4\\right)}{\\left(3 x^2+4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x**2+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x-3}-e^{6-8 x}$\n", - "Output Answer": [ - "$8 e^{6-8 x}+\\frac{7}{2 \\sqrt{7 x-3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x-3)-math.e**(6-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{3}{2}-3 x^2}+\\cos (5 x+6)$\n", - "Output Answer": [ - "$6 e^{\\frac{3}{2}-3 x^2} \\left(6 x^2-1\\right)-25 \\cos (5 x+6)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**((3/2)-3*x**2)+cos(5*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = tan(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(4-5 x^4\\right)$\n", - "Output Answer": [ - "$400 x^6 \\sin \\left(4-5 x^4\\right)+60 x^2 \\cos \\left(4-5 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(4-5*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{1}{x-z}$", - "Output Answer": [ - "$\\frac{1}{(x-z)^2}-\\sin (x)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**y\nh = (1/(x-z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x-7} \\sin ^{-1}\\left(2 x^5+9\\right)$\n", - "Output Answer": [ - "$\\frac{\\frac{5 (2 x-7) x^4}{\\sqrt{-x^{10}-9 x^5-20}}+\\sin ^{-1}\\left(2 x^5+9\\right)}{\\sqrt{2 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x-7)*asin(2*x**5+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^3}{y^{15} z^3}$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x^2}{y^{15} z^3},-\\frac{15 x^3}{y^{16} z^3},-\\frac{3 x^3}{y^{15} z^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**3)/(y**15*z**3))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{y}{x^2}+e^y+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = math.e**y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (2 x+8)+\\tan (9 x+2)$\n", - "Output Answer": [ - "$162 \\tan (9 x+2) \\sec ^2(9 x+2)-4 \\sin (2 (x+4))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2*x+8)+tan(9*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (x y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{x y-z},-\\frac{y}{x y-z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\sinh (x)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+2)^2 \\cos (2) \\cosh (2)+(x+2) (\\sin (2) (-\\cosh (2))-\\cos (2) \\sinh (2))+\\sin (2) \\sinh (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sinh(x)\ng = sin(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\log (2 x) \\tan (3 x)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(2*x)*tan(3*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = z-y$, and $h(x,y,z) = y^3$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = z-y\nh = y**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{x}{5}+\\frac{17}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{25} \\sin \\left(\\frac{x+17}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((x/5)+(17/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^9$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^3}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 9 z^8 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\frac{3 z^2}{2 \\left(z^3\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**9\ng = cos(y)\nh = (1/(sqrt(z**3)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos (x y z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n -y z \\sin (x y z) & -x z \\sin (x y z) & -x y \\sin (x y z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = cos(x*y*z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^8}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x^4}{y}\\right)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{4 x^3}{y \\sqrt{1-\\frac{x^8}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**8))\ng = acos((x**4)/y)\nh = acos((x**4)/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = sqrt(z)\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (2 x+6)-\\sin (4 x+8)$\n", - "Output Answer": [ - "$-4 (\\sin (2 (x+3))-4 \\sin (4 (x+2)))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2*x+6)-sin(4*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$e^y-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = math.e**y\nh = tan(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y-x)\ng = (1/(y**(3/2)))\nh = (1/(y**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cosh \\left(z^4 (x-y)\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$z^4 \\left(-\\sinh \\left(z^4 (x-y)\\right)\\right)-\\sin (x)-\\frac{4 z^3}{\\sqrt{1-z^8}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cosh(z**4*(x-y))\nh = acos(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+z$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+z\ng = y\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = acos(y)\nh = acos(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x-y)$, $g(x,y,z) = (x+y)^3$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x^2},3 (x+y)^2+\\cos (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y)\ng = (x+y)**3\nh = (x+y)**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x-y^3\\right)$, $g(x,y,z) = \\log \\left(\\frac{y^3}{x}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\sin \\left(x-y^3\\right)+\\frac{3}{y}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y**3)\ng = log(((y**3)/x))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x+y^4\\right)^{3/2}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 \\left(x+y^4\\right)^{5/2}},-\\frac{6 y^3}{\\left(x+y^4\\right)^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y**4)**(3/2)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^5}{x^5}$, $g(x,y,z) = \\tanh ^{-1}(x z)$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$-\\frac{5 z^5}{x^6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**5)/(x**5))\ng = atanh(x*z)\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-5 x+e^{8 x-3}+4$\n", - "Output Answer": [ - "$64 e^{8 x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -5*x+math.e**(8*x-3)+4\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{3}{2}$\n", - "Output Answer": [ - "$-\\frac{3 x}{2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(3/2)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 z^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x-3)+\\cos (2 x+7)$\n", - "Output Answer": [ - "$\\frac{4}{4 x-3}-2 \\sin (2 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x-3)+cos(2*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$\\{2 y,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = (x y z)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2} x y \\sqrt{x y z},0,\\frac{3}{2} y z \\sqrt{x y z}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (x*y*z)**(3/2)\nh = (x*y*z)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{5 x^2}{3}-5\\right)-\\log \\left(\\frac{19}{3}-\\frac{10 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{2 \\left(5 x^2-19 x+15\\right)}{(10 x-19) \\left(x^2-3\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((5*x**2)/3)-5)-log((19/3)-((10*x)/3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$-\\frac{y}{x^2}+\\cos (x+z)+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = tan(y)\nh = sin(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = sqrt(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(7 x+4)-\\tan (4 x+1)$\n", - "Output Answer": [ - "$-\\frac{7}{\\sqrt{1-(7 x+4)^2}}-4 \\sec ^2(4 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(7*x+4)-tan(4*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\sqrt{y^2-z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & -1 \\\\\n 0 & \\frac{y}{\\sqrt{y^2-z}} & -\\frac{1}{2 \\sqrt{y^2-z}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-z\ng = sqrt(y**2-z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = \\sqrt{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x},\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}},-\\frac{z}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (z/x)\nh = (z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{2}{3}-\\frac{26 x^2}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{52}{9} \\left(52 x^2 \\sin \\left(\\frac{2}{3}-\\frac{26 x^2}{3}\\right)+3 \\cos \\left(\\frac{2}{3}-\\frac{26 x^2}{3}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((2/3)-((26*x**2)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 1 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z\ng = log(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n 0 & \\cos (y) & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = sin(y)\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\frac{\\log (4 x)}{32 x^5}$\n", - "Output Answer": [ - "$\\frac{107-840 \\log (2)}{12582912}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(((log(4*x))/(32*x**5)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x^4+z\\right)^4$", - "Output Answer": [ - "$192 x^6 \\left(x^4+z\\right)^2+48 x^2 \\left(x^4+z\\right)^3+12 \\left(x^4+z\\right)^2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**4+z)**4\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-2 x-2)^2 \\sin (2 x+7)$\n", - "Output Answer": [ - "$32 (x+1) \\cos (2 x+7)-8 \\left(2 x^2+4 x+1\\right) \\sin (2 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-2*x-2)**2*sin(2*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$e^y+\\frac{1}{z}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**y\nh = log(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x-y^5}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\left(x-y^5\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(sqrt(x-y**5)))\nh = (1/(sqrt(x-y**5)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{y}{x}}}{x},\\frac{y e^{\\frac{y}{x}}}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(\\frac{3 x}{2}-5\\right)$\n", - "Output Answer": [ - "$-\\frac{9 \\left(\\frac{3 x}{2}-5\\right)}{4 \\left(1-\\left(5-\\frac{3 x}{2}\\right)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(((3*x)/2)-5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{y/z}$", - "Output Answer": [ - "$\\left\\{\\frac{e^{y/z}}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = -\\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(x-y)^2}},\\frac{1}{\\sqrt{1-(x-y)^2}},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y^3}}$, and $h(x,y,z) = \\sqrt{z-y^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\frac{3 y^2}{2 \\left(y^3\\right)^{3/2}} & 0 \\\\\n 0 & -\\frac{3 y^2}{2 \\sqrt{z-y^3}} & \\frac{1}{2 \\sqrt{z-y^3}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (1/(sqrt(y**3)))\nh = sqrt(z-y**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-\\frac{271 x^7}{5040}+\\frac{x^6}{720}-\\frac{x^5}{8}+\\frac{x^4}{24}-\\frac{x^3}{6}+\\frac{x^2}{2}+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^4 z^4}{y^{12}}$, $g(x,y,z) = \\sqrt{\\frac{x+y^3}{z}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4 x^3 z^4}{y^{12}} & -\\frac{12 x^4 z^4}{y^{13}} & \\frac{4 x^4 z^3}{y^{12}} \\\\\n \\frac{1}{2 z \\sqrt{\\frac{x+y^3}{z}}} & \\frac{3 y^2}{2 z \\sqrt{\\frac{x+y^3}{z}}} & -\\frac{x+y^3}{2 z^2 \\sqrt{\\frac{x+y^3}{z}}} \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**4*z**4)/(y**12))\ng = sqrt(((x+y**3)/z))\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{x}{y}-z\\right)$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{\\sec ^2\\left(\\frac{x}{y}-z\\right)}{y}+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((x/y)-z)\ng = tan(z)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x^4-2}+\\cos \\left(\\frac{15}{2}-8 x\\right)$\n", - "Output Answer": [ - "$8 e^{2 x^4-2} x^2 \\left(8 x^4+3\\right)-64 \\cos \\left(\\frac{15}{2}-8 x\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x**4-2)+cos((15/2)-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\tan \\left(\\frac{z^5}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z^5 \\sec ^2\\left(\\frac{z^5}{y}\\right)}{y^2},0,y \\cos (x y)+\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = sin(x*y)\nh = sin(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\frac{1}{(x z)^{3/2}}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y \\sqrt{\\frac{x}{y}-1} \\sqrt{\\frac{x}{y}+1}} & -\\frac{x}{y^2 \\sqrt{\\frac{x}{y}-1} \\sqrt{\\frac{x}{y}+1}} & 0 \\\\\n -\\frac{3 z}{2 (x z)^{5/2}} & 0 & -\\frac{3 x}{2 (x z)^{5/2}} \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x/y)\ng = (1/((x*z)**(3/2)))\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(1-2 x)-\\tan (4 x+3)$\n", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{-((x-1) x)}}-4 \\sec ^2(4 x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(1-2*x)-tan(4*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x+z)$", - "Output Answer": [ - "$\\{0,\\sin (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{z^4}{x}\\right)$, $g(x,y,z) = \\frac{1}{\\left(y^2\\right)^{3/2}}$, and $h(x,y,z) = \\cos \\left(x-z^4\\right)$", - "Output Answer": [ - "$\\left\\{0,\\sin \\left(x-z^4\\right)-\\frac{4 z^3 \\sin \\left(\\frac{z^4}{x}\\right)}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((z**4)/x))\ng = (1/((y**2)**(3/2)))\nh = (1/((y**2)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}} & 0 & \\frac{1}{2 x \\sqrt{\\frac{z}{x}}} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & e^{y+z} & e^{y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((z/x))\ng = cos(y)\nh = math.e**(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$1-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = y\nh = asin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{x^3}{2}+\\frac{3}{2}}$\n", - "Output Answer": [ - "$\\frac{3}{4} e^{\\frac{1}{2} \\left(x^3+3\\right)} x \\left(3 x^3+4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((x**3)/2)+(3/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{x y^5-z}}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{y^5}{2 \\left(x y^5-z\\right)^{3/2}},-\\frac{5 x y^4}{2 \\left(x y^5-z\\right)^{3/2}},\\frac{1}{2 \\left(x y^5-z\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x*y**5-z)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan ^{-1}(x+y+z)$", - "Output Answer": [ - "$\\frac{1}{(x+y+z)^2+1}+\\frac{1}{2 \\sqrt{x}}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y)\nh = atan(x+y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{y}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = log(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-y}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (z-y)^{3/2}},-\\text{sech}^2(x-z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x-z)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(y^4 z\\right)$\n", - "Output Answer": [ - "$\\left\\{0,4 y^3 z \\sinh \\left(y^4 z\\right),y^4 \\sinh \\left(y^4 z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y**4*z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/z))\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = \\frac{y}{x z}$", - "Output Answer": [ - "$-\\frac{y}{x^2}-\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}}-\\frac{y}{x z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = sqrt((x/y))\nh = (y/(x*z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = y^3 z^4$\n", - "Output Answer": [ - "$\\left\\{0,3 y^2 z^4,4 y^3 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**3*z**4\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tan ^{-1}\\left(y^2\\right)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$5 x^4+x+\\frac{2 y}{y^4+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = atan(y**2)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left\\{-\\sin (y),\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,\\cos (z),-\\frac{\\sin \\left(\\frac{x}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = cos((x/y))\nh = cos((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\log (-x)-\\log (2 x)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(-x)-log(2*x))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x^5}-\\cos ^{-1}\\left(3 x^5-1\\right)$\n", - "Output Answer": [ - "$5 x^4 \\left(e^{x^5}+\\frac{1}{\\sqrt{\\frac{2 x^5}{3}-x^{10}}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x**5)-acos(3*x**5-1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x-8}$\n", - "Output Answer": [ - "$-\\frac{16}{(8 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7} \\sin \\left(3-6 x^3\\right)$\n", - "Output Answer": [ - "$-18 \\sqrt{7} x^2 \\cos \\left(3-6 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7)*sin(3-6*x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^3}{x}$, $g(x,y,z) = \\sinh ^{-1}\\left(y^3+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{\\left(y^3+z\\right)^2+1}},0,-\\frac{3 y^2}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**3)/x)\ng = asinh(y**3+z)\nh = asinh(y**3+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = sqrt((x/y))\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (2 x)$ on the interval $x = 3$ to $x = 10$\n", - "Output Answer": [ - "$\\int_3^{10} \\sqrt{4 \\sec ^4(2 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x)\na = 3\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{13 x}{2}+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{169}{4} \\sin \\left(\\frac{1}{2} (13 x+11)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(((13*x)/2)+(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left\\{-1,-1,-\\frac{3}{2 x^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = (1/(x**(3/2)))\nh = (1/(x**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\frac{1}{(y z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n 0 & -\\frac{3 z}{2 (y z)^{5/2}} & -\\frac{3 y}{2 (y z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = tan(z)\nh = (1/((y*z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (5 x+9)-\\cos \\left(3 x^3+4\\right)$\n", - "Output Answer": [ - "$18 x \\sin \\left(3 x^3+4\\right)+81 x^4 \\cos \\left(3 x^3+4\\right)+50 \\tan (5 x+9) \\sec ^2(5 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(5*x+9)-cos(3*x**3+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x+8) \\cos \\left(2 x+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{\\cos \\left(2 x+\\frac{7}{2}\\right)}{x+2}-2 \\log (4 (x+2)) \\sin \\left(2 x+\\frac{7}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x+8)*cos(2*x+(7/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\cos (x)+5 y^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**5\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cosh (x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\sinh (x+z) & 0 & \\sinh (x+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = tan(y)\nh = cosh(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x+y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{(x+y)^2+1}}+\\frac{1}{y^2+1}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x+y)\ng = atan(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = log((z/y))\nh = log((z/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,4 x^3-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = x**4\nh = x**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x-3} \\cosh \\left(8 x^2+8\\right)$\n", - "Output Answer": [ - "$-2 e^{-2 x-3} \\left(\\cosh \\left(8 \\left(x^2+1\\right)\\right)-8 x \\sinh \\left(8 \\left(x^2+1\\right)\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x-3)*cosh(8*x**2+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(8-7 x^2\\right)-e^{5-\\frac{15 x}{2}}$\n", - "Output Answer": [ - "$14 \\sin \\left(8-7 x^2\\right)-196 x^2 \\cos \\left(8-7 x^2\\right)-\\frac{225}{4} e^{5-\\frac{15 x}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(8-7*x**2)-math.e**(5-((15*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+z)^5$, $g(x,y,z) = z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$5 (x+z)^4+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+z)**5\ng = z\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sin \\left(x^5\\right)$", - "Output Answer": [ - "$2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = y**2\nh = sin(x**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\tan ^{-1}(x y)$", - "Output Answer": [ - "$3 x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = atan(x)\nh = atan(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\{0,-1,-\\sin (x)-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cos(x)\nh = cos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y z$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{-y,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\frac{1}{y^2+1}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = atan(y)\nh = log(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{x^2}{4}$ on the interval $x = 3$ to $x = 13$\n", - "Output Answer": [ - "$-\\frac{3 \\sqrt{13}}{4}+\\frac{13 \\sqrt{173}}{4}-\\sinh ^{-1}\\left(\\frac{3}{2}\\right)+\\sinh ^{-1}\\left(\\frac{13}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((x**2)/4)\na = 3\nb = 13\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = acosh(y)\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^3-z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{3 y^2}{2 \\sqrt{y^3-z}} & -\\frac{1}{2 \\sqrt{y^3-z}} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y**3-z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^4}$, $g(x,y,z) = \\tanh ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{2 y^3}{\\sqrt{y^4}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**4)\ng = atanh(y**4)\nh = atanh(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x-y+z$, and $h(x,y,z) = -\\tan ^{-1}(x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 1 & -1 & 1 \\\\\n -\\frac{1}{(x-y)^2+1} & \\frac{1}{(x-y)^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = x-y+z\nh = -atan(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(y)$, $g(x,y,z) = x z$, and $h(x,y,z) = \\sqrt[3]{x-y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n z & 0 & x \\\\\n \\frac{1}{3 \\sqrt[3]{x-y+z}^2} & -\\frac{1}{3 \\sqrt[3]{x-y+z}^2} & \\frac{1}{3 \\sqrt[3]{x-y+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(y)\ng = x*z\nh = cbrt(x-y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(e^{-9 x-\\frac{16}{3}}\\right)-\\sin ^{-1}\\left(\\frac{2 x}{3}+\\frac{7}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{2 x+7}{2 \\left(-x^2-7 x-10\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = log(math.e**(-9*x-(16/3)))-asin(((2*x)/3)+(7/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8 x+8) (-\\cos (\\sin (7-6 x)))$\n", - "Output Answer": [ - "$-6 \\sin (\\sin (7-6 x)) \\cos (7-6 x) \\tan (8 (x+1))-8 \\sec ^2(8 (x+1)) \\cos (\\sin (7-6 x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(8*x+8)*(-cos(sin(7-6*x))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$6 \\log \\left(e^{2-8 x}\\right)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 6*log(math.e**(2-8*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{x^3}{\\sqrt{-\\frac{x^4}{2}-9}}$\n", - "Output Answer": [ - "$\\sqrt{-\\frac{x^4}{2}-9}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((x**3)/(sqrt(-((x**4)/2)-9)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4-5 x}-\\sin \\left(x^4+6\\right)$\n", - "Output Answer": [ - "$16 x^6 \\sin \\left(x^4+6\\right)-12 x^2 \\cos \\left(x^4+6\\right)-\\frac{25}{4 (4-5 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4-5*x)-sin(x**4+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan (5 x)$ on the interval $x = 5$ to $x = 15$\n", - "Output Answer": [ - "$\\int_5^{15} \\sqrt{25 \\sec ^4(5 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(5*x)\na = 5\nb = 15\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(5-4 x)^5$\n", - "Output Answer": [ - "$320 (5-4 x)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5-4*x)**5\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-24 x^3 \\cos \\left(6 x^4\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(6 x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -24*x**3*cos(6*x**4)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^{z-x}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$2 x+\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = math.e**(z-x)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$1-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = y\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-x^5-4}+\\tan ^{-1}\\left(\\frac{1}{2}-8 x\\right)$\n", - "Output Answer": [ - "$-\\frac{5 x^4}{2 \\sqrt{-x^5-4}}-\\frac{8}{\\left(\\frac{1}{2}-8 x\\right)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-x**5-4)+atan((1/2)-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y^5}$, $g(x,y,z) = z$, and $h(x,y,z) = \\cosh ^{-1}\\left(y^5-z\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{5 y^4}{\\sqrt{y^5-z-1} \\sqrt{y^5-z+1}}-1,0,-\\frac{5 y^4}{3 \\sqrt[3]{x+y^5}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y**5)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -x$ on the interval $x = 5$ to $x = 7$\n", - "Output Answer": [ - "$2 \\sqrt{2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -x\na = 5\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y-z)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y-z) & \\sin (y-z) \\\\\n 0 & 0 & 1 \\\\\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y-z)\ng = z\nh = sin(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(5 x+1)-\\frac{1}{(3 x+6)^4}$\n", - "Output Answer": [ - "$-\\frac{50 (5 x+1)}{\\left((5 x+1)^2+1\\right)^2}-\\frac{20}{81 (x+2)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(5*x+1)-(1/((3*x+6)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{x^4}{z^4}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{4 x^3}{z^4} & 0 & -\\frac{4 x^4}{z^5} \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = ((x**4)/(z**4))\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y z}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z e^{y z} & y e^{y z} \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y*z)\ng = y**(3/2)\nh = sqrt(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{3 x}{2}+\\frac{17}{2}\\right)-e^{2 x-\\frac{15}{2}}$\n", - "Output Answer": [ - "$-4 e^{2 x-\\frac{15}{2}}-\\frac{9}{4} \\sin \\left(\\frac{1}{2} (3 x+17)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(((3*x)/2)+(17/2))-math.e**(2*x-(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{-1,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x+z\nh = x+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(y+z)^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^2+z\\right)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = y^3$", - "Output Answer": [ - "$\\left\\{3 y^2-\\frac{1}{y},\\frac{1}{x^2+z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**2+z)\ng = (z/y)\nh = (z/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{12}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\left(z-x^4\\right)^5$", - "Output Answer": [ - "$\\left\\{0,20 x^3 \\left(z-x^4\\right)^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**12\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\frac{1}{y^2 z^2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z-\\frac{2}{y^3 z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**2))\ng = (1/(y**2*z**2))\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{4 y^3}{\\sqrt{1-y^8}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = acos(y**4)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\sinh \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\sinh \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x/z)\ng = y\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x-3)^2 \\left(-270+\\tan ^3(3)+\\tan (3)\\right)+(x-3) \\left(\\tan ^2(3)-404\\right)-243+\\tan (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**5\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-4 x-5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -4*x-5\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(1-3 x^2\\right)+\\log \\left(e^{7-7 x}\\right)$\n", - "Output Answer": [ - "$-6 x \\sec ^2\\left(1-3 x^2\\right)-7$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(1-3*x**2)+log(math.e**(7-7*x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{14}{3}-4 x^4\\right)-\\sqrt{6 x+\\frac{16}{3}}$\n", - "Output Answer": [ - "$16 x^2 \\left(32 x^4 \\tan \\left(\\frac{14}{3}-4 x^4\\right)-3\\right) \\sec ^2\\left(\\frac{14}{3}-4 x^4\\right)+\\frac{27 \\sqrt{\\frac{3}{2}}}{2 (9 x+8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan((14/3)-4*x**4)-sqrt(6*x+(16/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x\nseries = f.subs(x, g).series(x, -1, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\sinh (x)+e^y-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = math.e**y\nh = x-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{x-y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{1,0,\\frac{1}{3 \\sqrt[3]{x-y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cbrt(x-y)\nh = cbrt(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(y^4\\right)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y**4)\ng = asin(x)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$15 e^{\\frac{15 x^2}{2}-5} x$\n", - "Output Answer": [ - "$e^{\\frac{15 x^2}{2}-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 15*math.e**(((15*x**2)/2)-5)*x\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{\\frac{x}{z}}$, and $h(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}}-\\frac{\\sin \\left(\\frac{y}{z}\\right)}{z},0,\\frac{1}{2 z \\sqrt{\\frac{x}{z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt((x/z))\nh = sqrt((x/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin (y+z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\cos (y+z)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sin(y+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\sqrt{x^4 y}$, and $h(x,y,z) = \\cos (y-z)$", - "Output Answer": [ - "$\\left\\{-\\sin (y-z),0,\\frac{2 x^3 y}{\\sqrt{x^4 y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**4)\ng = sqrt(x**4*y)\nh = sqrt(x**4*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y+z$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y+z\nh = y+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{7 x}{2}+\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{4} \\sin \\left(\\frac{1}{2} (7 x+17)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((7*x)/2)+(17/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5+y+z$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = e^{z \\left(x^5+y\\right)}$", - "Output Answer": [ - "$\\left(x^5+y\\right) e^{z \\left(x^5+y\\right)}+5 x^4-\\frac{2}{y^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5+y+z\ng = (1/(y**2))\nh = math.e**(z*(x**5+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$-\\tan ^{-1}\\left(\\frac{14 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{102251636704}{4636082511828125}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-atan((14*x)/5))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = \\frac{z}{y^3}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n 0 & -\\frac{3 z}{y^4} & \\frac{1}{y^3} \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+z)\ng = (z/(y**3))\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8-8 x)$\n", - "Output Answer": [ - "$-8 \\sec ^2(8-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(8-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos ^{-1}(x z)$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{x^2 z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = acos(x*z)\nh = atan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x+y^5+z\\right)^3$", - "Output Answer": [ - "$150 y^8 \\left(x+y^5+z\\right)+60 y^3 \\left(x+y^5+z\\right)^2+12 \\left(x+y^5+z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y**5+z)**3\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 1 & -1 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = y-z\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = sqrt(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5 z^5$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt[3]{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 z^5 & 0 & 5 x^5 z^4 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5*z**5\ng = (1/(sqrt(y)))\nh = cbrt(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(\\frac{x+y^4}{z}\\right)$", - "Output Answer": [ - "$-\\frac{16 y^6}{\\left(x+y^4\\right)^2}+\\frac{12 y^2}{x+y^4}-\\frac{1}{\\left(x+y^4\\right)^2}+\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((x+y**4)/z))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = (y+z)^3$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$3 (y+z)^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (y+z)**3\nh = (1/(y**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = e^y$, and $h(x,y,z) = e^{z^5}$", - "Output Answer": [ - "$e^y+5 e^{z^5} z^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = math.e**y\nh = math.e**(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^3\\right)$, $g(x,y,z) = \\sqrt{x^3 y}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\frac{x^3}{2 \\sqrt{x^3 y}}-3 x^2 \\sin \\left(x^3\\right)+5 z^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**3)\ng = sqrt(x**3*y)\nh = z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cos(x+y)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (x/z)\nh = acosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan \\left(2-7 x^3\\right)}{x^4}$\n", - "Output Answer": [ - "$\\frac{4 \\tan \\left(2-7 x^3\\right)+21 x^3 \\sec ^2\\left(2-7 x^3\\right)}{x^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(2-7*x**3))/(x**4)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**(3/2)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3-4 x)+\\tan (x+3)$\n", - "Output Answer": [ - "$4 \\sin (3-4 x)+\\sec ^2(x+3)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3-4*x)+tan(x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{y}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{x}{2}-\\frac{5}{2}}-\\tan ^{-1}(7-7 x)$\n", - "Output Answer": [ - "$\\frac{98 (7-7 x)}{\\left((7-7 x)^2+1\\right)^2}-\\frac{1}{16 \\left(-\\frac{x}{2}-\\frac{5}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-(x/2)-(5/2))-atan(7-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(\\frac{9}{2}-8 x^5\\right)-\\sqrt{\\frac{13}{2}}$\n", - "Output Answer": [ - "$-\\frac{40 x^4}{\\sqrt{1-\\left(\\frac{9}{2}-8 x^5\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin((9/2)-8*x**5)-sqrt((13/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = e^{x/y}$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\frac{1}{y \\left(\\frac{z^2}{y^2}+1\\right)}-\\frac{x e^{x/y}}{y^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = math.e**(x/y)\nh = atan(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}\\left(z^2\\right)$, $g(x,y,z) = \\sqrt{x^3+y^5+z^2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{5 y^4}{2 \\sqrt{x^3+y^5+z^2}}+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(z**2)\ng = sqrt(x**3+y**5+z**2)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{0,0,1-\\frac{1}{x \\left(\\frac{y^2}{x^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y/x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = sin(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y+z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$x \\cos (x z)+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y+z)\ng = tan(y)\nh = sin(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^5\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-4) (\\cos (1024) \\tan (4) \\sec (4)-1280 \\sin (1024) \\sec (4))+\\cos (1024) \\sec (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**5)\ng = cos(x)\nseries = f.subs(x, g).series(x, 4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(7-2 x^3\\right)-\\sin (3 x+3)$\n", - "Output Answer": [ - "$-3 \\left(2 x^2 \\sin \\left(7-2 x^3\\right)+\\cos (3 (x+1))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(7-2*x**3)-sin(3*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = x y^4+z$", - "Output Answer": [ - "$\\left\\{4 x y^3,-y^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = tan(y**4)\nh = tan(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\cos ^{-1}\\left(y^3-x\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 3 e^{y^3} y^2 & 0 \\\\\n \\frac{1}{\\sqrt{1-\\left(y^3-x\\right)^2}} & -\\frac{3 y^2}{\\sqrt{1-\\left(y^3-x\\right)^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = math.e**(y**3)\nh = acos(y**3-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n z e^{x z} & 0 & x e^{x z} \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = math.e**(x*z)\nh = sqrt(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y+z}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},e^{y+z},-e^{y+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y+z)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = e^{x+y}$, and $h(x,y,z) = \\frac{1}{z^8}$", - "Output Answer": [ - "$\\left\\{0,0,e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = math.e**(x+y)\nh = math.e**(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+2)^2 \\left(-\\sin (2)-\\frac{\\cos (2)}{4}-\\log (2) \\cos (2)\\right)+(x+2) (2 \\log (2) \\sin (2)-\\cos (2))+2 \\log (2) \\cos (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = cos(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^5\\right)$ and $g(x) = $x^4$", - "Output Answer": [ - "$(x-2) (-32-80 \\sin (32))+(x-2)^2 (-24-80 \\sin (32)-3200 \\cos (32))-16+\\cos (32)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**5)\ng = x**4\nseries = f.subs(x, g).series(x, 2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (2 x+4)-\\sin ^{-1}(6 x+5)$\n", - "Output Answer": [ - "$-\\frac{36 (6 x+5)}{\\left(1-(6 x+5)^2\\right)^{3/2}}-4 \\cos (2 (x+2))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(2*x+4)-asin(6*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z^3-y$\n", - "Output Answer": [ - "$\\left\\{0,-1,3 z^2\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3-y\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-9 x-7)-\\sin (\\tan (8 x+7))$\n", - "Output Answer": [ - "$\\frac{9}{9 x+7}-8 \\sec ^2(8 x+7) \\cos (\\tan (8 x+7))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-9*x-7)-sin(tan(8*x+7)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$(x-3) (\\cos (3) \\cosh (3)-\\sin (3) \\sinh (3))+\\cos (3) \\sinh (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}-\\sin (y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = cos(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $\\tanh (x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = tanh(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y \\sinh \\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\sinh \\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(y/x)\ng = atan(y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = -\\sinh (x-y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n -\\cosh (x-y) & \\cosh (x-y) & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = -sinh(x-y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\sqrt[3]{x z}$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x-z\nh = cbrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y)$, $g(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,-\\sec ^2(y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y)\ng = log((z/y))\nh = log((z/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x+9}-\\log \\left(-4 x^5-5\\right)$\n", - "Output Answer": [ - "$\\frac{7}{2 \\sqrt{7 x+9}}-\\frac{20 x^4}{4 x^5+5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x+9)-log(-4*x**5-5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x^2\\right)^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 x}{\\left(x^2\\right)^{5/2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x**2)**(3/2)))\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin((x/z))\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = x y^3 z$", - "Output Answer": [ - "$\\left\\{3 x y^2 z,-y^3 z,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = (y-x)^2$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{2 \\sqrt{x z}} & 0 & \\frac{x}{2 \\sqrt{x z}} \\\\\n -2 (y-x) & 2 (y-x) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*z)\ng = (y-x)**2\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y \\sec ^2\\left(\\frac{y}{x}\\right)}{x^2} & \\frac{\\sec ^2\\left(\\frac{y}{x}\\right)}{x} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((y/x))\ng = y\nh = sin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x y^4-z^5\\right)^2}$", - "Output Answer": [ - "$\\frac{96 x^2 y^6}{\\left(x y^4-z^5\\right)^4}+\\frac{6 y^8}{\\left(x y^4-z^5\\right)^4}-\\frac{24 x y^2}{\\left(x y^4-z^5\\right)^3}+\\frac{40 z^3}{\\left(x y^4-z^5\\right)^3}+\\frac{150 z^8}{\\left(x y^4-z^5\\right)^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y**4-z**5)**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6-\\frac{7 x}{2}}+\\log \\left(-3 x-\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{36}{(6 x+1)^2}-\\frac{49}{16 \\left(6-\\frac{7 x}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6-((7*x)/2))+log(-3*x-(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fourth term in the series expansion of the following function around 4:\n\n$\\sin \\left(\\frac{5 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{625 \\sin (10)}{384}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sin(((5*x)/2)))\nseries = f.series(x, 4, None)\nfor i, term in enumerate(series):\n if i == 4: print(term)\n elif i > 4: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = log(z)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\sqrt{\\frac{y}{z}}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}}+\\frac{1}{3 \\sqrt[3]{y}^2},\\frac{1}{2 \\sqrt{z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = sqrt((y/z))\nh = sqrt((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^5-y+z\\right)$, $g(x,y,z) = \\tan \\left(x^5-y\\right)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$-5 x^4 \\sin \\left(x^5-y+z\\right)-\\sec ^2\\left(x^5-y\\right)+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5-y+z)\ng = tan(x**5-y)\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\frac{7 x^2}{2}}-\\sin ^{-1}(4-7 x)$\n", - "Output Answer": [ - "$\\frac{7}{\\sqrt{1-(4-7 x)^2}}-7 e^{-\\frac{7 x^2}{2}} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-((7*x**2)/2))-asin(4-7*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = \\frac{1}{(y z)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{x^2}{\\sqrt[3]{x^3}^2}-\\frac{3 z}{2 (y z)^{5/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**3)\ng = (1/((y*z)**(3/2)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tanh ^{-1}(x y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n \\frac{y}{1-(x y+z)^2} & \\frac{x}{1-(x y+z)^2} & \\frac{1}{1-(x y+z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*z)\ng = tan(y)\nh = atanh(x*y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-z}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$-\\frac{1}{(x-z)^2}-\\frac{2}{y^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-z))\ng = (1/(y**2))\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(4-\\frac{11 x}{3}\\right)+\\cos (2-x)$\n", - "Output Answer": [ - "$-\\frac{121}{(12-11 x)^2}-\\cos (2-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4-((11*x)/3))+cos(2-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{1}{x+z}$", - "Output Answer": [ - "$\\frac{3 \\sqrt{y}}{2}-\\frac{1}{(x+z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = y**(3/2)\nh = (1/(x+z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^2$", - "Output Answer": [ - "$\\begin{cases}\n 20 i (x+4)-32 i & \\Im(x)<0 \\\\\n 32 i-20 i (x+4) & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**2\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(x)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\frac{3 y^2}{2 \\sqrt{y^3}} & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sqrt(y**3)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^2}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\sqrt{x^2}-\\sqrt{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**2)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\sqrt{y-x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y-x}}+\\frac{1}{x-z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = sqrt(y-x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{(x-y)^2}+4 y^3+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = y**4\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y)\ng = sin(y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y)))\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-y^2}}-\\frac{1}{z^2+1},\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = atan(z)\nh = atan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}},0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\frac{1}{y^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{y^3},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\{0,\\cos (z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2 \\left(\\frac{x^2}{y^2}+1\\right)},-\\frac{1}{y \\left(\\frac{x^2}{y^2}+1\\right)},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cos \\left(x^5\\right)$", - "Output Answer": [ - "$4 (x-1) \\sin (1)+(x-1)^3 \\left(50 \\cos (1)-\\frac{32 \\sin (1)}{3}\\right)+(x-1)^2 (10 \\sin (1)+12 \\cos (1))$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cos(x**5)\nseries = f.subs(x, g).series(x, 1, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(7-6 x)^2 \\tan ^{-1}(5 x+3)$\n", - "Output Answer": [ - "$(7-6 x) \\left(\\frac{7-6 x}{5 x^2+6 x+2}-12 \\tan ^{-1}(5 x+3)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((7-6*x)**2*atan(5*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (\\log (5 x-6))}{\\sqrt{7-2 x}}$\n", - "Output Answer": [ - "$\\frac{\\sin (\\log (5 x-6))+\\frac{5 (7-2 x) \\cos (\\log (5 x-6))}{5 x-6}}{(7-2 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(log(5*x-6)))/(sqrt(7-2*x))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x z^5}{y}}$", - "Output Answer": [ - "$-\\frac{x^2 z^{10}}{4 y^4 \\left(\\frac{x z^5}{y}\\right)^{3/2}}-\\frac{25 x^2 z^8}{4 y^2 \\left(\\frac{x z^5}{y}\\right)^{3/2}}-\\frac{z^{10}}{4 y^2 \\left(\\frac{x z^5}{y}\\right)^{3/2}}+\\frac{x z^5}{y^3 \\sqrt{\\frac{x z^5}{y}}}+\\frac{10 x z^3}{y \\sqrt{\\frac{x z^5}{y}}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x*z**5)/y))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(5 x^2+1\\right) \\sin (9 x+6)$\n", - "Output Answer": [ - "$9 \\left(5 x^2+1\\right) \\cos (9 x+6)+10 x \\sin (9 x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((5*x**2+1)*sin(9*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x y)$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{\\sqrt{1-x^2 y^2}} & -\\frac{x}{\\sqrt{1-x^2 y^2}} & 0 \\\\\n -\\frac{1}{x^2 y} & -\\frac{1}{x y^2} & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x*y)\ng = (1/(x*y))\nh = cos((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5 z\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 x^4 z}{\\sqrt{1-x^{10} z^2}} & 0 & -\\frac{x^5}{\\sqrt{1-x^{10} z^2}} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x**5*z)\ng = math.e**y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (-8 x-3) \\tan (8 x)$\n", - "Output Answer": [ - "$-\\frac{8 \\tan (8 x)}{8 x+3}-8 \\log (-8 x-3) \\sec ^2(8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(-8*x-3)*tan(8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\cos ^{-1}\\left(x^3+y+z\\right)$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-\\left(x^3+y+z\\right)^2}}-\\frac{2}{(y+z)^3},-y \\sin (y z),z \\sin (y z)-\\frac{3 x^2}{\\sqrt{1-\\left(x^3+y+z\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = acos(x**3+y+z)\nh = acos(x**3+y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{1}{y+z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & -\\frac{1}{(y+z)^2} & -\\frac{1}{(y+z)^2} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = (1/(y+z))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(7-\\frac{13 x^4}{2}\\right)+\\log \\left(\\frac{x}{2}-4\\right)$\n", - "Output Answer": [ - "$26 x^3 \\sin \\left(7-\\frac{13 x^4}{2}\\right)+\\frac{1}{x-8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(7-((13*x**4)/2))+log((x/2)-4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^4$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = y^4$", - "Output Answer": [ - "$4 (x-y)^3-\\frac{1}{x y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**4\ng = (1/(x*y))\nh = y**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & e^y & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = math.e**y\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos ^{-1}(z-y)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(z-y)^2}},-\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = acos(z-y)\nh = acos(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x+4} \\log \\left(7 x^4-1\\right)$\n", - "Output Answer": [ - "$e^{5 x+4} \\left(\\frac{28 x^3}{7 x^4-1}+5 \\log \\left(7 x^4-1\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x+4)*log(7*x**4-1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & 4 y^3 & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = y**4\nh = (1/(x**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\tan ^{-1}(y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\sinh (y) & 0 \\\\\n 0 & \\frac{z}{y^2 z^2+1} & \\frac{y}{y^2 z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = cosh(y)\nh = atan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 3 e^{z^3} z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = y\nh = math.e**(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\sqrt{\\frac{5}{2}} \\sqrt{-x}$\n", - "Output Answer": [ - "$-\\frac{7 \\sqrt{\\frac{5}{6}}}{20736}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt((5/2))*sqrt(-x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^4}{y^2}$", - "Output Answer": [ - "$\\frac{6 z^4}{y^4}+\\frac{12 z^2}{y^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**4)/(y**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2 y^2$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x y^2 & 2 x^2 y & 0 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2*y**2\ng = (z/x)\nh = -tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = z-x$, and $h(x,y,z) = y^3$", - "Output Answer": [ - "$\\left\\{3 y^2-1,0,\\frac{1}{\\sqrt{1-y^2}}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\sec ^2(x)-3 y^2 \\sin \\left(y^3\\right)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos(y**3)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{5}{2}-\\frac{13 x}{2}}+\\sin \\left(9 x+\\frac{9}{2}\\right)$\n", - "Output Answer": [ - "$9 \\cos \\left(9 x+\\frac{9}{2}\\right)-\\frac{13}{2 \\sqrt{10-26 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((5/2)-((13*x)/2))+sin(9*x+(9/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\tan \\left(y^3+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\sec ^2\\left(y^3+z\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = tan(y**3+z)\nh = tan(y**3+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(\\frac{7}{2}-\\frac{3 x}{2}\\right)^2}$\n", - "Output Answer": [ - "$\\frac{216}{(7-3 x)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(((7/2)-((3*x)/2))**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x+5}-\\cos \\left(\\frac{9}{2}-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{4} \\cos \\left(\\frac{3 (x-3)}{2}\\right)-\\frac{4}{(4 x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x+5)-cos((9/2)-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 y$, $g(x,y,z) = \\log \\left(x^3+y\\right)$, and $h(x,y,z) = \\frac{1}{\\left(x^3+y\\right)^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{2}{\\left(x^3+y\\right)^3},\\frac{6 x^2}{\\left(x^3+y\\right)^3},\\frac{3 x^2}{x^3+y}-x^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y\ng = log(x**3+y)\nh = log(x**3+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{15 x^2}{\\left(5-5 x^3\\right)^2+1}$\n", - "Output Answer": [ - "$-\\tan ^{-1}\\left(5 \\left(x^3-1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((15*x**2)/((5-5*x**3)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = \\tan \\left(x^4+z\\right)$, and $h(x,y,z) = -\\tanh ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 \\sin \\left(x^4\\right) & 0 & 0 \\\\\n 4 x^3 \\sec ^2\\left(x^4+z\\right) & 0 & \\sec ^2\\left(x^4+z\\right) \\\\\n 0 & -\\frac{1}{1-(y-z)^2} & \\frac{1}{1-(y-z)^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**4)\ng = tan(x**4+z)\nh = -atanh(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{x}{2}+\\frac{17}{2}} \\cos (8 x+9)$\n", - "Output Answer": [ - "$\\frac{\\cos (8 x+9)-16 (x+17) \\sin (8 x+9)}{2 \\sqrt{2} \\sqrt{x+17}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((x/2)+(17/2))*cos(8*x+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^2}}$, $g(x,y,z) = \\cosh \\left(x^2+z\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{x}{\\left(x^2\\right)^{3/2}} & 0 & 0 \\\\\n 2 x \\sinh \\left(x^2+z\\right) & 0 & \\sinh \\left(x^2+z\\right) \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x**2)))\ng = cosh(x**2+z)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(3 x^4+1\\right) \\tan \\left(2 x^2+4\\right)$\n", - "Output Answer": [ - "$-4 \\left(3 x^3 \\cos \\left(3 x^4+1\\right) \\tan \\left(2 \\left(x^2+2\\right)\\right)+x \\sin \\left(3 x^4+1\\right) \\sec ^2\\left(2 \\left(x^2+2\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(3*x**4+1)*tan(2*x**2+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}\\left(6-5 x^5\\right)+\\sin (1-3 x)$\n", - "Output Answer": [ - "$-\\frac{25 x^4}{\\left(6-5 x^5\\right)^2+1}-3 \\cos (1-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(6-5*x**5)+sin(1-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y-z)$, $g(x,y,z) = \\sin ^{-1}(x-y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\frac{1}{\\sqrt{1-(x-y)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y-z)\ng = asin(x-y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{z-y}$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(z-y)\ng = cbrt(z)\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$-\\frac{x^6}{720}+\\frac{x^4}{24}-\\frac{x^2}{2}+\\sqrt{x}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = \\sqrt[3]{x y}$", - "Output Answer": [ - "$1-\\sin (y+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y+z)\nh = cbrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(5-4 x^2\\right)-\\cos (6)$\n", - "Output Answer": [ - "$\\frac{8 x}{4 x^2-5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5-4*x**2)-cos(6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x+2)^5-10 (x+2)^4+40 (x+2)^3-81 (x+2)^2+84 (x+2)-36$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = x**2\nseries = f.subs(x, g).series(x, -2, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{3 \\sqrt[3]{y z}^2},0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$1024 x^3 \\left(4 x^4-1\\right)^3$\n", - "Output Answer": [ - "$4096 x^{16}-4096 x^{12}+1536 x^8-256 x^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1024*x**3*(4*x**4-1)**3\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(3 x^3+1\\right)$\n", - "Output Answer": [ - "$-\\frac{18 x \\left(18 x^6+3 x^3-2\\right)}{\\left(9 x^6+6 x^3+2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(3*x**3+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{\\tan (x+3)}{\\sqrt{8-x}}$\n", - "Output Answer": [ - "$\\frac{-3 \\tan (x+3)-4 (x-8) (2 (x-8) \\tan (x+3)-1) \\sec ^2(x+3)}{4 (8-x)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((tan(x+3))/(sqrt(8-x)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-5}+\\cos (1-5 x)$\n", - "Output Answer": [ - "$64 e^{-8 x-5}-25 \\cos (1-5 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-5)+cos(1-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^3$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$-3 (z-x)^2+\\frac{1}{\\sqrt{1-y^2}}+\\frac{3 \\sqrt{z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**3\ng = asin(y)\nh = z**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\sqrt{2 x+6}\\right) \\cos (3 x+5)$\n", - "Output Answer": [ - "$\\frac{\\cos (3 x+5)}{2 x+6}-3 \\log \\left(\\sqrt{2 x+6}\\right) \\sin (3 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(sqrt(2*x+6))*cos(3*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\sin (y)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = cos(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh ^{-1}(x y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{y}{\\sqrt{x^2 y^2+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asinh(x*y)\nh = asinh(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+1) \\left(\\tan ^2(1)-4\\right)+1-\\tan (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = x**5\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\frac{7 x}{2}$ on the interval $x = 2$ to $x = 10$\n", - "Output Answer": [ - "$4 \\sqrt{53}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((7*x)/2)\na = 2\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\frac{1}{x}+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = (y/x)\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{1}{(2 x+5)^2}-\\tan (5-4 x)$\n", - "Output Answer": [ - "$-\\frac{24}{(2 x+5)^4}-32 \\tan (5-4 x) \\sec ^2(5-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(1/((2*x+5)**2))-tan(5-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$-\\frac{1}{x^3}$\n", - "Output Answer": [ - "$21$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-(1/(x**3)))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = (x+y)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\frac{3 \\sqrt{x+y}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (x+y)**(3/2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt[3]{x^4}$", - "Output Answer": [ - "$\\frac{(x+4)^2}{8 \\sqrt[3]{2}}-\\frac{5 (x+4)}{2 \\sqrt[3]{2}}+3\\ 2^{2/3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = cbrt(x**4)\nseries = f.subs(x, g).series(x, -4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+\\cos (y)+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = sin(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x^4-8} \\cos \\left(2 x^2+6\\right)$\n", - "Output Answer": [ - "$-4 e^{-x^4-8} x \\left(\\sin \\left(2 \\left(x^2+3\\right)\\right)+x^2 \\cos \\left(2 \\left(x^2+3\\right)\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x**4-8)*cos(2*x**2+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x}{y^5}+z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{x}{y^5}+z}}{y^5},-\\frac{5 x e^{\\frac{x}{y^5}+z}}{y^6},e^{\\frac{x}{y^5}+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x/(y**5))+z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y-z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x+y-z$, and $h(x,y,z) = y+z$", - "Output Answer": [ - "$3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x+y-z\nh = y+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+z)\ng = sqrt(y)\nh = sqrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(z^2\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\left(z^2-x\\right)^5$", - "Output Answer": [ - "$\\left\\{0,5 \\left(z^2-x\\right)^4+2 z \\cos \\left(z^2\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z**2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = cos(y)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^{z-x}$", - "Output Answer": [ - "$e^{z-x}+\\frac{1}{2 \\sqrt{x}}+3 y^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**3\nh = math.e**(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = y+z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, -4, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4-\\frac{15 x}{2}}-e^{-\\frac{7 x}{2}-5}$\n", - "Output Answer": [ - "$\\frac{1}{4} e^{-\\frac{15 x}{2}-5} \\left(225 e^9-49 e^{4 x}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4-((15*x)/2))-math.e**(-((7*x)/2)-5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sinh \\left(x^2\\right)$", - "Output Answer": [ - "$(x+4) (\\sin (4)-8 \\cosh (16))+\\cos (4)+\\sinh (16)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sinh(x**2)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^5}}$, $g(x,y,z) = \\sqrt{y^5-x^5}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\frac{5 y^4}{2 \\sqrt{y^5-x^5}}-\\frac{5 x^4}{2 \\left(x^5\\right)^{3/2}}-\\frac{2}{z^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x**5)))\ng = sqrt(y**5-x**5)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(3 x^5-6\\right)-\\tan \\left(2 x^2+4\\right)$\n", - "Output Answer": [ - "$-\\frac{5 \\left(x^5+8\\right) x^3}{\\left(x^5-2\\right)^2}-4 \\left(8 x^2 \\tan \\left(2 \\left(x^2+2\\right)\\right)+1\\right) \\sec ^2\\left(2 \\left(x^2+2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x**5-6)-tan(2*x**2+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (x z) & 0 & x \\cos (x z) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x*z)\ng = cos(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-2 x-8}$\n", - "Output Answer": [ - "$-\\frac{1}{(-2 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-2*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = log((y/z))\nh = log((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-x+\\cos (7 x+4)+1$\n", - "Output Answer": [ - "$-7 \\sin (7 x+4)-1$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-x+cos(7*x+4)+1, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^5\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x+4) (1280 \\sin (1024) \\sec (4)-\\cos (1024) \\tan (4) \\sec (4))+\\cos (1024) \\sec (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**5)\ng = cos(x)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = x-y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x^3}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 x^3 \\sqrt{\\frac{z}{x^3}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/(x**3)))\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, $g(x,y,z) = \\sqrt[3]{x^3}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 x^2}{\\sqrt{1-x^6}} & 0 & 0 \\\\\n \\frac{x^2}{\\sqrt[3]{x^3}^2} & 0 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x**3)\ng = cbrt(x**3)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-x^4-3\\right)+\\tan (x+8)$\n", - "Output Answer": [ - "$\\frac{4 x^3}{x^4+3}+\\sec ^2(x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-x**4-3)+tan(x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y^3}$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{y^2}{\\sqrt[3]{y^3}^2} & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(y**3)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{20} z^{20}$, $g(x,y,z) = \\sqrt{y^5 z^5}$, and $h(x,y,z) = \\sin \\left(x y^5+z^5\\right)$", - "Output Answer": [ - "$\\left\\{5 x y^4 \\cos \\left(x y^5+z^5\\right)-\\frac{5 y^5 z^4}{2 \\sqrt{y^5 z^5}},20 y^{20} z^{19}-y^5 \\cos \\left(x y^5+z^5\\right),-20 y^{19} z^{20}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**20*z**20\ng = sqrt(y**5*z**5)\nh = sqrt(y**5*z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{\\cosh \\left(\\frac{z}{x}\\right)}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(z/x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\frac{4 x^5}{15}+2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-y}$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-y)\ng = asin(z)\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6-3 x^2}+e^{-5 x-9}$\n", - "Output Answer": [ - "$-\\frac{3 x}{\\sqrt{6-3 x^2}}-5 e^{-5 x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6-3*x**2)+math.e**(-5*x-9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (\\tan (1-2 x))-\\cos (3-3 x)$\n", - "Output Answer": [ - "$9 \\cos (3-3 x)-4 \\csc ^2(1-2 x)+4 \\sec ^2(1-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(tan(1-2*x))-cos(3-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = cos(y)\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = cbrt(y)\nh = x-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{1}{12} (6+\\pi ) (x-1)+\\frac{\\pi }{4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\sqrt{z (x+y)}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{x+y}{2 \\sqrt{z (x+y)}},0,\\frac{z}{2 \\sqrt{z (x+y)}}-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = sqrt(z*(x+y))\nh = sqrt(z*(x+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,e^x-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = math.e**x\nh = math.e**x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\sqrt{-9 x^2-6}\\right)-\\cos \\left(6 x^5+3\\right)$\n", - "Output Answer": [ - "$3 \\left(\\frac{2-3 x^2}{\\left(3 x^2+2\\right)^2}+40 x^3 \\sin \\left(6 x^5+3\\right)+300 x^8 \\cos \\left(6 x^5+3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(sqrt(-9*x**2-6))-cos(6*x**5+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2))\ng = cos(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z}{x^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{x^3},0,\\frac{1}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/(x**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{x-y}$", - "Output Answer": [ - "$\\frac{y}{2 \\sqrt{x y}}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = sqrt(y)\nh = sqrt(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$e^x+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cbrt(y)\nh = y-x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$-\\log (x)-\\tan (4 x)$\n", - "Output Answer": [ - "$-\\frac{2048}{15}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-log(x)-tan(4*x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-z$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\frac{1}{(x+z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & -1 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n -\\frac{3}{2 (x+z)^{5/2}} & 0 & -\\frac{3}{2 (x+z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-z\ng = sqrt(x)\nh = (1/((x+z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z/y)\ng = cbrt(y)\nh = atan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x^5+y\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 \\sec ^2\\left(x^5+y\\right) & \\sec ^2\\left(x^5+y\\right) & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x**5+y)\ng = tan(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\sec ^2\\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((y/z))\ng = y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = cbrt(y+z)\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$, $g(x,y,z) = x+y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$-\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)}+2 z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z/x)\ng = x+y\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{43}{5}-7 x\\right)-\\log \\left(2-\\frac{43 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{43}{10-43 x}+7 \\sin \\left(\\frac{43}{5}-7 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos((43/5)-7*x)-log(2-((43*x)/5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$5 x^4-2 y \\sin \\left(y^2\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = cos(y**2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{x}{2}+\\cos \\left(\\frac{7 x}{2}+\\frac{7}{2}\\right)-3$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(-7 \\sin \\left(\\frac{7 (x+1)}{2}\\right)-1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(x/2)+cos(((7*x)/2)+(7/2))-3, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-4 x-1)-\\log \\left(8-\\frac{x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{65 (8 x-63)}{(x-16)^2 (4 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x-1)-log(8-(x/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (7 x)$\n", - "Output Answer": [ - "$98 \\tan (7 x) \\sec ^2(7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{y}{x^2 \\sqrt{1-\\frac{y^2}{x^2}}} & -\\frac{1}{x \\sqrt{1-\\frac{y^2}{x^2}}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = asin(y)\nh = acos(y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{\\left(\\frac{y}{z}\\right)^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n 0 & -\\frac{3}{2 z \\left(\\frac{y}{z}\\right)^{5/2}} & \\frac{3 y}{2 z^2 \\left(\\frac{y}{z}\\right)^{5/2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = (1/((y/z)**(3/2)))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $x^2$", - "Output Answer": [ - "$(x+3)^3-8 (x+3)^2+21 (x+3)-18$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = x**2\nseries = f.subs(x, g).series(x, -3, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = -\\tan (x-y)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = y\nh = -tan(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$36 \\sqrt{2} (x-2)+16 \\sqrt{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^3$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$3 (x-y)^2+\\frac{1}{y^2+1}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**3\ng = atan(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tanh (x y)$", - "Output Answer": [ - "$\\left\\{x \\text{sech}^2(x y),-y \\text{sech}^2(x y),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x^4-y-z\\right)$", - "Output Answer": [ - "$-16 x^6 \\sin \\left(x^4-y-z\\right)-2 \\sin \\left(x^4-y-z\\right)+12 x^2 \\cos \\left(x^4-y-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**4-y-z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{y^4}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{4 y^3}{z^4} & -\\frac{4 y^4}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = cos(y)\nh = ((y**4)/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4 y-z$, $g(x,y,z) = \\sqrt{x^4}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 y & x^4 & -1 \\\\\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4*y-z\ng = sqrt(x**4)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = \\frac{1}{\\left(\\frac{y}{z}\\right)^{3/2}}$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z}-\\frac{3 y}{2 z^2 \\left(\\frac{y}{z}\\right)^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5)\ng = (1/((y/z)**(3/2)))\nh = (1/((y/z)**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y*z)\ng = cos(x+y)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (\\tan (8-8 x))$\n", - "Output Answer": [ - "$-64 \\sec ^2(8-8 x) \\left(\\sec ^2(8-8 x) \\sin (\\tan (8-8 x))-2 \\tan (8-8 x) \\cos (\\tan (8-8 x))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(tan(8-8*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{(x+2) \\left(-1-5 \\tan ^{-1}(2)\\right)}{5 e^2 \\tan ^{-1}(2)^2}-\\frac{1}{e^2 \\tan ^{-1}(2)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = atan(x)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = e^{x^3}$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$(x-1) (3 e+\\sin (1))+e-\\cos (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**(x**3)\ng = cos(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(5 x+4) \\cos (3 x+5)$\n", - "Output Answer": [ - "$\\frac{5 \\cos (3 x+5)}{\\sqrt{1-(5 x+4)^2}}-3 \\sin ^{-1}(5 x+4) \\sin (3 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(5*x+4)*cos(3*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{23 (x-1)}{12}+\\frac{1}{x-1}+\\frac{5}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = log(x)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x-2}+\\log (5 x+1)$\n", - "Output Answer": [ - "$4 e^{2 x-2}-\\frac{25}{(5 x+1)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x-2)+log(5*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-\\frac{17 x}{5}-\\frac{27}{5}}-(-7 x-2)^5$\n", - "Output Answer": [ - "$35 (7 x+2)^4-\\frac{17}{10 \\sqrt{-\\frac{17 x}{5}-\\frac{27}{5}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-((17*x)/5)-(27/5))-(-7*x-2)**5, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = x y-z$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$3 x-y \\sin (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = x*y-z\nh = cos(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-1,0,x \\left(-e^{x y}\\right)-1\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (5 x-2)+\\cos ^{-1}(7-4 x)$\n", - "Output Answer": [ - "$-\\frac{16 (7-4 x)}{\\left(1-(7-4 x)^2\\right)^{3/2}}-\\frac{25}{(2-5 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5*x-2)+acos(7-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x^2+8}-\\cos \\left(7-6 x^5\\right)$\n", - "Output Answer": [ - "$16 e^{8 x^2+8} x-30 x^4 \\sin \\left(7-6 x^5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x**2+8)-cos(7-6*x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sqrt[3]{x^4}$", - "Output Answer": [ - "$\\frac{61 (x+1)^2}{18 e}+\\frac{7 (x+1)}{3 e}+\\frac{1}{e}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = cbrt(x**4)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = \\sqrt{x^3}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-z^2}},\\frac{3 x^2}{2 \\sqrt{x^3}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = sqrt(x**3)\nh = sqrt(x**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 x}{2 (x y)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y)**(3/2)))\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x^5+8}-\\frac{1}{\\left(-3 x-\\frac{17}{2}\\right)^2}$\n", - "Output Answer": [ - "$40 e^{8 x^5+8} x^4+\\frac{48}{(6 x+17)^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x**5+8)-(1/((-3*x-(17/2))**2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x+8}-\\sqrt{-6 x-2}$\n", - "Output Answer": [ - "$\\frac{9}{(-6 x-2)^{3/2}}-\\frac{16}{(8 x+8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x+8)-sqrt(-6*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y}+z^4\\right)^4$", - "Output Answer": [ - "$\\frac{12 x^2 \\left(\\frac{x}{y}+z^4\\right)^2}{y^4}+\\frac{8 x \\left(\\frac{x}{y}+z^4\\right)^3}{y^3}+\\frac{12 \\left(\\frac{x}{y}+z^4\\right)^2}{y^2}+192 z^6 \\left(\\frac{x}{y}+z^4\\right)^2+48 z^2 \\left(\\frac{x}{y}+z^4\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/y)+z**4)**4\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(\\frac{z^4}{y}\\right)$", - "Output Answer": [ - "$\\frac{1}{y^2}-\\frac{4}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((z**4)/y))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z}-\\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/x))\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{z^5}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/(z**5)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{5 \\sqrt{\\frac{3}{2}} x}{\\sqrt{5 x^2+1}}$\n", - "Output Answer": [ - "$\\sqrt{\\frac{3}{2}} \\sqrt{5 x^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((5*sqrt((3/2))*x)/(sqrt(5*x**2+1)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(8 x^4+6\\right)$\n", - "Output Answer": [ - "$\\frac{32 x^2 \\left(320 x^8+96 x^4-111\\right)}{\\left(64 x^8+96 x^4+37\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(8*x**4+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\frac{11 x}{2}+\\frac{15}{2}\\right)+\\sin ^{-1}\\left(7-\\frac{x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{11}{11 x+15}-\\frac{1}{\\sqrt{-x^2+28 x-192}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(((11*x)/2)+(15/2))+asin(7-(x/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{x^3}{z}\\right)^{3/2}$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},-\\frac{3 x^3 \\sqrt{\\frac{x^3}{z}}}{2 z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**3)/z)**(3/2)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = (x-y)^{3/2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{3 \\sqrt{x-y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = (x-y)**(3/2)\nh = (x-y)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = \\cos ^{-1}\\left(x^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & z e^{y z} & y e^{y z} \\\\\n -\\frac{5 x^4}{\\sqrt{1-x^{10}}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = math.e**(y*z)\nh = acos(x**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^5\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-3) \\left(\\sin (3) \\left(405+405 \\tan ^2(243)\\right)+\\cos (3) \\tan (243)\\right)+\\sin (3) \\tan (243)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**5)\ng = sin(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\{0,\\sin (x),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n e^{x+y} & e^{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = cbrt(y)\nh = math.e**(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (3-7 x) \\tan (9-x)$\n", - "Output Answer": [ - "$\\sec ^2(9-x) \\left(\\frac{14}{3-7 x}+2 \\log (3-7 x) \\tan (9-x)\\right)-\\frac{49 \\tan (9-x)}{(3-7 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3-7*x)*tan(9-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n -\\frac{1}{2 (x+y)^{3/2}} & -\\frac{1}{2 (x+y)^{3/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = (1/(sqrt(x+y)))\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$1-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(y)))\nh = sqrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z (x-y)$", - "Output Answer": [ - "$\\{-z,-z,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6 x-7}+\\sin (1-7 x)$\n", - "Output Answer": [ - "$\\frac{3}{\\sqrt{6 x-7}}-7 \\cos (1-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6*x-7)+sin(1-7*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$40 e^{8 x^5+5} x^4$\n", - "Output Answer": [ - "$e^{8 x^5+5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 40*math.e**(8*x**5+5)*x**4\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{x^2}{y^6}$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$-\\frac{6 x^2}{y^7}+\\sec ^2(x)+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = ((x**2)/(y**6))\nh = log(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{y^4}$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z \\sqrt{\\frac{x^2}{z^2}+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = sqrt(y**4)\nh = sqrt(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$(x-3)^2 \\left(\\frac{15}{2}+9 \\log (3)\\right)+(x-3) (9+27 \\log (3))+27 \\log (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = log(x)\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^4$, $g(x,y,z) = y z$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{-y,4 z^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**4\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(3-\\frac{11 x^4}{2}\\right)+e^{3 x+1}$\n", - "Output Answer": [ - "$3 e^{3 x+1}-22 x^3 \\sec ^2\\left(3-\\frac{11 x^4}{2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(3-((11*x**4)/2))+math.e**(3*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2 z^2$, $g(x,y,z) = \\frac{1}{x+y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$2 x z^2-\\frac{1}{(x+y)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2*z**2\ng = (1/(x+y))\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$3 y^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = y**3\nh = sin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{11 x}{2}-\\frac{5}{2}}-\\sin \\left(x+\\frac{9}{2}\\right)$\n", - "Output Answer": [ - "$\\sin \\left(x+\\frac{9}{2}\\right)-\\frac{121}{16 \\left(\\frac{11 x}{2}-\\frac{5}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((11*x)/2)-(5/2))-sin(x+(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\log (x z)$, and $h(x,y,z) = (x-z)^{3/2}$", - "Output Answer": [ - "$-\\frac{3 \\sqrt{x-z}}{2}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = log(x*z)\nh = (x-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y^2}$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{3 x^2 \\sqrt[3]{\\frac{z}{x}}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y**2)\nh = sqrt(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(x-y^4+z\\right)^2}$", - "Output Answer": [ - "$\\frac{96 y^6}{\\left(x-y^4+z\\right)^4}+\\frac{24 y^2}{\\left(x-y^4+z\\right)^3}+\\frac{12}{\\left(x-y^4+z\\right)^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x-y**4+z)**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt[3]{x+z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+\\frac{1}{3 \\sqrt[3]{x}^2}+2 y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y**2\nh = cbrt(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5+y$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 1 & 0 \\\\\n 0 & \\text{sech}^2(y) & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5+y\ng = tanh(y)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(7-\\frac{11 x}{2}\\right)^5}-\\sqrt{\\frac{15 x}{2}+\\frac{15}{2}}$\n", - "Output Answer": [ - "$\\frac{1}{4} \\left(\\frac{7040}{(14-11 x)^6}-\\frac{\\sqrt{30}}{\\sqrt{x+1}}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((7-((11*x)/2))**5))-sqrt(((15*x)/2)+(15/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{y}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = x+y$, and $h(x,y,z) = e^{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{y}{x}}}{x},\\frac{y e^{\\frac{y}{x}}}{x^2},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{(3 x-2)^2}{\\sqrt{7 x+1}}$\n", - "Output Answer": [ - "$\\frac{3 \\left(441 x^2+364 x+332\\right)}{4 (7 x+1)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (((3*x-2)**2)/(sqrt(7*x+1)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$-\\sin (x)+\\frac{1}{y^2+1}+\\sinh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = atan(y)\nh = cosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}\\left(4 x^4+2\\right)-\\tan (2-4 x)$\n", - "Output Answer": [ - "$\\frac{16 x^3}{\\sqrt{1-4 \\left(2 x^4+1\\right)^2}}+4 \\sec ^2(2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(4*x**4+2)-tan(2-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-x-3}-\\frac{1}{\\left(3-x^3\\right)^3}$\n", - "Output Answer": [ - "$-\\frac{9 x^2}{\\left(x^3-3\\right)^4}-e^{-x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-x-3)-(1/((3-x**3)**3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-7 x-2}+\\sqrt{-\\sin (4 x+1)}$\n", - "Output Answer": [ - "$49 e^{-7 x-2}-8 \\sqrt{-\\sin (4 x+1)}-4 \\sqrt{-\\sin (4 x+1)} \\cot ^2(4 x+1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-7*x-2)+sqrt(-sin(4*x+1))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(2-4 x^5\\right)$\n", - "Output Answer": [ - "$80 x^3 \\left(1-10 x^5 \\tan \\left(2-4 x^5\\right)\\right) \\sec ^2\\left(2-4 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2-4*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3-9 x}$\n", - "Output Answer": [ - "$81 e^{3-9 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(4 x-3)^4 \\log (8-3 x)$\n", - "Output Answer": [ - "$\\frac{3 (3-4 x)^2 \\left(336 x^2-1240 x+64 (8-3 x)^2 \\log (8-3 x)+741\\right)}{(8-3 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (4*x-3)**4*log(8-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{17}{2}\\right)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((17/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = y-x$", - "Output Answer": [ - "$\\{1,1,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh \\left(z^4\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = (x-y)^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 4 z^3 \\cosh \\left(z^4\\right) \\\\\n 0 & -\\sin (y) & 0 \\\\\n 2 (x-y) & -2 (x-y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(z**4)\ng = cos(y)\nh = (x-y)**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$7 x+\\frac{1}{3-6 x}+4$\n", - "Output Answer": [ - "$\\frac{72}{(3-6 x)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 7*x+(1/(3-6*x))+4\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$-\\frac{1}{32 x^{15}}$\n", - "Output Answer": [ - "$-\\frac{15}{524288}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-(1/(32*x**15)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n \\frac{\\sec ^2\\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\sec ^2\\left(\\frac{x}{z}\\right)}{z^2} \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = tan((x/z))\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{9 x+5}-\\tan \\left(5-8 x^5\\right)$\n", - "Output Answer": [ - "$-160 x^3 \\left(20 x^5 \\tan \\left(5-8 x^5\\right)-1\\right) \\sec ^2\\left(5-8 x^5\\right)-\\frac{81}{4 (9 x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(9*x+5)-tan(5-8*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = (1/(sqrt(y)))\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{0,-z,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(y+z^3\\right)$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-\\left(y+z^3\\right)^2}},-\\frac{3 z^2}{\\sqrt{1-\\left(y+z^3\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y+z**3)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = \\frac{x}{z}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{z^2},\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2},\\frac{1}{z}-x \\cos (x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = (x/z)\nh = (x/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = atanh(y)\nh = atanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+y}^2}+\\frac{1}{3 \\sqrt[3]{y}^2}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = cbrt(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = (z-x)^5$", - "Output Answer": [ - "$\\frac{\\sinh \\left(\\frac{y}{x}\\right)}{x}+5 (z-x)^4+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(y/x)\nh = (z-x)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(8-6 x^2\\right)+\\cos (4-9 x)$\n", - "Output Answer": [ - "$\\frac{6 x}{3 x^2-4}+9 \\sin (4-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8-6*x**2)+cos(4-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin \\left(x^5+z\\right)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$5 x^4+y e^{y z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sin(x**5+z)\nh = math.e**(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}(8 x+7)-\\cos (1-3 x)$\n", - "Output Answer": [ - "$9 \\cos (1-3 x)-\\frac{128 (8 x+7)}{\\left((8 x+7)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(8*x+7)-cos(1-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y^2}\\right)$, and $h(x,y,z) = \\sqrt{x y^2}$", - "Output Answer": [ - "$\\frac{2 x \\sin \\left(\\frac{x}{y^2}\\right)}{y^3}+\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cos((x/(y**2)))\nh = sqrt(x*y**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cosh \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),-\\frac{y \\sinh \\left(\\frac{y}{x}\\right)}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cosh(y/x)\nh = cosh(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\sin \\left(\\frac{y}{z^5}\\right)$, and $h(x,y,z) = \\sinh ^{-1}\\left(x z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & \\frac{\\cos \\left(\\frac{y}{z^5}\\right)}{z^5} & -\\frac{5 y \\cos \\left(\\frac{y}{z^5}\\right)}{z^6} \\\\\n \\frac{z^5}{\\sqrt{x^2 z^{10}+1}} & 0 & \\frac{5 x z^4}{\\sqrt{x^2 z^{10}+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y)))\ng = sin((y/(z**5)))\nh = asinh(x*z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x-5) (10 \\text{sech}(5)-25 \\tanh (5) \\text{sech}(5))+25 \\text{sech}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = cosh(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y)\ng = cbrt(y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5 z\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{5 x^4 z}{\\sqrt{1-x^{10} z^2}},0,-\\frac{x^5}{\\sqrt{1-x^{10} z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**5*z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (4-4 x) \\tan \\left(\\sqrt{3 x-4}\\right)$\n", - "Output Answer": [ - "$4 \\cos (4-4 x) \\tan \\left(\\sqrt{3 x-4}\\right)-\\frac{3 \\sin (4-4 x) \\sec ^2\\left(\\sqrt{3 x-4}\\right)}{2 \\sqrt{3 x-4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(4-4*x)*tan(sqrt(3*x-4)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x^3}{y^5 z}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x^2}{2 y^5 z \\sqrt{\\frac{x^3}{y^5 z}}},-\\frac{5 x^3}{2 y^6 z \\sqrt{\\frac{x^3}{y^5 z}}},-\\frac{x^3}{2 y^5 z^2 \\sqrt{\\frac{x^3}{y^5 z}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x**3)/(y**5*z)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{x-y}{z}$", - "Output Answer": [ - "$-\\frac{2}{x^3}-\\frac{x-y}{z^2}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = log(y)\nh = ((x-y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$\\frac{\\pi }{2}-2 x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = sinh(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^2-x}$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{1}{3 \\sqrt[3]{y^2-x}^2}-2 y \\sin \\left(y^2\\right)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**2-x)\ng = cos(y**2)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -e^{y-x} & e^{y-x} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y-x)\ng = asin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y-x^5$, $g(x,y,z) = \\cos ^{-1}\\left(z \\left(x^5-y\\right)\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -5 x^4 & 1 & 0 \\\\\n -\\frac{5 x^4 z}{\\sqrt{1-z^2 \\left(x^5-y\\right)^2}} & \\frac{z}{\\sqrt{1-z^2 \\left(x^5-y\\right)^2}} & -\\frac{x^5-y}{\\sqrt{1-z^2 \\left(x^5-y\\right)^2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y-x**5\ng = acos(z*(x**5-y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{200 x^4}{9 \\left(5 x^5-6\\right)^3}-\\frac{6 x^2}{\\sqrt{5-4 x^3}}$\n", - "Output Answer": [ - "$\\sqrt{5-4 x^3}-\\frac{4}{9 \\left(5 x^5-6\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((200*x**4)/(9*(5*x**5-6)**3))-((6*x**2)/(sqrt(5-4*x**3)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(7-9 x^4\\right)$\n", - "Output Answer": [ - "$-\\frac{108 x^2 \\left(135 x^8-42 x^4-50\\right)}{\\left(81 x^8-126 x^4+50\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(7-9*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = e^{x^5}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,5 e^{x^5} x^4\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5)\ng = math.e**(x**5)\nh = math.e**(x**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\sqrt[3]{x+y^5}$, and $h(x,y,z) = x y^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n \\frac{1}{3 \\sqrt[3]{x+y^5}^2} & \\frac{5 y^4}{3 \\sqrt[3]{x+y^5}^2} & 0 \\\\\n y^5 & 5 x y^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z/x)\ng = cbrt(x+y**5)\nh = x*y**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x^{20}$ and $g(x) = $x^5$", - "Output Answer": [ - "$-167403915 (x+3)^2+71744535 (x+3)-14348907$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**20\ng = x**5\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin (x z)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sin(x*z)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = x-y-z$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}+\\frac{1}{z^2+1}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = x-y-z\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^3 \\left(x+y^5\\right)^3$", - "Output Answer": [ - "$150 y^8 z^3 \\left(x+y^5\\right)+60 y^3 z^3 \\left(x+y^5\\right)^2+6 z^3 \\left(x+y^5\\right)+6 z \\left(x+y^5\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3*(x+y**5)**3\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cosh ^{-1}\\left(y-x^5\\right)$", - "Output Answer": [ - "$\\frac{5 x^4}{3 \\sqrt[3]{x^5}^2}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5)\ng = math.e**y\nh = acosh(y-x**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{x}{y^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{y^5} & -\\frac{5 x}{y^6} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (x/(y**5))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = e^{\\frac{x}{y z^2}}$, and $h(x,y,z) = e^{z^2}$", - "Output Answer": [ - "$\\left\\{\\frac{2 x e^{\\frac{x}{y z^2}}}{y z^3},0,\\frac{e^{\\frac{x}{y z^2}}}{y z^2}-1\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = math.e**(x/(y*z**2))\nh = math.e**(x/(y*z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = x-y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = x-y\nh = x-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (4-2 x)+\\tan (5 x+2)$\n", - "Output Answer": [ - "$5 \\sec ^2(5 x+2)-2 \\cos (4-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4-2*x)+tan(5*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^3$, $g(x,y,z) = x y$, and $h(x,y,z) = \\frac{1}{z-y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(z-y)^2},3 (y+z)^2,y-3 (y+z)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**3\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = math.e**z\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 y^3$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$3 x^2 y^3-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y**3\ng = acos(x)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+z)\ng = asin(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = x^{25}$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+4) (7036874417766400-\\cos (4))-1125899906842624+\\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**25\ng = sin(x)\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\sqrt{7 x+2}}-\\cos (5 x+8)$\n", - "Output Answer": [ - "$\\frac{49 e^{\\sqrt{7 x+2}} \\left(\\sqrt{7 x+2}-1\\right)}{4 (7 x+2)^{3/2}}+25 \\cos (5 x+8)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(sqrt(7*x+2))-cos(5*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (2 x-1)}{\\sqrt{-5 x-4}}$\n", - "Output Answer": [ - "$\\frac{\\frac{20 x+16}{1-2 x}+5 \\log (2 x-1)}{2 (-5 x-4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(2*x-1))/(sqrt(-5*x-4))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(\\frac{x}{y}-z\\right)^{3/2}$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{\\frac{x}{3 z^2 \\sqrt[3]{\\frac{x}{z}}^2},-\\frac{3}{2} \\sqrt{\\frac{x}{y}-z},\\frac{3 x \\sqrt{\\frac{x}{y}-z}}{2 y^2}+\\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/y)-z)**(3/2)\ng = cbrt(x/z)\nh = cbrt(x/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-x}$, $g(x,y,z) = \\log (y-x)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2},\\frac{1}{2 \\sqrt{z-x}},-\\frac{1}{y-x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-x)\ng = log(y-x)\nh = log(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\tan \\left(x^3-y\\right)$, and $h(x,y,z) = \\cos \\left(x^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 3 x^2 \\sec ^2\\left(x^3-y\\right) & -\\sec ^2\\left(x^3-y\\right) & 0 \\\\\n -3 x^2 \\sin \\left(x^3\\right) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = tan(x**3-y)\nh = cos(x**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$\\frac{1}{y}-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(y)\nh = sqrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = math.e**y\nh = tan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x y^4 z\\right)$", - "Output Answer": [ - "$-\\frac{1}{x^2}-\\frac{4}{y^2}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y**4*z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x^2+1}}+\\cos (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = y\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-y^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (8-x)-\\sin (1)$\n", - "Output Answer": [ - "$-2 \\tan (8-x) \\sec ^2(8-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(8-x)-sin(1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = \\tanh \\left(x^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -4 x^3 \\sin \\left(x^4\\right) & 0 & 0 \\\\\n 0 & 4 y^3 \\sec ^2\\left(y^4\\right) & 0 \\\\\n 4 x^3 \\text{sech}^2\\left(x^4\\right) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**4)\ng = tan(y**4)\nh = tanh(x**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sinh (x+z)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\{z-\\cosh (x+z),0,\\cosh (x+z)\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sinh(x+z)\nh = sinh(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\frac{23}{3}-\\frac{4 x}{3}\\right)-\\tan \\left(\\frac{22 x}{3}+\\frac{14}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{2}{3} \\left(2 \\sec ^2\\left(\\frac{1}{3} (23-4 x)\\right)+11 \\sec ^2\\left(\\frac{2}{3} (11 x+7)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan((23/3)-((4*x)/3))-tan(((22*x)/3)+(14/3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = x^5 y^5$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$5 x^5 y^4-\\frac{1}{2 x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = x**5*y**5\nh = cos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$z-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = y*z\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-y$, $g(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y},0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-y\ng = tan((z/y))\nh = tan((z/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\sin (y)+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cos(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = -\\tan \\left(y-z^4\\right)$", - "Output Answer": [ - "$12 z^2 \\sec ^2\\left(y-z^4\\right)-32 z^6 \\tan \\left(y-z^4\\right) \\sec ^2\\left(y-z^4\\right)-2 \\tan \\left(y-z^4\\right) \\sec ^2\\left(y-z^4\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(y-z**4)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = tan(y)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$y e^{x y}+\\sec ^2(y)-\\frac{2}{z^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = tan(y)\nh = (1/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y-z}$, $g(x,y,z) = \\frac{1}{\\left(\\frac{y}{z}\\right)^{3/2}}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^{y-z} & -e^{y-z} \\\\\n 0 & -\\frac{3}{2 z \\left(\\frac{y}{z}\\right)^{5/2}} & \\frac{3 y}{2 z^2 \\left(\\frac{y}{z}\\right)^{5/2}} \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y-z)\ng = (1/((y/z)**(3/2)))\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4 z}{y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{4 x^3 z}{y}+\\frac{1}{2 \\sqrt{y}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4*z)/y)\ng = sqrt(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(x-y^5+z\\right)$", - "Output Answer": [ - "$-20 y^3 \\sinh \\left(x-y^5+z\\right)+25 y^8 \\cosh \\left(x-y^5+z\\right)+2 \\cosh \\left(x-y^5+z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x-y**5+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{x}-\\sin (y)-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cos(y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(\\frac{y}{z}\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(y/z)\ng = atan(y)\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^{x+y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = math.e**(x+y)\nh = math.e**(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = \\log (x y)$", - "Output Answer": [ - "$e^{y+z}-\\frac{1}{x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = math.e**(y+z)\nh = log(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\cosh \\left(\\frac{z}{y^3}\\right)$, and $h(x,y,z) = \\sqrt{\\frac{x}{y^3}+z}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 x}{2 y^4 \\sqrt{\\frac{x}{y^3}+z}}-\\frac{\\sinh \\left(\\frac{z}{y^3}\\right)}{y^3},\\frac{1}{z}-\\frac{1}{2 y^3 \\sqrt{\\frac{x}{y^3}+z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = cosh(z/(y**3))\nh = cosh(z/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the sixth term in the series expansion of the following function around 6:\n\n$\\log (-3 x)$\n", - "Output Answer": [ - "$-\\frac{1}{4374}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(-3*x))\nseries = f.series(x, 6, None)\nfor i, term in enumerate(series):\n if i == 6: print(term)\n elif i > 6: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\cos (3 x)+\\cos (5 x)$\n", - "Output Answer": [ - "$-\\frac{81 \\sin (3)}{40}-\\frac{625 \\sin (5)}{24}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(3*x)+cos(5*x))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+y-z)$, $g(x,y,z) = x^2$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+y-z)^2}}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+y-z)\ng = x**2\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(y-x)$", - "Output Answer": [ - "$\\frac{\\cosh \\left(\\frac{x}{z}\\right)}{z}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x/z)\ng = tan(y)\nh = acos(y-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(-6 x^3-5\\right)+(-x-1)^5$\n", - "Output Answer": [ - "$\\frac{18 x^2}{\\sqrt{1-\\left(-6 x^3-5\\right)^2}}-5 (x+1)^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(-6*x**3-5)+(-x-1)**5, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(6 x^3-7\\right)$\n", - "Output Answer": [ - "$-\\frac{36 x \\left(3 x^3+7\\right)}{\\left(7-6 x^3\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6*x**3-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(8 x-7)$\n", - "Output Answer": [ - "$\\frac{7-8 x}{\\left(-4 x^2+7 x-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(8*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x+z^4\\right)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin \\left(x+y^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2\\left(x+z^4\\right) & 0 & 4 z^3 \\sec ^2\\left(x+z^4\\right) \\\\\n 0 & 4 y^3 & 0 \\\\\n \\cos \\left(x+y^4\\right) & 4 y^3 \\cos \\left(x+y^4\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+z**4)\ng = y**4\nh = sin(x+y**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^2+z\\right)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{2 x}{\\left(x^2+z\\right)^2+1}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**2+z)\ng = cbrt(z)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\sec ^2(x)-\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = log(y)\nh = sin((y/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{85 x^4}{17 x^5+13}$\n", - "Output Answer": [ - "$\\log \\left(17 x^5+13\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((85*x**4)/(17*x**5+13))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{2}{15 \\log (2-7 x)}$\n", - "Output Answer": [ - "$\\frac{14}{15 (2-7 x) \\log ^2(2-7 x)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2/(15*log(2-7*x))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{z^5}{x}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z^5 \\sin \\left(\\frac{z^5}{x}\\right)}{x^2},0,-\\frac{5 z^4 \\sin \\left(\\frac{z^5}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((z**5)/x))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{3}{2 (x+y)^{5/2}}+\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = (1/((x+y)**(3/2)))\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^4}{y}$\n", - "Output Answer": [ - "$\\left\\{\\frac{4 x^3}{y},-\\frac{x^4}{y^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/y)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(8-6 x)^2+\\frac{1}{8-4 x}$\n", - "Output Answer": [ - "$72 x+\\frac{1}{4 (x-2)^2}-96$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((8-6*x)**2+(1/(8-4*x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$2 x \\left(\\frac{12 x}{8 x^3-7}+e^{x^2-7}\\right)$\n", - "Output Answer": [ - "$e^{x^2-7}+\\log \\left(7-8 x^3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 2*x*(((12*x)/(8*x**3-7))+math.e**(x**2-7))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = \\frac{1}{\\sqrt{x y-z}}$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\frac{3}{2} x \\sqrt{x z}-\\frac{x}{2 (x y-z)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = (1/(sqrt(x*y-z)))\nh = (x*z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(y**2))\ng = sqrt(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x-z)$, $g(x,y,z) = \\sinh ^{-1}(x y)$, and $h(x,y,z) = \\left(\\frac{y}{z}\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x-z) & 0 & -\\cos (x-z) \\\\\n \\frac{y}{\\sqrt{x^2 y^2+1}} & \\frac{x}{\\sqrt{x^2 y^2+1}} & 0 \\\\\n 0 & \\frac{3 \\sqrt{\\frac{y}{z}}}{2 z} & -\\frac{3 y \\sqrt{\\frac{y}{z}}}{2 z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x-z)\ng = asinh(x*y)\nh = (y/z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\frac{x^4}{z^4}$", - "Output Answer": [ - "$\\left\\{0,\\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2}-\\frac{4 x^3}{z^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/z))\ng = atanh(y)\nh = atanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $x$", - "Output Answer": [ - "$\\log \\left(x^2\\right)-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = x\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-2 x^2-2}+6 x$\n", - "Output Answer": [ - "$6-4 e^{-2 \\left(x^2+1\\right)} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-2*x**2-2)+6*x, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-z)^{3/2}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3 \\sqrt{x-z}}{2}-\\frac{1}{y^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-z)**(3/2)\ng = (1/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6 x-8}-\\sin (4-4 x)$\n", - "Output Answer": [ - "$36 e^{6 x-8}+16 \\sin (4-4 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6*x-8)-sin(4-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$y \\sec ^2(x y)+\\cos (y)+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = sin(y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = (1/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\sin (x+y)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = z**3\nh = sin(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x-z} & 0 & -e^{x-z} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x-z)\ng = tan(y)\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log (x+4)-\\tan (6-5 x)$\n", - "Output Answer": [ - "$\\frac{1}{(x+4)^2}-50 \\tan (6-5 x) \\sec ^2(6-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(x+4)-tan(6-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x^4+2}$\n", - "Output Answer": [ - "$36 e^{3 x^4+2} \\left(4 x^6+x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x**4+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = asin(y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-\\frac{42 x}{5}}-\\tan \\left(\\frac{11}{5}-\\frac{3 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{3}{5} \\sec ^2\\left(\\frac{1}{5} (11-3 x)\\right)-\\frac{21}{5 \\sqrt{1-\\frac{42 x}{5}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-((42*x)/5))-tan((11/5)-((3*x)/5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4)-\\cos \\left(3-2 x^2\\right)$\n", - "Output Answer": [ - "$-4 x \\sin \\left(3-2 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4)-cos(3-2*x**2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x+\\frac{11}{2}}+\\tan \\left(\\frac{3 x}{2}+7\\right)$\n", - "Output Answer": [ - "$7 e^{7 x+\\frac{11}{2}}+\\frac{3}{2} \\sec ^2\\left(\\frac{3 x}{2}+7\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x+(11/2))+tan(((3*x)/2)+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$3 x^2+\\frac{x}{2 \\sqrt{x z}}+\\sinh (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = cosh(y)\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x+z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{x+z-1} \\sqrt{x+z+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x+z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^3\\right)$ and $g(x) = $\\cos ^{-1}(x)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**3)\ng = acos(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-2 x^3}+\\sqrt{-3 x-3}$\n", - "Output Answer": [ - "$-6 e^{8-2 x^3} x^2-\\frac{3}{2 \\sqrt{-3 x-3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-2*x**3)+sqrt(-3*x-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{0,-z,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x+4)^2 \\left(640-\\tanh ^3(4)+\\tanh (4)\\right)+(x+4) \\left(-1279-\\tanh ^2(4)\\right)+1024-\\tanh (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = x**5\nseries = f.subs(x, g).series(x, -4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{44}{5}-\\frac{21 x}{5}\\right)^2$\n", - "Output Answer": [ - "$\\frac{882}{25}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((44/5)-((21*x)/5))**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x+y}{z}\\right)$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2},\\frac{(x+y) \\sin \\left(\\frac{x+y}{z}\\right)}{z^2},\\frac{\\sin \\left(\\frac{x+y}{z}\\right)}{z}+\\frac{3 \\sqrt{x}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((x+y)/z))\ng = x**(3/2)\nh = x**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sqrt{5} \\sqrt{-x} x$ on the interval $x = 3$ to $x = 9$\n", - "Output Answer": [ - "$-\\frac{1}{135} i \\left(131 \\sqrt{131}-401 \\sqrt{401}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sqrt(5)*sqrt(-x)*x\na = 3\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\cos (y-z) & \\cos (y-z) \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = -sin(y-z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-5 x-2)^3 \\tan \\left(6-3 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{3}{2} (5 x+2)^2 \\left(6 x^2 (5 x+2)-5 \\sin \\left(12-6 x^3\\right)\\right) \\sec ^2\\left(6-3 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-5*x-2)**3*tan(6-3*x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\frac{\\pi x^5}{15}-\\frac{x^4}{2}+\\frac{\\pi x^3}{6}-x^2+\\frac{\\pi x}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x y}{z}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y \\cos \\left(\\frac{x y}{z}\\right)}{z} & \\frac{x \\cos \\left(\\frac{x y}{z}\\right)}{z} & -\\frac{x y \\cos \\left(\\frac{x y}{z}\\right)}{z^2} \\\\\n 0 & 1 & 0 \\\\\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(((x*y)/z))\ng = y\nh = cos(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = e^{x/y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{e^{x/y}}{y} & -\\frac{x e^{x/y}}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)\ng = sqrt(x)\nh = math.e**(x/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos (x-z)$", - "Output Answer": [ - "$\\sin (x-z)+\\sec ^2(y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan(y)\nh = cos(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y+z)$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n 0 & 0 & e^z \\\\\n \\frac{z}{2 \\sqrt{x z}} & 0 & \\frac{x}{2 \\sqrt{x z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y+z)\ng = math.e**z\nh = sqrt(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(x+y+z^5\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{x+y+z^5},\\frac{1}{x+y+z^5},\\frac{5 z^4}{x+y+z^5}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y+z**5)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y-x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{3 \\sqrt[3]{y-x}^2} & \\frac{1}{3 \\sqrt[3]{y-x}^2} & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y-x)\ng = (1/(sqrt(y)))\nh = sqrt(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (7-6 x)$\n", - "Output Answer": [ - "$36 \\sin (7-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(7-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{z}{1-x^2 z^2}+\\frac{1}{3 \\sqrt[3]{y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x*z)\ng = cbrt(y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (3 x)$ on the interval $x = 5$ to $x = 9$\n", - "Output Answer": [ - "$-\\sqrt{26}+\\sqrt{82}+\\tanh ^{-1}\\left(\\sqrt{26}\\right)-\\tanh ^{-1}\\left(\\sqrt{82}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x)\na = 5\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x-z)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x-z)^2}}-\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x-z)\ng = acos(y)\nh = x*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^3}{y^6}$", - "Output Answer": [ - "$\\frac{42 z^3}{y^8}+\\frac{6 z}{y^6}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**3)/(y**6))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sin(y)\nh = x**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y-z$, $g(x,y,z) = \\sin ^{-1}(x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+y)^2}}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y-z\ng = asin(x+y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^4$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left\\{1,4 (y+z)^3-1,\\frac{1}{2 y \\sqrt{\\frac{x}{y}}}-4 (y+z)^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**4\ng = sqrt((x/y))\nh = sqrt((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sqrt{3} \\sqrt{x}-\\cos \\left(5 x^2\\right)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{\\frac{3}{5}}}{40}+5 \\sin (125)+1250 \\cos (125)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt(3)*sqrt(x)-cos(5*x**2))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$2 y+\\sinh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = y**2\nh = cosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = y\nh = sin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$16 x^{10}$\n", - "Output Answer": [ - "$720$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(16*x**10)\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\frac{32 z^{10}}{\\left(1-z^8\\right)^2}+\\frac{12 z^2}{1-z^8}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(z**4)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{x^2 z^2+1}+\\frac{1}{2 \\sqrt{x}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**y\nh = atan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (\\tan (8))$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(tan(8))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^4$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-y^2}},4 (z-x)^3,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**4\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,e^{x+z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y+z}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{y^4}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y+z} & x e^{x y+z} & e^{x y+z} \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & \\frac{4 y^3}{z^4} & -\\frac{4 y^4}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y+z)\ng = y**(3/2)\nh = ((y**4)/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x-y}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 (x-y)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(sqrt(x-y)))\nh = (1/(sqrt(x-y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^2}{x^2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left\\{\\cos (y),\\frac{2 z}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/(x**2))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (4-5 x)+\\cos (4 x+8)$\n", - "Output Answer": [ - "$-4 \\sin (4 (x+2))-5 \\cos (4-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4-5*x)+cos(4*x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x-y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{x+y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 (x+y)^{3/2}},\\frac{1}{2 (x+y)^{3/2}},\\frac{1}{3 \\sqrt[3]{x-y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = cbrt(x-y)\nh = cbrt(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = (y-x)^3$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{0,-\\sec ^2(x),-3 (y-x)^2-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (y-x)**3\nh = (y-x)**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^3}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{3 x^2}{2 \\sqrt{x^3}}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**3)\ng = y\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (4 x)$ on the interval $x = 5$ to $x = 6$\n", - "Output Answer": [ - "$-\\sqrt{26}+\\sqrt{37}+\\tanh ^{-1}\\left(\\sqrt{26}\\right)-\\tanh ^{-1}\\left(\\sqrt{37}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4*x)\na = 5\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan ^{-1}(z (x+y))$", - "Output Answer": [ - "$\\left\\{\\frac{z}{z^2 (x+y)^2+1},-\\frac{z}{z^2 (x+y)^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^5$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},\\frac{1}{x}-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = log((x/y))\nh = log((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{2 \\log (6 x-8)}{\\pi }$\n", - "Output Answer": [ - "$-\\frac{18}{\\pi (4-3 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((2*log(6*x-8))/pi)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{\\sqrt{y^4 z}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{\\frac{y^4}{2 \\left(y^4 z\\right)^{3/2}},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(sqrt(y**4*z)))\nh = (1/(sqrt(y**4*z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y-z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(8 x^2+4\\right)$\n", - "Output Answer": [ - "$-16 \\left(\\cos \\left(8 x^2+4\\right)-16 x^2 \\sin \\left(8 x^2+4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(8*x**2+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{1-\\frac{3 x}{2}}$\n", - "Output Answer": [ - "$-\\frac{9}{16 \\left(1-\\frac{3 x}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(1-((3*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = y z$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & z & y \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = y*z\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x+z)$, $g(x,y,z) = \\sin (x z)$, and $h(x,y,z) = \\cosh (x-z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+z)^2}}-\\sinh (x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x+z)\ng = sin(x*z)\nh = cosh(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log \\left(-7 x^2\\right) \\sin \\left(5-5 x^3\\right)$\n", - "Output Answer": [ - "$15 x^2 \\log \\left(-7 x^2\\right) \\cos \\left(5-5 x^3\\right)-\\frac{2 \\sin \\left(5-5 x^3\\right)}{x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(-7*x**2)*sin(5-5*x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}\\left(x^2+z\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{\\sqrt{x^2+z-1} \\sqrt{x^2+z+1}} & 0 & \\frac{1}{\\sqrt{x^2+z-1} \\sqrt{x^2+z+1}} \\\\\n 0 & 0 & 1 \\\\\n 4 x^3 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x**2+z)\ng = z\nh = x**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x+1)^2 \\left(\\frac{1}{9}-\\tanh ^3(1)+\\tanh (1)\\right)+(x+1) \\left(\\frac{4}{3}-\\tanh ^2(1)\\right)-1-\\tanh (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (y-z)^3$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 (y-z)^2 & -3 (y-z)^2 \\\\\n 0 & 2 y & 0 \\\\\n 0 & \\frac{\\sec ^2\\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\sec ^2\\left(\\frac{y}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y-z)**3\ng = y**2\nh = tan((y/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan ^{-1}(x-y)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}-z\\right)$, and $h(x,y,z) = \\frac{z}{x-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{(x-y)^2+1} & \\frac{1}{(x-y)^2+1} & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{y}-z\\right)}{y} & \\frac{x \\sin \\left(\\frac{x}{y}-z\\right)}{y^2} & \\sin \\left(\\frac{x}{y}-z\\right) \\\\\n -\\frac{z}{(x-y)^2} & \\frac{z}{(x-y)^2} & \\frac{1}{x-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -atan(x-y)\ng = cos((x/y)-z)\nh = (z/(x-y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = z^{25}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 25 z^{24} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = z**25\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{z}{y}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}} & \\frac{1}{2 y \\sqrt{\\frac{z}{y}}} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((z/y))\ng = y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{y}\\right)}{y} & \\frac{x \\sin \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cos((x/y))\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{\\frac{x}{z}}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{2 z \\sqrt{\\frac{x}{z}}} & 0 & -\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}} \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt((x/z))\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{11 x}{2}+\\frac{7}{2}\\right)$\n", - "Output Answer": [ - "$-484 \\sin ^4\\left(\\frac{1}{2} (11 x+7)\\right) \\csc ^3(11 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(((11*x)/2)+(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = math.e**y\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^4}{(x-y)^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 z^4}{(x-y)^3},\\frac{2 z^4}{(x-y)^3},\\frac{4 z^3}{(x-y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**4)/((x-y)**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n 0 & 5 y^4 & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = y**5\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x/z)\ng = z\nh = acos(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\{-\\cos (z)-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(z)\nh = sin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(\\frac{x^4 y^2}{z}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 x^3 y^2 \\sin \\left(\\frac{x^4 y^2}{z}\\right)}{z},-\\frac{2 x^4 y \\sin \\left(\\frac{x^4 y^2}{z}\\right)}{z},\\frac{x^4 y^2 \\sin \\left(\\frac{x^4 y^2}{z}\\right)}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(((x**4*y**2)/z))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y-z}} & -\\frac{1}{2 \\sqrt{y-z}} \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y-z)\ng = tan(x+z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(2-3 x)^2 \\sin \\left(6 x^3\\right)$\n", - "Output Answer": [ - "$6 (2-3 x) \\left(\\sin \\left(6 x^3\\right)+3 (3 x-2) x^2 \\cos \\left(6 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(2-3*x)**2*sin(6*x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(2 x+4)^2 \\cos (5 x+5)$\n", - "Output Answer": [ - "$2 (x+2) (4 \\cos (5 (x+1))-10 (x+2) \\sin (5 (x+1)))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((2*x+4)**2*cos(5*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tanh (y)$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\{\\cos (y),0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tanh(y)\nh = tanh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-6 x-7)^3$\n", - "Output Answer": [ - "$-216 (6 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-6*x-7)**3\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x-3}-\\sin \\left(5 x^2+1\\right)$\n", - "Output Answer": [ - "$100 x^2 \\sin \\left(5 x^2+1\\right)-10 \\cos \\left(5 x^2+1\\right)-\\frac{9}{(6 x-3)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x-3)-sin(5*x**2+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\{0,\\cos (z)-1,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{2 x^2}{3}-\\sin ^{-1}\\left(\\frac{10 x}{3}+\\frac{19}{3}\\right)+\\frac{7}{3}$\n", - "Output Answer": [ - "$-\\frac{5}{\\sqrt{-25 x^2-95 x-88}}-\\frac{4 x}{3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((2*x**2)/3)-asin(((10*x)/3)+(19/3))+(7/3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (x+8) \\tan (1-6 x)$\n", - "Output Answer": [ - "$12 \\sec ^2(1-6 x) (\\sin (x+8)+6 \\cos (x+8) \\tan (1-6 x))-\\cos (x+8) \\tan (1-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(x+8)*tan(1-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{x+y}$, and $h(x,y,z) = \\cos ^{-1}\\left(x+z^2\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-\\left(x+z^2\\right)^2}},-\\frac{1}{(x+y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = (1/(x+y))\nh = (1/(x+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{15 x/2}-\\tan \\left(3 x+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{9}{4} \\left(25 e^{15 x/2}-8 \\tan \\left(3 x+\\frac{15}{2}\\right) \\sec ^2\\left(3 x+\\frac{15}{2}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(15*x/2)-tan(3*x+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & -\\cos (y-z) & \\cos (y-z) \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = -sin(y-z)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = -\\sin (x-z)$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1-\\cos (x-z),-\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)},-\\cos (x-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x/z)\ng = -sin(x-z)\nh = -sin(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x^2+5}+\\cos (2-x)$\n", - "Output Answer": [ - "$4 e^{2 x^2+5} \\left(4 x^2+1\\right)-\\cos (2-x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x**2+5)+cos(2-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\frac{x^3}{\\log (x)}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = log(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt{x}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x}},-\\frac{x}{2 \\sqrt{x y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\{-1,0,x \\sin (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4}{z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(y+z)^2+1},-\\frac{x^4}{z^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{7}{3}-5 x}$\n", - "Output Answer": [ - "$-5 e^{\\frac{7}{3}-5 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**((7/3)-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x z}{y^2}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z}{y^2 \\left(\\frac{x^2 z^2}{y^4}+1\\right)},-\\frac{2 x z}{y^3 \\left(\\frac{x^2 z^2}{y^4}+1\\right)},\\frac{x}{y^2 \\left(\\frac{x^2 z^2}{y^4}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x*z)/(y**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{2 \\sqrt{y z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sin \\left(z^5\\right)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{(y+z)^{3/2}}$", - "Output Answer": [ - "$-\\frac{1}{x}-\\frac{3}{2 (y+z)^{5/2}}+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/x))\ng = log(y)\nh = (1/((y+z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = \\log (y-z)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\frac{1}{y-z}-\\frac{1}{y-x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y-x)\ng = log(y-z)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = y^5$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\tanh (x)$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = tanh(x)\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,x e^{x z},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*z)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(y^4\\right)$, $g(x,y,z) = \\sqrt[3]{z-y^4}$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z-y^4}^2},-\\sec ^2(x),-4 y^3 \\sec ^2\\left(y^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y**4)\ng = cbrt(z-y**4)\nh = cbrt(z-y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y z}}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n 0 & -\\frac{z}{2 (y z)^{3/2}} & -\\frac{y}{2 (y z)^{3/2}} \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+z)\ng = (1/(sqrt(y*z)))\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{1}{2}-3 x}-e^{\\frac{15 x}{2}-4}$\n", - "Output Answer": [ - "$-\\frac{225}{4} e^{\\frac{15 x}{2}-4}-\\frac{9}{4 \\left(\\frac{1}{2}-3 x\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sqrt((1/2)-3*x)-math.e**(((15*x)/2)-4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = \\cos (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n 0 & -\\sin (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sin(y-z)\nh = cos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5 y^5 z^5$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,5 x^5 y^5 z^4,-5 x^5 y^4 z^5\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5*y**5*z**5\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^2}{z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{z^2} & 0 & -\\frac{2 x^2}{z^3} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**2)/(z**2))\ng = y\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y-z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & -1 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y-z\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(5-9 x^4\\right)$\n", - "Output Answer": [ - "$108 x^2 \\left(\\sin \\left(5-9 x^4\\right)-12 x^4 \\cos \\left(5-9 x^4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5-9*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{y}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y},0,\\frac{x}{y^2}+y\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/y)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x}{y^3 z}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{e^{\\frac{x}{y^3 z}}}{y^3 z},-\\frac{3 x e^{\\frac{x}{y^3 z}}}{y^4 z},-\\frac{x e^{\\frac{x}{y^3 z}}}{y^3 z^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/(y**3*z))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-z^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = asin(z)\nh = asin(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n x+\\sqrt[3]{x} & x>0 \\\\\n x-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x^4+y\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4 x^3}{1-\\left(x^4+y\\right)^2} & \\frac{1}{1-\\left(x^4+y\\right)^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x**4+y)\ng = z\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(3 x^2-8\\right)+\\sqrt{3 x-6}$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{3 x-6}}-\\frac{6 x}{\\sqrt{1-\\left(8-3 x^2\\right)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(3*x**2-8)+sqrt(3*x-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh \\left(x^4+z\\right)$", - "Output Answer": [ - "$\\left\\{0,-4 x^3 \\text{sech}^2\\left(x^4+z\\right),-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = e^x$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,0,e^x-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((y/x))\ng = math.e**x\nh = math.e**x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (4-8 x) (-\\cos (2 x+9))$\n", - "Output Answer": [ - "$18 \\sin (13-6 x)-50 \\sin (10 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(4-8*x)*(-cos(2*x+9))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$1-4 x^2$\n", - "Output Answer": [ - "$-8$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1-4*x**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin \\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 5 z^4 \\cos \\left(z^5\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = sin(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = tan(x)\nh = sqrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^5+z$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**5+z\nh = y**5+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = y^3-x$", - "Output Answer": [ - "$6 y$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**3-x\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{\\frac{y \\cos \\left(\\frac{y}{z}\\right)}{z^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sin((y/z))\nh = sin((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x-8}+\\cos ^{-1}(2 x)$\n", - "Output Answer": [ - "$-\\frac{8 x}{\\left(1-4 x^2\\right)^{3/2}}-\\frac{1}{4 (x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x-8)+acos(2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin (4 x)$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(4*x)\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x y-z^2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{y}{2 \\sqrt{x y-z^2}},\\frac{x}{2 \\sqrt{x y-z^2}},-\\frac{z}{\\sqrt{x y-z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*y-z**2)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = x$, and $h(x,y,z) = (y-x)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y-x}}{2},\\frac{3 \\sqrt{y-x}}{2},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (9 x+4)-\\cos (7 x+2)$\n", - "Output Answer": [ - "$7 \\sin (7 x+2)-9 \\sin (9 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(9*x+4)-cos(7*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^{3/2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**(3/2)\ng = log(y)\nh = log(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sin(y**3)\nh = sin(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(y-z)^2}} & -\\frac{1}{\\sqrt{1-(y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = asin(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{x}{y}-z$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & -1 \\\\\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = (x/y)-z\nh = cbrt(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (6 x+2)-\\tan (7 x+4)$\n", - "Output Answer": [ - "$-6 \\sin (6 x+2)-7 \\sec ^2(7 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6*x+2)-tan(7*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$-\\frac{1}{x^2}+3 z^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^2+y}$", - "Output Answer": [ - "$-\\frac{x^2}{\\left(x^2+y\\right)^{3/2}}+\\frac{1}{\\sqrt{x^2+y}}-\\frac{1}{4 \\left(x^2+y\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2+y)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-6 x-7}$\n", - "Output Answer": [ - "$-\\frac{9}{(-6 x-7)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-6*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x-y}{z^5}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{z^5},-\\frac{1}{z^5},-\\frac{5 (x-y)}{z^6}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x-y)/(z**5))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y^4\\right)$, $g(x,y,z) = \\cos \\left(x^2\\right)$, and $h(x,y,z) = -\\tan \\left(x^2-y^4\\right)$", - "Output Answer": [ - "$\\left\\{4 y^3 \\sec ^2\\left(x^2-y^4\\right),2 x \\sec ^2\\left(x^2-y^4\\right),-2 x \\sin \\left(x^2\\right)-4 y^3 \\cos \\left(y^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**4)\ng = cos(x**2)\nh = cos(x**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, and $h(x,y,z) = \\sin ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{\\sqrt{1-x^2 z^2}}+\\frac{1}{3 \\sqrt[3]{x}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = cbrt(z/x)\nh = asin(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,x,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$2 (x-1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x-z}},-\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{z^4}$", - "Output Answer": [ - "$4 x^3+\\sec ^2(y)+4 e^{z^4} z^3$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = tan(y)\nh = math.e**(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\sqrt[3]{x^3-z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = cbrt(x**3-z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = log(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7-7 x}+\\frac{1}{(5 x-3)^3}$\n", - "Output Answer": [ - "$\\frac{300}{(5 x-3)^5}-\\frac{49}{4 (7-7 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7-7*x)+(1/((5*x-3)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-3 x-3)-\\sin (9 x)$\n", - "Output Answer": [ - "$\\frac{1}{x+1}-9 \\cos (9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-3*x-3)-sin(9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = -\\tan ^{-1}(x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{(x-y)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = -atan(x-y)\nh = -atan(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+y)^2+1} & \\frac{1}{(x+y)^2+1} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+y)\ng = log(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\log (x z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},\\frac{1}{2 \\sqrt{z}},\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = log(x*z)\nh = log(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = e^{y^2}$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 2 e^{y^2} y & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = math.e**(y**2)\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\frac{5 x^2}{2}-\\frac{3}{2}}$\n", - "Output Answer": [ - "$\\frac{60 \\left(5 x^2+1\\right)}{\\left(5 x^2-3\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(((5*x**2)/2)-(3/2)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{\\cos \\left(\\frac{y}{z}\\right)}{z}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sin((y/z))\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x+z}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 (x+z)^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x+z)))\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (5-8 x)-\\tan (2-6 x)$\n", - "Output Answer": [ - "$8 \\sin (5-8 x)+6 \\sec ^2(2-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5-8*x)-tan(2-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sinh (x)$ and $g(x) = $x^{15}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sinh(x)\ng = x**15\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (5-5 x)-\\tan ^{-1}\\left(3 x^5+8\\right)$\n", - "Output Answer": [ - "$\\frac{450 \\left(3 x^5+8\\right) x^8}{\\left(\\left(3 x^5+8\\right)^2+1\\right)^2}-\\frac{60 x^3}{\\left(3 x^5+8\\right)^2+1}-\\frac{1}{(x-1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5-5*x)-atan(3*x**5+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x-z^3\\right)$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\frac{1}{\\left(z^3\\right)^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 z^2}{x-z^3},-\\frac{1}{x^2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z**3)\ng = (1/(x*y))\nh = (1/(x*y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sin \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 3 z^2 \\cos \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = y**4\nh = sin(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{8 x+4} \\sin (8-4 x)$\n", - "Output Answer": [ - "$4 e^{8 x+4} (\\cos (8-4 x)-2 \\sin (8-4 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(8*x+4)*sin(8-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-e^{5-\\frac{x^2}{2}} x$\n", - "Output Answer": [ - "$e^{5-\\frac{x^2}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(5-((x**2)/2))*x\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{8}{3} x^3 \\cos \\left(\\frac{1}{3} \\left(19-2 x^4\\right)\\right)$\n", - "Output Answer": [ - "$\\sin \\left(\\frac{1}{3} \\left(19-2 x^4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(8/3)*x**3*cos((1/3)*(19-2*x**4))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(x y z^3\\right)$", - "Output Answer": [ - "$-\\frac{2 x y^3 z^9}{\\left(x^2 y^2 z^6+1\\right)^2}-\\frac{2 x^3 y z^9}{\\left(x^2 y^2 z^6+1\\right)^2}-\\frac{18 x^3 y^3 z^7}{\\left(x^2 y^2 z^6+1\\right)^2}+\\frac{6 x y z}{x^2 y^2 z^6+1}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x*y*z**3)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+z)$, $g(x,y,z) = \\sqrt{y^2}$, and $h(x,y,z) = \\log \\left(y^2 z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+z} & 0 & \\frac{1}{x+z} \\\\\n 0 & \\frac{y}{\\sqrt{y^2}} & 0 \\\\\n 0 & \\frac{2}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+z)\ng = sqrt(y**2)\nh = log(y**2*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\frac{1}{x y}$", - "Output Answer": [ - "$\\frac{1}{1-x^2}+\\frac{1}{3 \\sqrt[3]{y+z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = cbrt(y+z)\nh = (1/(x*y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tanh (x-y)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\text{sech}^2(x-y) & \\text{sech}^2(x-y) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -tanh(x-y)\ng = asin(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{5 x^3}{2}+\\frac{9}{2}}$\n", - "Output Answer": [ - "$\\frac{15}{4} e^{\\frac{5 x^3}{2}+\\frac{9}{2}} x \\left(15 x^3+4\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((5*x**3)/2)+(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x+5} \\left(4 x^2+1\\right)$\n", - "Output Answer": [ - "$\\frac{140 x^2+80 x+7}{2 \\sqrt{7 x+5}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x+5)*(4*x**2+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan ^{-1}\\left(x^3\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3 x^2}{x^6+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**3)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(y)$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(y)\ng = z**(3/2)\nh = log(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\sin ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 1 & 1 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-(y+z)^2}} & \\frac{1}{\\sqrt{1-(y+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = x+y\nh = asin(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\left(9 x^4-6\\right)^2}{(x+5)^5}$\n", - "Output Answer": [ - "$\\frac{9 \\left(3 x^4-2\\right) \\left(9 x^4+120 x^3+10\\right)}{(x+5)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((9*x**4-6)**2)/((x+5)**5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(9-\\frac{2 x}{5}\\right)+\\sin \\left(\\frac{32 x}{5}+6\\right)$\n", - "Output Answer": [ - "$\\frac{2}{2 x-45}+\\frac{32}{5} \\cos \\left(\\frac{32 x}{5}+6\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(9-((2*x)/5))+sin(((32*x)/5)+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n 0 & 1 & -1 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+z)\ng = y-z\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{2 x-4}{\\log (6)+i \\pi }$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((2*x-4)/(log(6)+1j*pi))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$(x-1) (\\cos (1)-2 \\sin (1))+\\sin (1)+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = cos(x**2)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{-\\frac{\\cos \\left(\\frac{z}{x}\\right)}{x},\\sin (x),-\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2}-\\sec ^2(x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = sin((z/x))\nh = sin((z/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = x$, and $h(x,y,z) = (x+z)^4$", - "Output Answer": [ - "$\\cos (x+y)+4 (x+z)^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y)\ng = x\nh = (x+z)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{9 x}{2}+\\frac{3}{2}\\right)^4$\n", - "Output Answer": [ - "$\\frac{2187}{4} (3 x+1)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (((9*x)/2)+(3/2))**4\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{20 x^4}{\\left(6-4 x^5\\right)^2+1}$\n", - "Output Answer": [ - "$\\tan ^{-1}\\left(6-4 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((20*x**4)/((6-4*x**5)**2+1))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$-(x-1) \\sin (1)-\\frac{1}{2} (x-1)^2 \\cos (1)+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(e^{2 x-1}\\right)$\n", - "Output Answer": [ - "$-4 e^{2 x-2} \\left(e \\sin \\left(e^{2 x-1}\\right)+e^{2 x} \\cos \\left(e^{2 x-1}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(math.e**(2*x-1))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = sin(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\sqrt[3]{y-x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z}},-\\frac{1}{3 \\sqrt[3]{y-x}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = cbrt(y-x)\nh = cbrt(y-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z-x}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z-x}^2}+\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = sqrt(y)\nh = cbrt(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x-y}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x-y} & -e^{x-y} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x-y)\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $e^x$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = math.e**x\nseries = f.subs(x, g).series(x, 5, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = \\frac{x}{y}+z$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{-1,-1,x \\sin (x y)+\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = (x/y)+z\nh = (x/y)+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^{10}}{z^5}$", - "Output Answer": [ - "$\\frac{30 x^{10}}{z^7}+\\frac{90 x^8}{z^5}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**10)/(z**5))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{\\frac{x^3}{y^2}-z}$", - "Output Answer": [ - "$-\\frac{8 x^6}{9 y^6 \\left(\\frac{x^3}{y^2}-z\\right) \\sqrt[3]{\\frac{x^3}{y^2}-z}^2}-\\frac{2 x^4}{y^4 \\left(\\frac{x^3}{y^2}-z\\right) \\sqrt[3]{\\frac{x^3}{y^2}-z}^2}+\\frac{2 x^3}{y^4 \\sqrt[3]{\\frac{x^3}{y^2}-z}^2}+\\frac{2 x}{y^2 \\sqrt[3]{\\frac{x^3}{y^2}-z}^2}-\\frac{2}{9 \\left(\\frac{x^3}{y^2}-z\\right) \\sqrt[3]{\\frac{x^3}{y^2}-z}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(((x**3)/(y**2))-z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x+y},-\\frac{1}{x+y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = x\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{9}{125} (7-3 x)^2-\\frac{65}{(13 x+17)^2}$\n", - "Output Answer": [ - "$\\frac{1}{125} (7-3 x)^3+\\frac{5}{13 x+17}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(9/125)*(7-3*x)**2-(65/((13*x+17)**2))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{26}{3}-\\frac{16 x}{3}}$\n", - "Output Answer": [ - "$-\\frac{16 \\sqrt{\\frac{2}{3}}}{(13-8 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt((26/3)-((16*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(2 x+\\frac{2}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{25}{(5 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x+(2/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(-8 x^5-6\\right)^4}-\\cos (6 x+5)$\n", - "Output Answer": [ - "$6 \\sin (6 x+5)-\\frac{5 x^4}{\\left(4 x^5+3\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((-8*x**5-6)**4))-cos(6*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\frac{1}{x+y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n -\\frac{1}{(x+y)^2} & -\\frac{1}{(x+y)^2} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = (1/(x+y))\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = y^5 z^5$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+5 y^5 z^4+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = tan(y)\nh = y**5*z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x*y)\ng = tan(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{y z}$", - "Output Answer": [ - "$\\left\\{\\frac{z}{3 \\sqrt[3]{y z}^2},0,\\frac{2}{y^3}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2))\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin (3 x)$ on the interval $x = 0$ to $x = 2$\n", - "Output Answer": [ - "$\\frac{1}{3} \\sqrt{10} \\left(2 E\\left(\\frac{9}{10}\\right)+E\\left(6-\\pi \\left|\\frac{9}{10}\\right.\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(3*x)\na = 0\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,-\\sin (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cos(x-y)\nh = cos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}} & -\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}} \\\\\n 0 & 1 & 0 \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(z/y)\ng = y\nh = tan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$20 e^{4 x^5-1} x^4$\n", - "Output Answer": [ - "$e^{4 x^5-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 20*math.e**(4*x**5-1)*x**4\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = \\frac{1}{x^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{2}{x^3},\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x}-\\frac{2}{x^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((y/x))\ng = (1/(x**2))\nh = (1/(x**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x+z)$, $g(x,y,z) = \\frac{x+y^5}{z}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\frac{1}{(x+z)^2+1}+\\frac{5 y^4}{z}+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x+z)\ng = ((x+y**5)/z)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\sqrt{x^5}$, and $h(x,y,z) = \\sqrt{y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-z}},0,\\frac{5 x^4}{2 \\sqrt{x^5}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**5)\ng = sqrt(x**5)\nh = sqrt(x**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x^2}{z^2}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{z^2} & 0 & -\\frac{2 x^2}{z^3} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((x**2)/(z**2))\ng = tan(y)\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = \\sqrt{x z}$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = z**(3/2)\nh = sqrt(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2},0,\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (x/y)\nh = (x/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\sin (x)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = x+z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tanh \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{\\text{sech}^2\\left(\\frac{y}{z}\\right)}{z} & -\\frac{y \\text{sech}^2\\left(\\frac{y}{z}\\right)}{z^2} \\\\\n 0 & \\sec ^2(y-z) & -\\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = tanh(y/z)\nh = tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(x-2)^3}$\n", - "Output Answer": [ - "$\\frac{12}{(x-2)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((x-2)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\tan \\left(x^2\\right)$", - "Output Answer": [ - "$\\frac{\\log (x)}{x^2}-\\frac{1}{3} x^2 \\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = tan(x**2)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-\\frac{4 x}{3}-3\\right)^4$\n", - "Output Answer": [ - "$\\frac{64}{27} (4 x+9)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-((4*x)/3)-3)**4\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8-8 x}$\n", - "Output Answer": [ - "$-\\frac{16}{(8-8 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{7}{3}-4 x\\right)-\\sin \\left(\\frac{5 x^3}{3}+\\frac{1}{3}\\right)$\n", - "Output Answer": [ - "$25 x^4 \\sin \\left(\\frac{1}{3} \\left(5 x^3+1\\right)\\right)-10 x \\cos \\left(\\frac{1}{3} \\left(5 x^3+1\\right)\\right)-16 \\cos \\left(\\frac{7}{3}-4 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((7/3)-4*x)-sin(((5*x**3)/3)+(1/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(x^3\\right)$, $g(x,y,z) = \\sqrt[3]{x^3}$, and $h(x,y,z) = \\left(x^3-y\\right)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -3 x^2 \\sin \\left(x^3\\right) & 0 & 0 \\\\\n \\frac{x^2}{\\sqrt[3]{x^3}^2} & 0 & 0 \\\\\n 15 x^2 \\left(x^3-y\\right)^4 & -5 \\left(x^3-y\\right)^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x**3)\ng = cbrt(x**3)\nh = (x**3-y)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x+y^5\\right)$", - "Output Answer": [ - "$-25 y^8 \\sin \\left(x+y^5\\right)-\\sin \\left(x+y^5\\right)+20 y^3 \\cos \\left(x+y^5\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y**5)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 x \\sqrt{\\frac{y}{x}}},\\frac{y}{2 x^2 \\sqrt{\\frac{y}{x}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$180 x^4 \\left(2 x^5-1\\right)$\n", - "Output Answer": [ - "$180 \\left(\\frac{x^{10}}{5}-\\frac{x^5}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 180*x**4*(2*x**5-1)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{1}{\\sqrt{1-(x-2)^2}}$\n", - "Output Answer": [ - "$\\sin ^{-1}(2-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(1/(sqrt(1-(x-2)**2)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x-y+z)$, $g(x,y,z) = \\cos ^{-1}(x-z)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-y+z-1} \\sqrt{x-y+z+1}} & -\\frac{1}{\\sqrt{x-y+z-1} \\sqrt{x-y+z+1}} & \\frac{1}{\\sqrt{x-y+z-1} \\sqrt{x-y+z+1}} \\\\\n -\\frac{1}{\\sqrt{1-(x-z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x-z)^2}} \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x-y+z)\ng = acos(x-z)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sinh \\left(x^4 y\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 4 x^3 y \\cosh \\left(x^4 y\\right) & x^4 \\cosh \\left(x^4 y\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = (1/(y**2))\nh = sinh(x**4*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = math.e**x\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{1-x^{10}} & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x**5)\ng = asinh(y)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-y \\sec ^2(y z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y*z)\nh = tan(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\cos \\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sin((z/y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(2 x^4-\\frac{42}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{20 x^2 \\left(5 x^4+63\\right)}{\\left(21-5 x^4\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x**4-(42/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z}-1,-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(\\frac{3 x}{2}+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{3} (3 x+11)}{\\left(-3 x^2-22 x-39\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(((3*x)/2)+(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = sqrt(x)\nh = cos(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\cos (y-z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y+z}}+\\sin (y-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = sqrt(y+z)\nh = cos(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan (y+z)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y+z),0,-\\cos (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y-z$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 1 & -1 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y-z\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x*y)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sinh (x y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n y \\cosh (x y+z) & x \\cosh (x y+z) & \\cosh (x y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = y**3\nh = sinh(x*y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{17 x}{2}+\\frac{11}{2}}-\\cos (8-8 x)$\n", - "Output Answer": [ - "$\\frac{17}{2} e^{\\frac{17 x}{2}+\\frac{11}{2}}-8 \\sin (8-8 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((17*x)/2)+(11/2))-cos(8-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(3-x) \\sin (1-6 x)$\n", - "Output Answer": [ - "$\\frac{\\sin (1-6 x)}{\\sqrt{-x^2+6 x-8}}+6 \\sin ^{-1}(3-x) \\cos (1-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(3-x)*sin(1-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{x}}}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^5}}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{y}{2 x^2 \\left(\\frac{y}{x}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt((y/x))))\nh = (1/(sqrt((y/x))))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = sqrt(x+y)\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sqrt(y)\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x^4-4}-\\tan (7 x+2)$\n", - "Output Answer": [ - "$\\frac{2 x^3}{\\sqrt{x^4-4}}-7 \\sec ^2(7 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x**4-4)-tan(7*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = \\frac{1}{(y z)^{3/2}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\frac{3 z}{2 (y z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y+z)\ng = (1/((y*z)**(3/2)))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(7-x^4\\right)$\n", - "Output Answer": [ - "$12 x^2 \\sin \\left(7-x^4\\right)-16 x^6 \\cos \\left(7-x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(7-x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tanh ^{-1}\\left(\\frac{y}{z^4}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{z^4 \\left(1-\\frac{y^2}{z^8}\\right)} & -\\frac{4 y}{z^5 \\left(1-\\frac{y^2}{z^8}\\right)} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sqrt(y)\nh = atanh(y/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = -\\sinh (x-y)$", - "Output Answer": [ - "$\\{\\cosh (x-y),\\cosh (x-y)-\\sin (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = z-y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{-1,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = z-y\nh = z-y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{x+y}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},-\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sqrt(z)\nh = (1/(z**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z^3}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{y}+z^3\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{y^2 \\sqrt{\\left(\\frac{x}{y}+z^3\\right)^2+1}},\\frac{3}{z}-\\frac{1}{y \\sqrt{\\left(\\frac{x}{y}+z^3\\right)^2+1}},\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(((z**3)/y))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{x y^3}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{3 x y^2}{2 \\sqrt{x y^3}}+\\frac{1}{x}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(x*y**3)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2-\\frac{z}{3 x^2 \\sqrt[3]{\\frac{z}{x}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z/x)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\cos ^{-1}(y+z)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{z^2+1}}-\\frac{1}{\\sqrt{1-(y+z)^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = acos(y+z)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)} & \\frac{1}{x \\left(\\frac{y^2}{x^2}+1\\right)} & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = atan(y/x)\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(y z)$, and $h(x,y,z) = \\cos (x+y)$", - "Output Answer": [ - "$\\left\\{-\\sin (x+y)-\\frac{y}{\\sqrt{1-y^2 z^2}},\\sin (x+y),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(y*z)\nh = asin(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^4 z^4$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**4*z**4\ng = sqrt(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{2 x^4-6}-\\frac{1}{\\left(4 x^2+1\\right)^2}$\n", - "Output Answer": [ - "$\\frac{4 x^3}{\\sqrt{2 x^4-6}}+\\frac{16 x}{\\left(4 x^2+1\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(2*x**4-6)-(1/((4*x**2+1)**2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (x-z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y}^2}-\\cos (x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/y)\ng = cbrt(y)\nh = sin(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n \\frac{1}{x-z} & 0 & -\\frac{1}{x-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = math.e**y\nh = log(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(9 x^3+1\\right)^2+\\log (2 x+9)$\n", - "Output Answer": [ - "$2430 x^4+108 x-\\frac{4}{(2 x+9)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (9*x**3+1)**2+log(2*x+9)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 0 & -\\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = (1/(y*z))\nh = log((z/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\frac{z^2}{x^2}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{2 z}{x^2},\\sin (x-z),-\\frac{2 z^2}{x^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = ((z**2)/(x**2))\nh = ((z**2)/(x**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(z-y^5\\right)^5$\n", - "Output Answer": [ - "$\\left\\{0,-25 y^4 \\left(z-y^5\\right)^4,5 \\left(z-y^5\\right)^4\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-y**5)**5\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x-8}$\n", - "Output Answer": [ - "$-\\frac{1}{2 (x-2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x-8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = \\left(y^5+z\\right)^2$", - "Output Answer": [ - "$\\left\\{10 y^4 \\left(y^5+z\\right),\\frac{1}{3 x \\sqrt[3]{\\frac{z}{x}}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z/x)\ng = cos(y**5)\nh = cos(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\sin \\left(y^5\\right)$, and $h(x,y,z) = x^4 z$", - "Output Answer": [ - "$\\left\\{0,-4 x^3 z,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**4)\ng = sin(y**5)\nh = sin(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\cos \\left(\\frac{6 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{18}{25} \\cos \\left(\\frac{12}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(((6*x)/5)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$1$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(1)\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-2 x} \\cos (1-8 x)$\n", - "Output Answer": [ - "$\\frac{8 (1-2 x) \\sin (1-8 x)-\\cos (1-8 x)}{\\sqrt{1-2 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-2*x)*cos(1-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\sin \\left(\\frac{z}{y}\\right)$, and $h(x,y,z) = (x+z)^2$", - "Output Answer": [ - "$2 (x+z)-\\frac{z \\cos \\left(\\frac{z}{y}\\right)}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = sin((z/y))\nh = (x+z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x y^3\\right)^{3/2}$, $g(x,y,z) = z \\left(x-y^3\\right)$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{y^3-x,0,z-\\frac{9}{2} x y^2 \\sqrt{x y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y**3)**(3/2)\ng = z*(x-y**3)\nh = z*(x-y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^2-y\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^{\\frac{x^2-y}{z}}$", - "Output Answer": [ - "$-\\frac{\\left(x^2-y\\right) e^{\\frac{x^2-y}{z}}}{z^2}-2 x \\sin \\left(x^2-y\\right)+\\frac{1}{y}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**2-y)\ng = log(y)\nh = math.e**((x**2-y)/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5 x-7}$\n", - "Output Answer": [ - "$25 e^{5 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (1-4 x)-e^{8 x^3+4}$\n", - "Output Answer": [ - "$-48 e^{8 x^3+4} x \\left(12 x^3+1\\right)-\\frac{16}{(1-4 x)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = log(1-4*x)-math.e**(8*x**3+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{z^2 \\sqrt{1-\\frac{y^2}{z^2}}},0,-3 (x+y)^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**3\ng = acos(y/z)\nh = acos(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{x}}}$, $g(x,y,z) = \\log \\left(\\frac{z}{y^5}\\right)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\frac{z}{2 x^2 \\left(\\frac{z}{x}\\right)^{3/2}}-\\frac{x}{z^2}-\\frac{5}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((z/x))))\ng = log((z/(y**5)))\nh = (x/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\tan (x y)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asin(y)\nh = tan(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x z)$", - "Output Answer": [ - "$x \\sec ^2(x z)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = tan(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\sqrt{\\frac{x}{z}}$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}-\\frac{x}{2 z^2 \\sqrt{\\frac{x}{z}}}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = (1/(y**(3/2)))\nh = sqrt((x/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x z^2\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,2 x z \\sec ^2\\left(x z^2\\right),0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z**2)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-96 x \\left(1-2 x^2\\right)^2$\n", - "Output Answer": [ - "$-64 x^6+96 x^4-48 x^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -96*x*(1-2*x**2)**2\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan ^{-1}(y-z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(y-z)^2+1},\\frac{1}{(y-z)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atan(y-z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,-\\sin (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-y)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+e^y+\\sec ^2(z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = math.e**y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x+y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x+y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{3 \\sqrt[3]{z}^2},0,-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\frac{17 x^6}{45}+\\frac{2 x^4}{3}+x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin ^{-1}(x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n \\frac{1}{\\sqrt{1-(x+y)^2}} & \\frac{1}{\\sqrt{1-(x+y)^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = log(y)\nh = asin(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(3 x^2-8\\right)+\\cosh (2-x)$\n", - "Output Answer": [ - "$\\frac{6 x}{3 x^2-8}-\\sinh (2-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x**2-8)+cosh(2-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sin ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = asin(y**4)\nh = asin(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(y^5+z\\right)$, $g(x,y,z) = \\sin \\left(y^5\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$5 y^4 \\cos \\left(y^5\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y**5+z)\ng = sin(y**5)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (\\sin (5 x+8))$\n", - "Output Answer": [ - "$25 \\sin (5 x+8) \\sin (\\sin (5 x+8))-25 \\cos ^2(5 x+8) \\cos (\\sin (5 x+8))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(sin(5*x+8))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2}-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{2 x^2+2}}{(-6 x-7)^2}$\n", - "Output Answer": [ - "$\\frac{4 e^{2 x^2+2} \\left(6 x^2+7 x-3\\right)}{(6 x+7)^3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(2*x**2+2))/((-6*x-7)**2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$e^{-4 x} \\sin (3 x)$\n", - "Output Answer": [ - "$\\frac{44 \\sin (6)+117 \\cos (6)}{6 e^8}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**(-4*x)*sin(3*x))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\log \\left(y^4\\right)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = log(y**4)\nh = log(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{16 x}{8 x^2+3}$\n", - "Output Answer": [ - "$\\log \\left(8 x^2+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((16*x)/(8*x**2+3))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = x^5$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\left\\{1,0,5 x^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = x**5\nh = x**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(x+6)^5}+\\tan (8 x+4)$\n", - "Output Answer": [ - "$8 \\sec ^2(8 x+4)-\\frac{5}{(x+6)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((x+6)**5))+tan(8*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(3 x^2-3\\right)^2}-\\sin (1)$\n", - "Output Answer": [ - "$\\frac{4 \\left(5 x^2+1\\right)}{9 \\left(x^2-1\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((3*x**2-3)**2))-sin(1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^3$", - "Output Answer": [ - "$\\begin{cases}\n \\frac{7}{2} i (x+1)-i & \\Im(x)\\geq 0 \\\\\n i-\\frac{7}{2} i (x+1) & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**3\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x^4+z\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan \\left(x^4-z\\right)$", - "Output Answer": [ - "$\\frac{4 x^3}{\\left(x^4+z\\right)^2+1}-\\sec ^2\\left(x^4-z\\right)+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**4+z)\ng = math.e**y\nh = tan(x**4-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x^3$", - "Output Answer": [ - "$2 x+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sin(y)\nh = x**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\sinh (z (x-y))$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-z \\cosh (z (x-y))+\\cosh (x)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = sinh(z*(x-y))\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cos (x+y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n -\\sin (x+y-z) & -\\sin (x+y-z) & \\sin (x+y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y**5\nh = cos(x+y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{1}{\\sqrt{y+z}}$, and $h(x,y,z) = \\frac{z^3}{y^3}$", - "Output Answer": [ - "$\\frac{3 z^2}{y^3}-\\frac{1}{2 (y+z)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = (1/(sqrt(y+z)))\nh = ((z**3)/(y**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(8 x+\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$64 \\sin \\left(8 x+\\frac{3}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(8*x+(3/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+y)^2}$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{2}{(x+y)^3}+\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+y)**2))\ng = log(x)\nh = log(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\log (y-z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{y-z}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = log(y-z)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\frac{x}{y}-z}$, $g(x,y,z) = \\sqrt[3]{\\frac{z}{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\frac{1}{y \\left(\\frac{x}{y}-z\\right)^2}-\\frac{z}{3 y^2 \\sqrt[3]{\\frac{z}{y}}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x/y)-z))\ng = cbrt(z/y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\sec ^2(y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = tan(y)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x^2 y\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 x y}{\\sqrt{1-x^4 y^2}},-\\frac{x^2}{\\sqrt{1-x^4 y^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**2*y)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(z^5\\right)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,-5 z^4 \\sin \\left(z^5\\right),\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z**5)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh ^{-1}\\left(\\frac{x+y}{z}\\right)$", - "Output Answer": [ - "$-\\frac{(x+y)^2}{2 z^4 \\left(\\frac{x+y}{z}-1\\right)^{3/2} \\sqrt{\\frac{x+y}{z}+1}}-\\frac{(x+y)^2}{2 z^4 \\sqrt{\\frac{x+y}{z}-1} \\left(\\frac{x+y}{z}+1\\right)^{3/2}}+\\frac{2 (x+y)}{z^3 \\sqrt{\\frac{x+y}{z}-1} \\sqrt{\\frac{x+y}{z}+1}}-\\frac{1}{z^2 \\left(\\frac{x+y}{z}-1\\right)^{3/2} \\sqrt{\\frac{x+y}{z}+1}}-\\frac{1}{z^2 \\sqrt{\\frac{x+y}{z}-1} \\left(\\frac{x+y}{z}+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh((x+y)/z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{z-x}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{2 (z-x)^{3/2}} & 0 & -\\frac{1}{2 (z-x)^{3/2}} \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(z-x)))\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x y$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n y & x & 0 \\\\\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = x*y\nh = -tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{9 x}{2}+2}-\\sqrt{\\frac{1}{2}-\\frac{3 x}{2}}$\n", - "Output Answer": [ - "$\\frac{3 \\left(\\frac{3}{\\sqrt{9 x+4}}+\\frac{1}{\\sqrt{1-3 x}}\\right)}{2 \\sqrt{2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((9*x)/2)+2)-sqrt((1/2)-((3*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x^2}{y}-z\\right)^{3/2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{3 x \\sqrt{\\frac{x^2}{y}-z}}{y},-\\frac{3 x^2 \\sqrt{\\frac{x^2}{y}-z}}{2 y^2},-\\frac{3}{2} \\sqrt{\\frac{x^2}{y}-z}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (((x**2)/y)-z)**(3/2)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\cos (x)+\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(y/z)\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2}+2 x+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cbrt(x/y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x z)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{x^2 y^2}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\text{sech}^2(x z) & 0 & x \\text{sech}^2(x z) \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n \\frac{2 x y^2}{z^2} & \\frac{2 x^2 y}{z^2} & -\\frac{2 x^2 y^2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x*z)\ng = atan(y)\nh = ((x**2*y**2)/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (7-3 x) \\tan (7 x+5)$\n", - "Output Answer": [ - "$7 \\tan (7-3 x) \\sec ^2(7 x+5)-3 \\tan (7 x+5) \\sec ^2(7-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(7-3*x)*tan(7*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = -\\tanh (x-y)$", - "Output Answer": [ - "$\\left\\{\\text{sech}^2(x-y)+\\frac{y}{z^2},\\text{sech}^2(x-y)+1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = (y/z)\nh = (y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}-z}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{x}{2 y^2 \\left(\\frac{x}{y}-z\\right)^{3/2}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = (1/(sqrt((x/y)-z)))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3}{2 y^{5/2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(2 x^5+8\\right)-e^{5 x^2-3}$\n", - "Output Answer": [ - "$-10 e^{5 x^2-3} x-10 x^4 \\sin \\left(2 \\left(x^5+4\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(cos(2*x**5+8)-math.e**(5*x**2-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{y-z}$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y-z}^2},\\sin (x),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(y-z)\nh = cbrt(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^4}$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{x^7}{7}-\\frac{x^5}{5}+\\frac{x^3}{3}+\\sqrt[3]{x^4}-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**4)\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y+z)^5$, $g(x,y,z) = \\cos ^{-1}(x+z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**5\ng = acos(x+z)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(4 x^4+8\\right)^2$\n", - "Output Answer": [ - "$128 x^2 \\left(7 x^4+6\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (4*x**4+8)**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\frac{1}{(z-y)^{3/2}}$, and $h(x,y,z) = \\sqrt{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & \\frac{3}{2 (z-y)^{5/2}} & -\\frac{3}{2 (z-y)^{5/2}} \\\\\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = (1/((z-y)**(3/2)))\nh = sqrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\text{sech}^2(x)+\\cos (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = sin(y)\nh = log(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n \\frac{1}{z \\sqrt{\\frac{x^2}{z^2}+1}} & 0 & -\\frac{x}{z^2 \\sqrt{\\frac{x^2}{z^2}+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y**(3/2)\nh = asinh(x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tanh ^{-1}(x-z)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$-\\frac{1}{1-(x-z)^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atanh(x-z)\ng = x\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x+\\frac{9}{2}} \\sin (6 x)$\n", - "Output Answer": [ - "$\\frac{-36 (2 x+9)^2 \\sin (6 x)-\\sin (6 x)+12 (2 x+9) \\cos (6 x)}{\\sqrt{2} (2 x+9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x+(9/2))*sin(6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^3 \\cos \\left(4-4 x^5\\right)$\n", - "Output Answer": [ - "$20 e^3 x^4 \\sin \\left(4-4 x^5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**3*cos(4-4*x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = z^8$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{-8 z^7,-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = z**8\nh = z**8\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sinh (x)$, and $h(x,y,z) = \\cos \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\frac{y \\sin \\left(\\frac{y}{z}\\right)}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sinh(x)\nh = cos((y/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y$, and $h(x,y,z) = x^4 z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 1 & 0 \\\\\n 4 x^3 z & 0 & x^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = y\nh = x**4*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\cos \\left(x^5\\right)$", - "Output Answer": [ - "$(x-3) \\left(\\frac{1}{10}+405 \\sin (243)\\right)-\\cos (243)+\\tan ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = cos(x**5)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x^5}$, $g(x,y,z) = \\tan ^{-1}\\left(x^5\\right)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$-\\frac{5 y}{x^6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/(x**5))\ng = atan(x**5)\nh = sqrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\cos (z)-\\frac{2}{y^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = (1/(y**2))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-3}+\\log (8 x-2)$\n", - "Output Answer": [ - "$64 \\left(e^{-8 x-3}-\\frac{1}{(2-8 x)^2}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-3)+log(8*x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\tanh ^{-1}(y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{1-(y-z)^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = -atanh(y-z)\nh = -atanh(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{5 x^4}{\\sqrt{1-x^{10}}}+\\frac{1}{2 \\sqrt{y+z}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**5)\ng = sqrt(y+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x$, and $h(x,y,z) = \\cosh ^{-1}\\left(z^3\\right)$", - "Output Answer": [ - "$\\{0,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\frac{5 x^2}{2}+4\\right)-\\tan ^{-1}\\left(1-\\frac{3 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{6}{9 x^2-12 x+8}-5 x \\sin \\left(\\frac{5 x^2}{2}+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(((5*x**2)/2)+4)-atan(1-((3*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{8-2 x^2}-\\sin (7-x)$\n", - "Output Answer": [ - "$4 e^{8-2 x^2} x+\\cos (7-x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(8-2*x**2)-sin(7-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{9 x}{2}-\\frac{7}{2}\\right)^2-\\sin \\left(\\frac{x^5}{2}+\\frac{3}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{2} \\left(-5 x^4 \\cos \\left(\\frac{1}{2} \\left(x^5+3\\right)\\right)+81 x-63\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((9*x)/2)-(7/2))**2-sin(((x**5)/2)+(3/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left\\{e^{x+y},-e^{x+y},-\\frac{1}{x^2 y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(x*y))\nh = (1/(x*y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\frac{13 x^3}{2}-7}$\n", - "Output Answer": [ - "$-\\frac{39 x \\left(13 x^3+56\\right)}{4 \\sqrt{-26 x^3-28} \\left(13 x^3+14\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-((13*x**3)/2)-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = z^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = z**4\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x+y^3+z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\cos \\left(x+y^3+z\\right),3 y^2 \\cos \\left(x+y^3+z\\right),\\cos \\left(x+y^3+z\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+y**3+z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$5 \\cos (5 x+1)-3 \\cos (8-3 x)$\n", - "Output Answer": [ - "$\\sin (5 x+1)+\\sin (8) \\cos (3 x)-\\cos (8) \\sin (3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 5*cos(5*x+1)-3*cos(8-3*x)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(z)$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\sqrt[3]{z-y}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z-y}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z)\ng = atan(x)\nh = cbrt(z-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+y}} & \\frac{1}{2 \\sqrt{x+y}} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+y)\ng = log(y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$2-\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = sqrt((y/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\frac{1}{x}+z \\sec ^2(y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = tan(y*z)\nh = log((x/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = sqrt(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = z^5$, and $h(x,y,z) = \\frac{1}{x^2}$", - "Output Answer": [ - "$\\left\\{-5 z^4,\\frac{2}{x^3}-\\sin (x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z)\ng = z**5\nh = z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{2 \\sqrt{z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(8-\\frac{11 x^4}{2}\\right)$\n", - "Output Answer": [ - "$22 x^2 \\left(44 x^4 \\tan \\left(8-\\frac{11 x^4}{2}\\right)-3\\right) \\sec ^2\\left(8-\\frac{11 x^4}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(8-((11*x**4)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 0 & e^z \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**z\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{z^4}$, and $h(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\frac{4 z^3}{z^8+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(z**4)\nh = atan(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4-6 x} \\cos \\left(6-4 x^3\\right)$\n", - "Output Answer": [ - "$-12 e^{4-6 x} \\left(2 x (6 x-1) \\sin \\left(6-4 x^3\\right)+3 \\left(4 x^4-1\\right) \\cos \\left(6-4 x^3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4-6*x)*cos(6-4*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^2}{\\left(x^3-y^5\\right)^2}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{6 x^2 z^2}{\\left(x^3-y^5\\right)^3},\\frac{10 y^4 z^2}{\\left(x^3-y^5\\right)^3},\\frac{2 z}{\\left(x^3-y^5\\right)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/((x**3-y**5)**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (5-6 x) \\tan (6 x+6)$\n", - "Output Answer": [ - "$6 \\left(\\sin (5-6 x) \\tan (6 (x+1))+\\cos (5-6 x) \\sec ^2(6 (x+1))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5-6*x)*tan(6*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(y)\ng = cbrt(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$x-\\frac{2 x^3}{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = asinh(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(5-3 x^4\\right)+\\cos ^{-1}(7 x+3)$\n", - "Output Answer": [ - "$-12 x^3 \\cos \\left(5-3 x^4\\right)-\\frac{7}{\\sqrt{1-(7 x+3)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(5-3*x**4)+acos(7*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x-3) \\left(-\\tan ^2(3)\\right)+3-\\tan (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = tan(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$-\\frac{1}{4 x}$\n", - "Output Answer": [ - "$-\\frac{1}{32}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-(1/(4*x)))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-5 x-\\frac{16}{3}}-\\sin ^{-1}(4-3 x)$\n", - "Output Answer": [ - "$\\frac{3}{\\sqrt{1-(4-3 x)^2}}-\\frac{5}{2 \\sqrt{-5 x-\\frac{16}{3}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-5*x-(16/3))-asin(4-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^4 z\\right)$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{4}{x}+\\frac{1}{\\sqrt{1-(y+z)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**4*z)\ng = asin(y+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(y^2\\right)$, $g(x,y,z) = \\cos \\left(y^2\\right)$, and $h(x,y,z) = (z-x)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 2 y \\sec ^2\\left(y^2\\right) & 0 \\\\\n 0 & -2 y \\sin \\left(y^2\\right) & 0 \\\\\n -\\frac{3 \\sqrt{z-x}}{2} & 0 & \\frac{3 \\sqrt{z-x}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y**2)\ng = cos(y**2)\nh = (z-x)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(y^4 z^4\\right)$", - "Output Answer": [ - "$-12 y^4 z^2 \\sin \\left(y^4 z^4\\right)-12 y^2 z^4 \\sin \\left(y^4 z^4\\right)-16 y^8 z^6 \\cos \\left(y^4 z^4\\right)-16 y^6 z^8 \\cos \\left(y^4 z^4\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y**4*z**4)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = atan(z)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left\\{1,0,-\\sin (x-y)-x \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = cos(x-y)\nh = cos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (3)-\\tan (1-3 x)$\n", - "Output Answer": [ - "$3 \\sec ^2(1-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(3)-tan(1-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = x^2$, and $h(x,y,z) = z$", - "Output Answer": [ - "$1-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = x**2\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{y}}}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z^4}{y}\\right)$", - "Output Answer": [ - "$\\frac{4 z^3}{y \\sqrt{1-\\frac{z^8}{y^2}}}-\\frac{1}{2 y \\left(\\frac{x}{y}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((x/y))))\ng = x\nh = asin((z**4)/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(e^{5-3 x^3}\\right)-e^{5 x^3-3}$\n", - "Output Answer": [ - "$-3 e^{-3 \\left(x^3+1\\right)} x^2 \\left(5 e^{8 x^3}+3 e^8 \\cos \\left(e^{5-3 x^3}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sin(math.e**(5-3*x**3))-math.e**(5*x**3-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x+y)$", - "Output Answer": [ - "$y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = y\nh = tan(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\frac{1}{x}$, and $h(x,y,z) = \\frac{1}{x y}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = (1/x)\nh = (1/(x*y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\frac{14}{5}-\\frac{18 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{324}{25} \\sin \\left(\\frac{14}{5}-\\frac{18 x}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin((14/5)-((18*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-x^4}-e^{7 x^4-\\frac{7}{2}}$\n", - "Output Answer": [ - "$2 x^3 \\left(-14 e^{7 x^4-\\frac{7}{2}}-\\frac{1}{\\sqrt{7-x^4}}\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-x**4)-math.e**(7*x**4-(7/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x z)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x*z)\ng = sqrt(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{x^2 y^2+1} & \\frac{x}{x^2 y^2+1} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x*y)\ng = log(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y-x}$, $g(x,y,z) = z^3$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{-3 z^2,-1,-e^{y-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y-x)\ng = z**3\nh = z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(-9 x-2) \\cos (3-2 x)$\n", - "Output Answer": [ - "$-2 (9 x+2) \\sin (3-2 x)-9 \\cos (3-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((-9*x-2)*cos(3-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{1}{x+y}$", - "Output Answer": [ - "$1-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(sqrt(y)))\nh = (1/(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$5 y^4+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = y**5\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = y^2$, and $h(x,y,z) = y^4 z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 4 y^3 z^4 & 4 y^4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = y**2\nh = y**4*z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\frac{11 x}{2}-\\frac{17}{2}}-\\tan (x+4)$\n", - "Output Answer": [ - "$\\frac{121}{4} e^{-\\frac{11 x}{2}-\\frac{17}{2}}-2 \\tan (x+4) \\sec ^2(x+4)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-((11*x)/2)-(17/2))-tan(x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(7-\\frac{7 x}{2}\\right)-\\sin (1-x)$\n", - "Output Answer": [ - "$\\frac{7}{2} \\sin \\left(7-\\frac{7 x}{2}\\right)+\\cos (1-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(7-((7*x)/2))-sin(1-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^2 y\\right)$, $g(x,y,z) = \\tan ^{-1}\\left(x^2+z\\right)$, and $h(x,y,z) = \\frac{x^2}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x y}{\\sqrt{1-x^4 y^2}} & \\frac{x^2}{\\sqrt{1-x^4 y^2}} & 0 \\\\\n \\frac{2 x}{\\left(x^2+z\\right)^2+1} & 0 & \\frac{1}{\\left(x^2+z\\right)^2+1} \\\\\n \\frac{2 x}{y} & -\\frac{x^2}{y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x**2*y)\ng = atan(x**2+z)\nh = ((x**2)/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan (x)$ on the interval $x = 3$ to $x = 12$\n", - "Output Answer": [ - "$\\int_3^{12} \\sqrt{\\sec ^4(x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(x)\na = 3\nb = 12\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^3\\right)$, $g(x,y,z) = x^3$, and $h(x,y,z) = \\log \\left(\\frac{x^3}{y}\\right)$", - "Output Answer": [ - "$-\\frac{3 x^2}{\\sqrt{1-x^6}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**3)\ng = x**3\nh = log(((x**3)/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = y z^5$, and $h(x,y,z) = x+z^5$", - "Output Answer": [ - "$\\left\\{-5 y z^4,5 z^4-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = y*z**5\nh = y*z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\sqrt{x^4-y}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4 x^3}{3 \\sqrt[3]{x^4}^2} & 0 & 0 \\\\\n \\frac{2 x^3}{\\sqrt{x^4-y}} & -\\frac{1}{2 \\sqrt{x^4-y}} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**4)\ng = sqrt(x**4-y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$10 x^4 \\sin \\left(\\frac{5}{2}-2 x^5\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{5}{2}-2 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 10*x**4*sin((5/2)-2*x**5)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$(x-1)^2 \\left(\\frac{\\cos (1)}{3}-\\frac{11 \\sin (1)}{18}\\right)+(x-1) \\left(\\frac{\\sin (1)}{3}+\\cos (1)\\right)+\\sin (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (8-x)}{(6 x-1)^2}$\n", - "Output Answer": [ - "$\\frac{6 x-12 (x-8) \\log (8-x)-1}{(x-8) (6 x-1)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(8-x))/((6*x-1)**2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x z)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cosh (x z) & 0 & x \\cosh (x z) \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x*z)\ng = asin(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos \\left(\\frac{z^4}{x}\\right)$", - "Output Answer": [ - "$2-\\frac{4 z^3 \\sin \\left(\\frac{z^4}{x}\\right)}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = y\nh = cos(((z**4)/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4 x-8} \\cos (7 x+6)$\n", - "Output Answer": [ - "$\\frac{\\cos (7 x+6)-14 (x-2) \\sin (7 x+6)}{\\sqrt{x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4*x-8)*cos(7*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3 x+8)+\\tan (4-5 x)$\n", - "Output Answer": [ - "$\\frac{3}{3 x+8}-5 \\sec ^2(4-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3*x+8)+tan(4-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{15 x}{2}+9\\right)-e^{9 x+7}$\n", - "Output Answer": [ - "$-\\frac{9}{4} \\left(36 e^{9 x+7}+25 \\sin \\left(\\frac{15 x}{2}+9\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(((15*x)/2)+9)-math.e**(9*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin (7-4 x)}{\\left(-4 x^2-5\\right)^5}$\n", - "Output Answer": [ - "$-\\frac{4 \\left(\\left(4 x^2+5\\right) \\cos (7-4 x)+10 x \\sin (7-4 x)\\right)}{\\left(4 x^2+5\\right)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(7-4*x))/((-4*x**2-5)**5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-6 x-1} \\sin (2 x+8)$\n", - "Output Answer": [ - "$2 e^{-6 x-1} (\\cos (2 (x+4))-3 \\sin (2 (x+4)))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-6*x-1)*sin(2*x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}\\left(x^5\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\frac{\\pi x^3}{6}+\\frac{\\pi x}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x**5)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = \\frac{1}{\\sqrt{x^5}}$, and $h(x,y,z) = \\tanh \\left(y^3+z\\right)$", - "Output Answer": [ - "$\\text{sech}^2\\left(y^3+z\\right)-5 x^4 \\sin \\left(x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5)\ng = (1/(sqrt(x**5)))\nh = tanh(y**3+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{x^3}{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{3 x^2}{z^3} & 0 & -\\frac{3 x^3}{z^4} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+y)\ng = y\nh = ((x**3)/(z**3))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5-x} \\cos (1-9 x)$\n", - "Output Answer": [ - "$\\frac{-18 (x-5) \\sin (1-9 x)-\\cos (1-9 x)}{2 \\sqrt{5-x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5-x)*cos(1-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sin ^{-1}(x-y-z)$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(x-y-z)^2}}+\\frac{1}{2 \\sqrt{y-x}},\\frac{1}{2 \\sqrt{y-x}},\\frac{1}{\\sqrt{1-(x-y-z)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = asin(x-y-z)\nh = asin(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}\\left(x^2\\right)$, $g(x,y,z) = e^{x^2}$, and $h(x,y,z) = y^{10}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{\\sqrt{x^2-1} \\sqrt{x^2+1}} & 0 & 0 \\\\\n 2 e^{x^2} x & 0 & 0 \\\\\n 0 & 10 y^9 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x**2)\ng = math.e**(x**2)\nh = y**10\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (x)$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(x)\nh = x-y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y-z)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = x^4$", - "Output Answer": [ - "$\\left\\{0,-4 x^3-\\frac{1}{(y-z)^2+1},-\\frac{1}{(y-z)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y-z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\sin ^{-1}(2 x+8)}$\n", - "Output Answer": [ - "$\\frac{4 \\left(\\sqrt{-4 x^2-32 x-63}+2 x+8\\right) e^{\\sin ^{-1}(2 x+8)}}{\\left(-4 x^2-32 x-63\\right)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(asin(2*x+8))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt{\\frac{z}{y}}$", - "Output Answer": [ - "$\\frac{1}{2 y \\sqrt{\\frac{z}{y}}}+\\frac{1}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(y)\nh = sqrt((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\left(3 x^2-4\\right)^2-\\sin ^{-1}(2-2 x)$\n", - "Output Answer": [ - "$-36 x^3+\\frac{2}{\\sqrt{-4 x^2+8 x-3}}+48 x$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(3*x**2-4)**2-asin(2-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (4)-\\sin (4 x+9)$\n", - "Output Answer": [ - "$-4 \\cos (4 x+9)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(4)-sin(4*x+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = (x+z)^{3/2}$, and $h(x,y,z) = (x-y+z)^2$", - "Output Answer": [ - "$\\left\\{-2 (x-y+z)-\\frac{3 \\sqrt{x+z}}{2},2 (-x+y-z),\\frac{3 \\sqrt{x+z}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (x+z)**(3/2)\nh = (x+z)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan (2 x+4)}{x+4}$\n", - "Output Answer": [ - "$\\frac{\\tan (2 (x+2))-2 (x+4) \\sec ^2(2 (x+2))}{(x+4)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((tan(2*x+4))/(x+4)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x^5\\right)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{y}{2 \\sqrt{y z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x**5)\ng = sqrt(y*z)\nh = sqrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{14}{3}-\\frac{10 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{100}{9} \\cos \\left(\\frac{2}{3} (5 x-7)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((14/3)-((10*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt[3]{x z}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = cbrt(x*z)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sin ^{-1}(x-y)$, and $h(x,y,z) = \\frac{x^5}{z^5}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5 x^4}{z^5}-\\sin (z),\\frac{1}{\\sqrt{1-(x-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = asin(x-y)\nh = asin(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = x^{3/2}$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = x**(3/2)\nh = tan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (4 x)-\\tan (4 x+5)$\n", - "Output Answer": [ - "$-4 \\left(\\cos (4 x)+\\sec ^2(4 x+5)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(4*x)-tan(4*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sin (y z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(x+z)^2}}+\\frac{1}{\\sqrt{y^2+1}}+y \\cos (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+z)\ng = asinh(y)\nh = sin(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^3$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 3 y^2 & 0 \\\\\n -\\frac{y}{x^2} & \\frac{1}{x} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**3\ng = (y/x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (1/(sqrt(y)))\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(4-3 x)^4 \\log (x+7)$\n", - "Output Answer": [ - "$\\frac{(4-3 x)^2 \\left(63 x^2+432 x+108 (x+7)^2 \\log (x+7)-688\\right)}{(x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (4-3*x)**4*log(x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x y}}+\\sinh (x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = sqrt(x*y)\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}\\left(\\frac{y^2}{x^4}\\right)$, $g(x,y,z) = \\frac{1}{\\left(y^2-z\\right)^{3/2}}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{4 y^2}{x^5 \\sqrt{\\frac{y^4}{x^8}+1}}-\\frac{3 y}{\\left(y^2-z\\right)^{5/2}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh((y**2)/(x**4))\ng = (1/((y**2-z)**(3/2)))\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-2 x-\\log (5 x+7)-2$\n", - "Output Answer": [ - "$-\\frac{5}{5 x+7}-2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-2*x-log(5*x+7)-2, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-3 x)+\\sin (3 x)$ on the interval $x = 3$ to $x = 3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x)+sin(3*x)\na = 3\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = (y+z)^5$\n", - "Output Answer": [ - "$\\left\\{0,5 (y+z)^4,5 (y+z)^4\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y+z)**5\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3 x^2-2}-\\left(7-x^5\\right)^4$\n", - "Output Answer": [ - "$\\frac{3 x}{\\sqrt{3 x^2-2}}-20 x^4 \\left(x^5-7\\right)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3*x**2-2)-(7-x**5)**4, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6-\\frac{15 x}{2}}+\\sin \\left(\\frac{11 x}{2}+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{225}{16 \\left(6-\\frac{15 x}{2}\\right)^{3/2}}-\\frac{121}{4} \\sin \\left(\\frac{1}{2} (11 x+15)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6-((15*x)/2))+sin(((11*x)/2)+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n \\frac{1}{x} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cbrt(y)\nh = log(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n 0 & z & y \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = y*z\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$(x+5) \\left(\\sin (5)-\\frac{1}{26}\\right)+\\cos (5)+\\tan ^{-1}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-12 x^3 \\cos \\left(3 x^4+2\\right)$\n", - "Output Answer": [ - "$-\\sin \\left(3 x^4+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -12*x**3*cos(3*x**4+2)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2 z^2$, $g(x,y,z) = \\cos ^{-1}(x z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$2 x z^2+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2*z**2\ng = acos(x*z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n 0 & \\cos (y) & 0 \\\\\n \\text{sech}^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/z)\ng = sin(y)\nh = tanh(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x-z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x-z) & 0 & -\\sec ^2(x-z) \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x-z)\ng = math.e**y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = y\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = \\cos ^{-1}(y+z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(y+z)^2}},-1,x \\left(-e^{x y}\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y)\ng = acos(y+z)\nh = acos(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-4 x-7}+2^{2/3}$\n", - "Output Answer": [ - "$16 e^{-4 x-7}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-4*x-7)+2**(2/3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}\\left(x-z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n \\frac{1}{\\left(x-z^3\\right)^2+1} & 0 & -\\frac{3 z^2}{\\left(x-z^3\\right)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = sin(y)\nh = atan(x-z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\cos (x z)$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{y^4}{x}\\right)^{3/2}}$", - "Output Answer": [ - "$3 x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = cos(x*z)\nh = (1/(((y**4)/x)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\log \\left(y^5 z\\right)$, and $h(x,y,z) = y^{10} z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x-z) & 0 & \\sin (x-z) \\\\\n 0 & \\frac{5}{y} & \\frac{1}{z} \\\\\n 0 & 10 y^9 z^2 & 2 y^{10} z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x-z)\ng = log(y**5*z)\nh = y**10*z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z^5 (x-y)^5$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 5 z^5 (x-y)^4 & -5 z^5 (x-y)^4 & 5 z^4 (x-y)^5 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z**5*(x-y)**5\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x+y^2$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y**2\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\cos ^{-1}(z-x)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-(z-x)^2}}+\\frac{1}{2 \\sqrt{x}}-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(sqrt(y)))\nh = acos(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-4 x^2-4\\right)$\n", - "Output Answer": [ - "$-\\frac{2 \\left(x^2-1\\right)}{\\left(x^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-4*x**2-4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(3 x^2+6\\right)+9 x+7$\n", - "Output Answer": [ - "$6 x \\sin \\left(3 \\left(x^2+2\\right)\\right)+9$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(3*x**2+6)+9*x+7, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\sin ^{-1}\\left(2 x^4\\right)$ on the interval $x = 5$ to $x = 5$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(2*x**4)\na = 5\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$8 \\tan (9-4 x)$\n", - "Output Answer": [ - "$-32 \\sec ^2(9-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(8*tan(9-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{3 x+7} \\cos (3-7 x)$\n", - "Output Answer": [ - "$-2 e^{3 x+7} (20 \\cos (3-7 x)-21 \\sin (3-7 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(3*x+7)*cos(3-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{x+z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y+z)\ng = y\nh = cbrt(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^4\\right)$, $g(x,y,z) = \\frac{1}{x^8 y^2}$, and $h(x,y,z) = \\cos \\left(x^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4}{x} & 0 & 0 \\\\\n -\\frac{8}{x^9 y^2} & -\\frac{2}{x^8 y^3} & 0 \\\\\n -4 x^3 \\sin \\left(x^4\\right) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**4)\ng = (1/(x**8*y**2))\nh = cos(x**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{8-3 x^3}+\\cos (5 x+7)$\n", - "Output Answer": [ - "$-\\frac{9 x^2}{2 \\sqrt{8-3 x^3}}-5 \\sin (5 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(8-3*x**3)+cos(5*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{9-7 x^2}$\n", - "Output Answer": [ - "$14 e^{9-7 x^2} \\left(14 x^2-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(9-7*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(5 x+5)-\\sin (3-8 x)$\n", - "Output Answer": [ - "$64 \\sin (3-8 x)-\\frac{125 (x+1)}{\\left(1-25 (x+1)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(5*x+5)-sin(3-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$-\\sin (x)+\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = asin(y)\nh = asin(z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = \\log \\left(y^4\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x+z}} & 0 & \\frac{1}{2 \\sqrt{x+z}} \\\\\n 0 & \\frac{4}{y} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x+z)\ng = log(y**4)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = x^4 y^4$", - "Output Answer": [ - "$-\\sin (x)-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(y**(3/2)))\nh = x**4*y**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(4 x+\\frac{9}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{16 \\left(4 x+\\frac{9}{2}\\right)}{\\left(1-\\frac{1}{4} (8 x+9)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(4*x+(9/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\sqrt{z-x}$", - "Output Answer": [ - "$5 x^4+\\frac{1}{2 \\sqrt{z-x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sqrt(x)\nh = sqrt(z-x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{16}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 16 x^{15} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**16\ng = (1/(y**(3/2)))\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{15 x}{2}-\\frac{1}{2}}$\n", - "Output Answer": [ - "$\\frac{225}{4} e^{\\frac{15 x}{2}-\\frac{1}{2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((15*x)/2)-(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (3-x) \\sin \\left(x^2+5\\right)$\n", - "Output Answer": [ - "$\\sin \\left(x^2+5\\right) \\cos (3-x)-2 x \\sin (3-x) \\cos \\left(x^2+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(3-x)*sin(x**2+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $\\sinh (x)$", - "Output Answer": [ - "$(x-3) \\left(e^3+\\cosh (3)\\right)+e^3+\\sinh (3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = sinh(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x+9} \\log (-5 x-7)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{3} \\left(5 (2 x+3)+(5 x+7)^2 \\log (-5 x-7)\\right)}{(2 x+3)^{3/2} (5 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x+9)*log(-5*x-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x^5$", - "Output Answer": [ - "$\\left(80+\\frac{1}{2 \\sqrt{2}}\\right) (x-2)+\\sqrt{2}+32$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x**5\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{2-4 x} \\tan (1-3 x)$\n", - "Output Answer": [ - "$e^{2-4 x} \\left(4 \\tan (1-3 x)+3 \\sec ^2(1-3 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(2-4*x)*tan(1-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n -\\frac{z}{x^2 \\left(\\frac{z^2}{x^2}+1\\right)} & 0 & \\frac{1}{x \\left(\\frac{z^2}{x^2}+1\\right)} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = y\nh = atan(z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{x z}$, and $h(x,y,z) = \\cosh (x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(x*z))\nh = cosh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin (1-4 x)}{\\log (6 x-4)}$\n", - "Output Answer": [ - "$\\frac{2 \\left(\\frac{3 \\sin (1-4 x)}{6 x-4}+2 \\log (6 x-4) \\cos (1-4 x)\\right)}{\\log ^2(6 x-4)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(1-4*x))/(log(6*x-4))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = cbrt(x+z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{5-\\frac{26 x}{3}}$\n", - "Output Answer": [ - "$\\frac{676}{9} e^{5-\\frac{26 x}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(5-((26*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^2$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$2 (x+y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**2\ng = cos(z)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(2 x^2+\\frac{17}{2}\\right)+\\frac{x}{2}+2$\n", - "Output Answer": [ - "$-4 \\left(8 x^2 \\tan \\left(2 x^2+\\frac{17}{2}\\right)+1\\right) \\sec ^2\\left(2 x^2+\\frac{17}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(2*x**2+(17/2))+(x/2)+2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x+z}^2}+\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+z)\ng = y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4 x-\\frac{11}{2}}-\\sin \\left(5 x^4+\\frac{5}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{2}{\\sqrt{4 x-\\frac{11}{2}}}-20 x^3 \\cos \\left(5 x^4+\\frac{5}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4*x-(11/2))-sin(5*x**4+(5/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2-8 x} \\tan \\left(e^{-8 x-1}\\right)$\n", - "Output Answer": [ - "$-8 e^{1-16 x} \\left(e^{8 x+1} \\tan \\left(e^{-8 x-1}\\right)+\\sec ^2\\left(e^{-8 x-1}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2-8*x)*tan(math.e**(-8*x-1)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x^2-8}+\\log (5 x+6)$\n", - "Output Answer": [ - "$-\\frac{64 x^2}{\\left(8 x^2-8\\right)^{3/2}}+\\frac{8}{\\sqrt{8 x^2-8}}-\\frac{25}{(5 x+6)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x**2-8)+log(5*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (1/(y**2))\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(y^2-x\\right)^2}$", - "Output Answer": [ - "$\\frac{24 y^2}{\\left(y^2-x\\right)^4}-\\frac{4}{\\left(y^2-x\\right)^3}+\\frac{6}{\\left(y^2-x\\right)^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y**2-x)**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-\\frac{9 x^2}{2}-3\\right)^4+\\frac{1}{8 x+5}$\n", - "Output Answer": [ - "$\\frac{45927 x^6}{2}+32805 x^4+13122 x^2+\\frac{128}{(8 x+5)^3}+972$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-((9*x**2)/2)-3)**4+(1/(8*x+5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = \\sin ^{-1}\\left(y-z^4\\right)$, and $h(x,y,z) = \\tan ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{4 z^3}{\\sqrt{1-\\left(y-z^4\\right)^2}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5)\ng = asin(y-z**4)\nh = asin(y-z**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = -\\tan \\left(x-z^2\\right)$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n -\\sec ^2\\left(x-z^2\\right) & 0 & 2 z \\sec ^2\\left(x-z^2\\right) \\\\\n 0 & 0 & -2 z \\sin \\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(x)\ng = -tan(x-z**2)\nh = cos(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = (y+z)^2$", - "Output Answer": [ - "$2 (y+z)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = (y+z)**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\cos (3 x)$ on the interval $x = 2$ to $x = 6$\n", - "Output Answer": [ - "$\\frac{1}{3} (6 E(-9)+E(18-4 \\pi |-9)-E(6-\\pi |-9))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3*x)\na = 2\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x-3}+\\tan (8 x+6)$\n", - "Output Answer": [ - "$e^{x-3}+8 \\sec ^2(8 x+6)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x-3)+tan(8*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{-\\frac{x}{5}-\\frac{39}{5}}-\\tan (7 x+4)$\n", - "Output Answer": [ - "$-\\frac{1}{25} e^{-\\frac{x}{5}-\\frac{39}{5}}-98 \\tan (7 x+4) \\sec ^2(7 x+4)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(-(x/5)-(39/5))-tan(7*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = cbrt(y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & -\\frac{1}{y} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((x/y))\ng = y\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^{10} (x-y)^2$", - "Output Answer": [ - "$90 z^8 (x-y)^2+4 z^{10}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**10*(x-y)**2\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (8 x-8)-\\sqrt{-2 x^2-9}$\n", - "Output Answer": [ - "$\\frac{2 x}{\\sqrt{-2 x^2-9}}+\\frac{1}{x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8*x-8)-sqrt(-2*x**2-9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2-\\frac{16 x}{3}}+\\sin \\left(3-\\frac{13 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{64}{9 \\left(2-\\frac{16 x}{3}\\right)^{3/2}}-\\frac{169}{9} \\sin \\left(3-\\frac{13 x}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2-((16*x)/3))+sin(3-((13*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{x+y}}$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n -\\frac{1}{2 (x+y)^{3/2}} & -\\frac{1}{2 (x+y)^{3/2}} & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = (1/(sqrt(x+y)))\nh = (1/(x**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y^3}\\right)$, $g(x,y,z) = \\left(y^3+z^4\\right)^3$, and $h(x,y,z) = \\sinh ^{-1}\\left(z^4\\right)$", - "Output Answer": [ - "$-\\frac{\\sin \\left(\\frac{x}{y^3}\\right)}{y^3}+9 y^2 \\left(y^3+z^4\\right)^2+\\frac{4 z^3}{\\sqrt{z^8+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/(y**3)))\ng = (y**3+z**4)**3\nh = asinh(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x y-z^5}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = y+z^5$", - "Output Answer": [ - "$y e^{x y-z^5}+\\frac{1}{\\sqrt{1-y^2}}+5 z^4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x*y-z**5)\ng = asin(y)\nh = y+z**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y}}{2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(\\sin \\left(\\frac{5}{2}-2 x\\right)\\right)-\\tan \\left(8 x^4+2\\right)$\n", - "Output Answer": [ - "$2 \\sin \\left(\\sin \\left(\\frac{5}{2}-2 x\\right)\\right) \\cos \\left(\\frac{5}{2}-2 x\\right)-32 x^3 \\sec ^2\\left(8 x^4+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(sin((5/2)-2*x))-tan(8*x**4+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-2 x^2-8}+e^{\\frac{17 x}{2}-5}$\n", - "Output Answer": [ - "$\\frac{17}{2} e^{\\frac{17 x}{2}-5}-\\frac{2 x}{\\sqrt{-2 x^2-8}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-2*x**2-8)+math.e**(((17*x)/2)-5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(6 x+6)-(3 x+5)^4$\n", - "Output Answer": [ - "$6 \\left(\\frac{1}{(6 x+6)^2+1}-2 (3 x+5)^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(6*x+6)-(3*x+5)**4, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x z^3\\right)$, $g(x,y,z) = \\tan \\left(\\frac{z^3}{x}\\right)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$-z^3 \\sin \\left(x z^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z**3)\ng = tan(((z**3)/x))\nh = cbrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x-z^4$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z^4}{y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{z^4}{3 y^2 \\sqrt[3]{\\frac{z^4}{y}}^2},-4 z^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x-z**4\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(4 x^3+3\\right)$\n", - "Output Answer": [ - "$24 x \\left(12 x^3 \\tan \\left(4 x^3+3\\right)+1\\right) \\sec ^2\\left(4 x^3+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(4*x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z)$, $g(x,y,z) = \\frac{1}{\\sqrt{z-y}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 (z-y)^{3/2}},-\\frac{1}{\\sqrt{1-z^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z)\ng = (1/(sqrt(z-y)))\nh = (1/(sqrt(z-y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = y\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = (x+y)^5$\n", - "Output Answer": [ - "$\\left\\{5 (x+y)^4,5 (x+y)^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**5\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x-7)-\\sin (2 x+4)$\n", - "Output Answer": [ - "$\\frac{1}{x-1}-2 \\cos (2 (x+2))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x-7)-sin(2*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(3 x+\\frac{3}{2}\\right)-\\sqrt{6 x-\\frac{7}{2}}$\n", - "Output Answer": [ - "$\\frac{9}{\\left(6 x-\\frac{7}{2}\\right)^{3/2}}-\\frac{9 \\left(3 x+\\frac{3}{2}\\right)}{\\left(1-\\frac{9}{4} (2 x+1)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(3*x+(3/2))-sqrt(6*x-(7/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = \\cos \\left(\\frac{x+y^3}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 3 y^2 \\sec ^2\\left(y^3\\right) & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x+y^3}{z}\\right)}{z} & -\\frac{3 y^2 \\sin \\left(\\frac{x+y^3}{z}\\right)}{z} & \\frac{\\left(x+y^3\\right) \\sin \\left(\\frac{x+y^3}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = tan(y**3)\nh = cos(((x+y**3)/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the eighth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sinh ^{-1}(x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$-\\frac{5 x^{15/2}}{112}+\\frac{3 x^{11/2}}{40}-\\frac{x^{7/2}}{6}+x^{3/2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asinh(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\left(x-z^5\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2} \\sqrt{x-z^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{6} e^{4 x-9} \\sqrt{x}$\n", - "Output Answer": [ - "$\\frac{\\sqrt{\\frac{3}{2}} e^{4 x-9} (8 x+1)}{\\sqrt{x}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(6)*math.e**(4*x-9)*sqrt(x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = sqrt(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y^5}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 5 e^{y^5} y^4 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**(y**5)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(y+z)^{3/2}}$", - "Output Answer": [ - "$1-\\frac{3}{2 (y+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**2))\ng = y\nh = (1/((y+z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{1-x} \\sin \\left(7-x^4\\right)$\n", - "Output Answer": [ - "$e^{1-x} \\left(\\sin \\left(7-x^4\\right)+4 x^3 \\cos \\left(7-x^4\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(1-x)*sin(7-x**4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\tanh (y+z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\text{sech}^2(y+z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = tanh(y+z)\nh = tanh(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(2 x^3\\right)$ on the interval $x = 3$ to $x = 10$\n", - "Output Answer": [ - "$-3 \\sqrt{2}+\\sqrt{109}-\\frac{3}{2} \\log \\left(50 \\left(3-2 \\sqrt{2}\\right)\\right)+\\frac{3}{2} \\log \\left(59-3 \\sqrt{109}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(2*x**3)\na = 3\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh \\left(2 x+\\frac{13}{2}\\right)-\\cos ^{-1}(-8 x-7)$\n", - "Output Answer": [ - "$2 \\sinh \\left(2 x+\\frac{13}{2}\\right)-\\frac{2}{\\sqrt{-4 x^2-7 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cosh(2*x+(13/2))-acos(-8*x-7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (8 x+8)}{(7 x+7)^3}$\n", - "Output Answer": [ - "$\\frac{8 (x+1) \\cos (8 (x+1))-3 \\sin (8 (x+1))}{343 (x+1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(8*x+8))/((7*x+7)**3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cbrt(z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(\\cos ^{-1}\\left(5-3 x^2\\right)\\right)-\\tan \\left(7 x^2+4\\right)$\n", - "Output Answer": [ - "$\\frac{6 x}{\\sqrt{1-\\left(5-3 x^2\\right)^2} \\cos ^{-1}\\left(5-3 x^2\\right)}-14 x \\sec ^2\\left(7 x^2+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(acos(5-3*x**2))-tan(7*x**2+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x^3 y^3$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2},0,3 x^2 y^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x**3*y**3\nh = x**3*y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{z-x^2}$, $g(x,y,z) = y+z$, and $h(x,y,z) = \\frac{z^5}{y^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -2 x e^{z-x^2} & 0 & e^{z-x^2} \\\\\n 0 & 1 & 1 \\\\\n 0 & -\\frac{5 z^5}{y^6} & \\frac{5 z^4}{y^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z-x**2)\ng = y+z\nh = ((z**5)/(y**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\sin (x-z)+\\frac{1}{y}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = log(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{z^2}{x^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{2 z^2}{x^3}+\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/x))\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x-z^2\\right)$, $g(x,y,z) = \\sqrt{y z^2}$, and $h(x,y,z) = \\frac{1}{(x+y)^2}$", - "Output Answer": [ - "$\\cos \\left(x-z^2\\right)+\\frac{z^2}{2 \\sqrt{y z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-z**2)\ng = sqrt(y*z**2)\nh = (1/((x+y)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\frac{1}{y^6}$", - "Output Answer": [ - "$\\left\\{-\\frac{6}{y^7},0,4 x^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x**4\nh = x**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan (x-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\sec ^2(x-y) & -\\sec ^2(x-y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = tan(x-y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y+z}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{2 (y+z)^{3/2}} & -\\frac{1}{2 (y+z)^{3/2}} \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(y+z)))\ng = math.e**y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x^5\\right)^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{15 x^4}{2 \\left(x^5\\right)^{5/2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x**5)**(3/2)))\ng = y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = y\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x z^5}{y}$, $g(x,y,z) = \\frac{y}{z^5}$, and $h(x,y,z) = \\sqrt{z^5}$", - "Output Answer": [ - "$\\left\\{\\frac{5 y}{z^6},\\frac{5 x z^4}{y},\\frac{x z^5}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x*z**5)/y)\ng = (y/(z**5))\nh = (y/(z**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin (x y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$x \\cos (x y)-\\sin (x)+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sin(x*y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(4 x-2)^2+\\sin (1-6 x)$\n", - "Output Answer": [ - "$32 x-6 \\cos (1-6 x)-16$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((4*x-2)**2+sin(1-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{12} y^3$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-3 x^{12} y^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**12*y**3\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{x+y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+y}}-\\sin (x)-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sqrt(x+y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x z)^{3/2}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3}{2} z \\sqrt{x z} & 0 & \\frac{3}{2} x \\sqrt{x z} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x*z)**(3/2)\ng = sqrt(y)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = acos(x)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\frac{x^2}{y^2 z^2}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{\\frac{2 x^2}{y^2 z^3},e^z,\\frac{2 x}{y^2 z^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**z\ng = ((x**2)/(y**2*z**2))\nh = ((x**2)/(y**2*z**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3-3 x^5}$\n", - "Output Answer": [ - "$\\frac{5 \\sqrt{3} x^3 \\left(3 x^5-8\\right)}{4 \\left(1-x^5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3-3*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y^2}{x^4}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$-\\frac{4 y^2}{x^5}-\\frac{3}{2 z^{5/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((y**2)/(x**4))\ng = y\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = z^{3/2}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 \\sqrt{z}}{2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = z**(3/2)\nh = z**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{\\sin (9 x)}{\\sqrt{6-8 x}}$\n", - "Output Answer": [ - "$\\frac{3 \\left(\\left(432 x^2-648 x+239\\right) \\sin (9 x)+12 (4 x-3) \\cos (9 x)\\right)}{\\sqrt{2} (3-4 x)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((sin(9*x))/(sqrt(6-8*x)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 2 x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = (1/y)\nh = x**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x^3 y}{z}\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{15 x^6 y^2}{4 z^4 \\left(\\frac{x^3 y}{z}\\right)^{7/2}}+\\frac{135 x^4 y^2}{4 z^2 \\left(\\frac{x^3 y}{z}\\right)^{7/2}}+\\frac{15 x^6}{4 z^2 \\left(\\frac{x^3 y}{z}\\right)^{7/2}}-\\frac{3 x^3 y}{z^3 \\left(\\frac{x^3 y}{z}\\right)^{5/2}}-\\frac{9 x y}{z \\left(\\frac{x^3 y}{z}\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x**3*y)/z)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sinh ^{-1}(x-y+z)$, and $h(x,y,z) = (y-z)^{3/2}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{(x-y+z)^2+1}}+\\sec ^2(x)-\\frac{3 \\sqrt{y-z}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = asinh(x-y+z)\nh = (y-z)**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{4 x+3} \\tan (x+1)$\n", - "Output Answer": [ - "$-2 e^{4 x+3} \\left(8 \\tan (x+1)+(\\tan (x+1)+4) \\sec ^2(x+1)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(4*x+3)*tan(x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{x+z}$, and $h(x,y,z) = \\log (x+y)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(x+z))\nh = log(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^3}$, $g(x,y,z) = \\cos ^{-1}\\left(x^3+y\\right)$, and $h(x,y,z) = \\left(x^3-z\\right)^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 x^2}{2 \\sqrt{x^3}} & 0 & 0 \\\\\n -\\frac{3 x^2}{\\sqrt{1-\\left(x^3+y\\right)^2}} & -\\frac{1}{\\sqrt{1-\\left(x^3+y\\right)^2}} & 0 \\\\\n 9 x^2 \\left(x^3-z\\right)^2 & 0 & -3 \\left(x^3-z\\right)^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**3)\ng = acos(x**3+y)\nh = (x**3-z)**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(\\frac{x z^2}{y^4}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z^2 \\sinh \\left(\\frac{x z^2}{y^4}\\right)}{y^4},-\\frac{4 x z^2 \\sinh \\left(\\frac{x z^2}{y^4}\\right)}{y^5},\\frac{2 x z \\sinh \\left(\\frac{x z^2}{y^4}\\right)}{y^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh((x*z**2)/(y**4))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (3 x+8) \\sin (8 x)$\n", - "Output Answer": [ - "$\\frac{48 \\cos (8 x)}{3 x+8}+\\left(-\\frac{9}{(3 x+8)^2}-64 \\log (3 x+8)\\right) \\sin (8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(3*x+8)*sin(8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\frac{4096}{125} x^3 \\cos \\left(\\frac{6 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{4096 \\left(4195 \\cos \\left(\\frac{24}{5}\\right)-504 \\sin \\left(\\frac{24}{5}\\right)\\right)}{15625}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S((4096/125)*x**3*cos(((6*x)/5)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(\\frac{9 x^2}{2}+2\\right)^3}$\n", - "Output Answer": [ - "$\\frac{432 \\left(63 x^2-4\\right)}{\\left(9 x^2+4\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((((9*x**2)/2)+2)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{7 x^4+2}-\\sin \\left(3 x^3+6\\right)$\n", - "Output Answer": [ - "$x \\left(\\frac{x \\left(98 x^4+81 \\left(7 x^4+2\\right)^{3/2} x^2 \\sin \\left(3 \\left(x^3+2\\right)\\right)+84\\right)}{\\left(7 x^4+2\\right)^{3/2}}-18 \\cos \\left(3 \\left(x^3+2\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(7*x**4+2)-sin(3*x**3+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x-z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x-z}} & 0 & -\\frac{1}{2 \\sqrt{x-z}} \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{2 \\sqrt{x-y}} & -\\frac{1}{2 \\sqrt{x-y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x-z)\ng = y\nh = sqrt(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n z e^{x z} & 0 & x e^{x z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = y\nh = math.e**(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y**3\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x^4}{y z}\\right)$, $g(x,y,z) = \\frac{x^8}{z^2}$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{4}{x} & -\\frac{1}{y} & -\\frac{1}{z} \\\\\n \\frac{8 x^7}{z^2} & 0 & -\\frac{2 x^8}{z^3} \\\\\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(((x**4)/(y*z)))\ng = ((x**8)/(z**2))\nh = -tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x+4} \\sqrt{-x^2-1}$\n", - "Output Answer": [ - "$-\\frac{e^{7 x+4} \\left(7 x^2+x+7\\right)}{\\sqrt{-x^2-1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x+4)*sqrt(-x**2-1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{\\frac{x^5}{y}+z}$", - "Output Answer": [ - "$-\\frac{2 x^{10}}{9 y^4 \\left(\\frac{x^5}{y}+z\\right) \\sqrt[3]{\\frac{x^5}{y}+z}^2}-\\frac{50 x^8}{9 y^2 \\left(\\frac{x^5}{y}+z\\right) \\sqrt[3]{\\frac{x^5}{y}+z}^2}+\\frac{2 x^5}{3 y^3 \\sqrt[3]{\\frac{x^5}{y}+z}^2}+\\frac{20 x^3}{3 y \\sqrt[3]{\\frac{x^5}{y}+z}^2}-\\frac{2}{9 \\left(\\frac{x^5}{y}+z\\right) \\sqrt[3]{\\frac{x^5}{y}+z}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(((x**5)/y)+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\{0,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{-x-5} \\sin \\left(\\frac{17 x}{2}+2\\right)$\n", - "Output Answer": [ - "$\\frac{1}{2} e^{-x-5} \\left(2 \\sin \\left(\\frac{17 x}{2}+2\\right)-17 \\cos \\left(\\frac{17 x}{2}+2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(-x-5)*sin(((17*x)/2)+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\left(y^5\\right)^{3/2}$, and $h(x,y,z) = \\tan \\left(y^5\\right)$", - "Output Answer": [ - "$\\left\\{5 y^4 \\sec ^2\\left(y^5\\right),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (y**5)**(3/2)\nh = (y**5)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\frac{15 x^2}{2}+5\\right)-\\cos \\left(\\frac{15}{2}-\\frac{13 x}{2}\\right)$\n", - "Output Answer": [ - "$15 x \\sec ^2\\left(\\frac{15 x^2}{2}+5\\right)-\\frac{13}{2} \\sin \\left(\\frac{1}{2} (15-13 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(((15*x**2)/2)+5)-cos((15/2)-((13*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sin ^{-1}\\left(x y^2\\right)$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x+z}},\\frac{y^2}{\\sqrt{1-x^2 y^4}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = asin(x*y**2)\nh = asin(x*y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(1-3 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{18 x \\left(18 x^6-3 x^3-2\\right)}{\\left(9 x^6-6 x^3+2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(1-3*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\frac{y}{z}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-z^2}}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = (y/z)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(9-2 x^3\\right)-\\tan (6 x+3)$\n", - "Output Answer": [ - "$-6 \\left(x^2 \\sec ^2\\left(9-2 x^3\\right)+\\sec ^2(6 x+3)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(9-2*x**3)-tan(6*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$x^2 \\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = log(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^3}{x^3}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{3 z^3}{x^4}+\\sec ^2(y)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**3)/(x**3))\ng = tan(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (8-9 x)$\n", - "Output Answer": [ - "$-81 \\sin (8-9 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(8-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+y^3}$, $g(x,y,z) = y^{12}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+y^3} & 3 y^2 e^{x+y^3} & 0 \\\\\n 0 & 12 y^{11} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+y**3)\ng = y**12\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = (z/y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x z)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$z \\text{sech}^2(x z)-\\frac{1}{2 y^{3/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x*z)\ng = (1/(sqrt(y)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y+z)$, $g(x,y,z) = \\sqrt{x-y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,\\cos (y+z),\\frac{1}{2 \\sqrt{x-y}}-\\cos (y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y+z)\ng = sqrt(x-y)\nh = sqrt(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = (x+z)^4$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$\\left\\{-4 (x+z)^3,-1,4 (x+z)^3-\\frac{3 \\sqrt{y}}{2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**(3/2)\ng = (x+z)**4\nh = (x+z)**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cosh (8-7 x)-\\cos (2 x+3)$\n", - "Output Answer": [ - "$2 \\sin (2 x+3)-7 \\sinh (8-7 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cosh(8-7*x)-cos(2*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{(y+z)^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{z^5}{x^5}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{3}{2 (y+z)^{5/2}} & -\\frac{3}{2 (y+z)^{5/2}} \\\\\n 0 & 1 & 0 \\\\\n -\\frac{5 z^5}{x^6} & 0 & \\frac{5 z^4}{x^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((y+z)**(3/2)))\ng = y\nh = ((z**5)/(x**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(4 x+\\frac{15}{2}\\right)-\\tan ^{-1}\\left(\\frac{11 x}{2}+1\\right)$\n", - "Output Answer": [ - "$\\frac{484 (11 x+2)}{\\left(121 x^2+44 x+8\\right)^2}-16 \\cos \\left(4 x+\\frac{15}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4*x+(15/2))-atan(((11*x)/2)+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sinh \\left(\\frac{x^2}{y}-z\\right)$", - "Output Answer": [ - "$\\frac{x^4 \\sinh \\left(\\frac{x^2}{y}-z\\right)}{y^4}+\\frac{4 x^2 \\sinh \\left(\\frac{x^2}{y}-z\\right)}{y^2}+\\frac{2 x^2 \\cosh \\left(\\frac{x^2}{y}-z\\right)}{y^3}+\\sinh \\left(\\frac{x^2}{y}-z\\right)+\\frac{2 \\cosh \\left(\\frac{x^2}{y}-z\\right)}{y}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(((x**2)/y)-z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**y\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\log \\left(-\\frac{7 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{1}{24}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(log(-((7*x)/2)))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = sqrt(y)\nh = sin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x^2+1}}+\\cos (y)+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = sin(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-x^2} \\sin (2 x+5)$\n", - "Output Answer": [ - "$\\frac{-2 \\left(x^2-1\\right) \\cos (2 x+5)-x \\sin (2 x+5)}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-x**2)*sin(2*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-y)^{3/2}$, $g(x,y,z) = \\sqrt{x y+z}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{x}{2 \\sqrt{x y+z}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-y)**(3/2)\ng = sqrt(x*y+z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = x^{3/2}$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = x**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(2-x^3\\right)$\n", - "Output Answer": [ - "$\\frac{3 x \\left(x^6+2 x^3-6\\right)}{\\left(-x^6+4 x^3-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(2-x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = e^{z-x}$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y^2+1}-e^{z-x},0,-e^{z-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x)\ng = math.e**(z-x)\nh = math.e**(z-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(z^5\\right)$, $g(x,y,z) = e^{x y-z^5}$, and $h(x,y,z) = e^{x y}$", - "Output Answer": [ - "$\\left\\{5 z^4 e^{x y-z^5}+x e^{x y},\\frac{5 z^4}{z^{10}+1}-y e^{x y},y e^{x y-z^5}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z**5)\ng = math.e**(x*y-z**5)\nh = math.e**(x*y-z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = z^2 (x-y)^2$, and $h(x,y,z) = \\tan (x y-z)$", - "Output Answer": [ - "$\\left\\{x \\sec ^2(x y-z)-2 z (x-y)^2,-y \\sec ^2(x y-z),2 z^2 (x-y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = z**2*(x-y)**2\nh = z**2*(x-y)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\sin (z (x-y))$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n z \\cos (z (x-y)) & -z \\cos (z (x-y)) & (x-y) \\cos (z (x-y)) \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = sin(z*(x-y))\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x y)^{3/2}}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan (x y+z)$", - "Output Answer": [ - "$\\sec ^2(x y+z)-\\frac{3 y}{2 (x y)^{5/2}}-\\sin (y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y)**(3/2)))\ng = cos(y)\nh = tan(x*y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(7 x+4)-\\sqrt{-7 x^5-1}$\n", - "Output Answer": [ - "$\\frac{1225 x^8}{4 \\left(-7 x^5-1\\right)^{3/2}}+\\frac{70 x^3}{\\sqrt{-7 x^5-1}}+\\frac{49 (7 x+4)}{\\left(1-(7 x+4)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(7*x+4)-sqrt(-7*x**5-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{x z}{y^3}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{z \\sec ^2\\left(\\frac{x z}{y^3}\\right)}{y^3},-\\frac{3 x z \\sec ^2\\left(\\frac{x z}{y^3}\\right)}{y^4},\\frac{x \\sec ^2\\left(\\frac{x z}{y^3}\\right)}{y^3}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((x*z)/(y**3)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\tan ^{-1}(x)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = atan(x)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^5$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\cos (y-z),0,-5 y^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**5\ng = -sin(y-z)\nh = -sin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\cos ^{-1}\\left(y^4\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\cosh (x)-\\frac{4 y^3}{\\sqrt{1-y^8}}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = acos(y**4)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^z-5 y^4 \\sin \\left(y^5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = cos(y**5)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\cos (x+y)+e^x+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(x+y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\left\\{-x \\sin (x y),y \\sin (x y)+x \\sec ^2(x z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*z)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x-z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\left\\{0,-e^{x-z}-\\cos (x+z),0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x-z)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y+z}$, $g(x,y,z) = \\cos (x y)$, and $h(x,y,z) = -\\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y+z}^2} & \\frac{1}{3 \\sqrt[3]{y+z}^2} \\\\\n -y \\sin (x y) & -x \\sin (x y) & 0 \\\\\n 0 & -\\sec ^2(y-z) & \\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y+z)\ng = cos(x*y)\nh = -tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\sec ^2(y-z) & -\\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = asin(y)\nh = tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = z (x+y)$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\{-x-y,-\\cos (x+z),z\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = z*(x+y)\nh = z*(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y z}$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y*z)\ng = y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan (x-z)$, $g(x,y,z) = \\cos \\left(y^5-z\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\sec ^2(x-z)-5 y^4 \\sin \\left(y^5-z\\right)+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -tan(x-z)\ng = cos(y**5-z)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (1)}{\\sqrt{2-x}}$\n", - "Output Answer": [ - "$\\frac{\\sin (1)}{2 (2-x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(1))/(sqrt(2-x))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\sqrt{x-y}$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x y}^2}+\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = cbrt(x*y)\nh = sqrt(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(3-5 x^3\\right)$\n", - "Output Answer": [ - "$-15 x \\left(15 x^3 \\sin \\left(3-5 x^3\\right)+2 \\cos \\left(3-5 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(3-5*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y+z^5$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sin \\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 5 z^4 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & 5 z^4 \\cos \\left(z^5\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y+z**5\ng = (1/y)\nh = sin(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 4 x^2$ on the interval $x = 5$ to $x = 9$\n", - "Output Answer": [ - "$\\frac{1}{16} \\left(-40 \\sqrt{1601}+72 \\sqrt{5185}-\\sinh ^{-1}(40)+\\sinh ^{-1}(72)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 4*x**2\na = 5\nb = 9\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$e^x-\\cos (y-z)+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = -sin(y-z)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(5 x^5-5\\right)$\n", - "Output Answer": [ - "$-\\frac{25 x^3 \\left(25 x^{10}+75 x^5-96\\right)}{\\left(-25 x^{10}+50 x^5-24\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(5*x**5-5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x+z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & -\\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x+z)\ng = tan(y)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x+y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x+y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{5 z^4}{z^{10}+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = y\nh = atan(z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x-4} \\sqrt{-9 x-4}$\n", - "Output Answer": [ - "$\\frac{e^{2 x-4} \\left(1296 x^2+1800 x+463\\right)}{4 (-9 x-4)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x-4)*sqrt(-9*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(1-6 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{18 x \\left(36 x^6-3 x^3-1\\right)}{\\left(18 x^6-6 x^3+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(1-6*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (1-4 x)-\\log (-8 x-9)$\n", - "Output Answer": [ - "$-\\frac{8}{8 x+9}-4 \\sec ^2(1-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(1-4*x)-log(-8*x-9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(\\frac{x}{y z}\\right)$", - "Output Answer": [ - "$\\frac{x \\sin \\left(\\frac{x}{y z}\\right)}{y z^2}+\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(y)\nh = cos((x/(y*z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^4 z}{y^2}$", - "Output Answer": [ - "$\\frac{6 x^4 z}{y^4}+\\frac{12 x^2 z}{y^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4*z)/(y**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{y z^4}}$", - "Output Answer": [ - "$\\frac{4 x}{9 y^3 z^4 \\sqrt[3]{\\frac{x}{y z^4}}^2}+\\frac{28 x}{9 y z^6 \\sqrt[3]{\\frac{x}{y z^4}}^2}-\\frac{2}{9 x y z^4 \\sqrt[3]{\\frac{x}{y z^4}}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x/(y*z**4))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^2\\right)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$-\\frac{2 x}{\\sqrt{1-x^4}}+\\frac{1}{2 \\sqrt{y+z}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**2)\ng = sqrt(y+z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = -\\sinh ^{-1}(y-z)$", - "Output Answer": [ - "$\\frac{2 (y-z)}{\\left((y-z)^2+1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asinh(y-z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = -\\sin (y-z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{-\\cos (y-z),0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = -sin(y-z)\nh = -sin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x+y^4\\right)^2$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = y^{12}$", - "Output Answer": [ - "$\\left\\{12 y^{11},0,-8 y^3 \\left(x+y^4\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y**4)**2\ng = sin(y**4)\nh = sin(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x^2+1}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(x)\ng = y\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y^9$, $g(x,y,z) = \\sqrt[3]{y^3}$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-x^2}},-9 y^8\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**9\ng = cbrt(y**3)\nh = cbrt(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\left(x y+z^3\\right)^2$, and $h(x,y,z) = \\sin \\left(y z^3\\right)$", - "Output Answer": [ - "$\\left\\{z^3 \\cos \\left(y z^3\\right)-6 z^2 \\left(x y+z^3\\right),0,2 y \\left(x y+z^3\\right)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (x*y+z**3)**2\nh = (x*y+z**3)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-4 x^2}-\\tan \\left(8-7 x^4\\right)$\n", - "Output Answer": [ - "$28 x^3 \\sec ^2\\left(8-7 x^4\\right)-8 e^{8-4 x^2} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-4*x**2)-tan(8-7*x**4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = -\\tan ^{-1}(y-z)$, and $h(x,y,z) = \\left(\\frac{x}{z}\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(y-z)^2+1},y-\\frac{3 \\sqrt{\\frac{x}{z}}}{2 z},-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = -atan(y-z)\nh = -atan(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x y$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,y\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x*y\nh = x*y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\{0,-y \\sin (y z),z \\sin (y z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = \\sqrt{\\frac{z}{y^5}}$", - "Output Answer": [ - "$e^x+\\frac{1}{2 y^5 \\sqrt{\\frac{z}{y^5}}}+5 y^4 \\sec ^2\\left(y^5\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = tan(y**5)\nh = sqrt((z/(y**5)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\tan (5-x)}{\\log (7 x-5)}$\n", - "Output Answer": [ - "$-\\frac{\\frac{7 \\tan (5-x)}{7 x-5}+\\log (7 x-5) \\sec ^2(5-x)}{\\log ^2(7 x-5)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((tan(5-x))/(log(7*x-5))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x-2} \\sqrt{-x-4}$\n", - "Output Answer": [ - "$\\frac{e^{-9 x-2} (18 x+71)}{2 \\sqrt{-x-4}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x-2)*sqrt(-x-4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y+z$, $g(x,y,z) = y+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 1 \\\\\n 0 & 1 & 1 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y+z\ng = y+z\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z-x}$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n 1 & 0 & -1 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z-x)\ng = x-z\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = \\frac{1}{(z-y)^2}$, and $h(x,y,z) = \\tanh ^{-1}(x z)$", - "Output Answer": [ - "$\\frac{x}{1-x^2 z^2}-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}+\\frac{2}{(z-y)^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = (1/((z-y)**2))\nh = atanh(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(x^4\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x^4 z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 \\sec ^2\\left(x^4\\right) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 4 x^3 z & 0 & x^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x**4)\ng = cos(y)\nh = x**4*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z^2-x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{\\sqrt{z^2-x}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z**2-x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-2} \\cos (7-6 x)$\n", - "Output Answer": [ - "$4 e^{-8 x-2} (7 \\cos (7-6 x)-24 \\sin (7-6 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-2)*cos(7-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\left(\\frac{x}{y z}\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{1}{x}-\\frac{3 x \\sqrt{\\frac{x}{y z}}}{2 y z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = (y/x)\nh = (x/(y*z))**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-5 x^4-\\frac{7}{2}\\right)^2}$\n", - "Output Answer": [ - "$\\frac{960 x^2 \\left(30 x^4-7\\right)}{\\left(10 x^4+7\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-5*x**4-(7/2))**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y-z}$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{y z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y-z)\ng = sqrt(y*z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(3 x^3+1\\right)+\\tan (3 x+5)$\n", - "Output Answer": [ - "$3 \\left(3 x^2 \\sec ^2\\left(3 x^3+1\\right)+\\sec ^2(3 x+5)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(3*x**3+1)+tan(3*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{\\sin \\left(\\frac{z}{x}\\right)}{x},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((z/x))\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x z}$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2 z} & 0 & -\\frac{1}{x z^2} \\\\\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x*z))\ng = z\nh = atan(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(\\frac{x y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},-\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(x+3)^4 \\sqrt{7 x^2-6}$\n", - "Output Answer": [ - "$\\frac{(x+3)^3 \\left(35 x^2+21 x-24\\right)}{\\sqrt{7 x^2-6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((x+3)**4*sqrt(7*x**2-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt{y z}$, and $h(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\cos (x)+\\frac{z}{2 \\sqrt{y z}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sqrt(y*z)\nh = log((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\cos \\left(3 x^2+4\\right)\\right)-\\log (5-6 x)$\n", - "Output Answer": [ - "$\\frac{6}{5-6 x}-6 x \\sin \\left(3 x^2+4\\right) \\cos \\left(\\cos \\left(3 x^2+4\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(cos(3*x**2+4))-log(5-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = z-x$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -1 & 0 & 1 \\\\\n e^{x+y} & e^{x+y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = z-x\nh = math.e**(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^9$, $g(x,y,z) = \\cos (y z)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x^3}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 9 x^8 & 0 & 0 \\\\\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n -\\frac{3 z}{x^4 \\sqrt{1-\\frac{z^2}{x^6}}} & 0 & \\frac{1}{x^3 \\sqrt{1-\\frac{z^2}{x^6}}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**9\ng = cos(y*z)\nh = asin(z/(x**3))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (3 x)$\n", - "Output Answer": [ - "$-18 \\tan (3 x) \\sec ^2(3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh \\left(\\frac{y^2}{z}\\right)$, and $h(x,y,z) = \\sqrt{y^2 z}$", - "Output Answer": [ - "$\\left\\{\\frac{y^2 \\sinh \\left(\\frac{y^2}{z}\\right)}{z^2}+\\frac{y z}{\\sqrt{y^2 z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh((y**2)/z)\nh = cosh((y**2)/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{3} \\sqrt{-x}+\\tan (8-6 x)$\n", - "Output Answer": [ - "$-\\frac{\\sqrt{3}}{2 \\sqrt{-x}}-6 \\sec ^2(8-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(3)*sqrt(-x)+tan(8-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (6)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^4\\right)^{3/2}$, $g(x,y,z) = \\sinh \\left(z^4\\right)$, and $h(x,y,z) = \\frac{1}{\\left(z^4-y\\right)^2}$", - "Output Answer": [ - "$6 x^3 \\sqrt{x^4}-\\frac{8 z^3}{\\left(z^4-y\\right)^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**4)**(3/2)\ng = sinh(z**4)\nh = (1/((z**4-y)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin ^{-1}\\left(y-z^4\\right)$, $g(x,y,z) = \\tan \\left(\\frac{x^2}{y}\\right)$, and $h(x,y,z) = \\sqrt[3]{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{\\sqrt{1-\\left(y-z^4\\right)^2}} & \\frac{4 z^3}{\\sqrt{1-\\left(y-z^4\\right)^2}} \\\\\n \\frac{2 x \\sec ^2\\left(\\frac{x^2}{y}\\right)}{y} & -\\frac{x^2 \\sec ^2\\left(\\frac{x^2}{y}\\right)}{y^2} & 0 \\\\\n 0 & 0 & \\frac{4 z^3}{3 \\sqrt[3]{z^4}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -asin(y-z**4)\ng = tan(((x**2)/y))\nh = cbrt(z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y-z$, $g(x,y,z) = x$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y-z\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{10135}{676} (x-5)^2+\\frac{1951 (x-5)}{26}+125+\\tan ^{-1}(5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = atan(x)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(y^3+z\\right)$", - "Output Answer": [ - "$-\\frac{9 y^4}{\\left(y^3+z\\right)^2}+\\frac{6 y}{y^3+z}-\\frac{1}{\\left(y^3+z\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y**3+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6-9 x} \\cos (8-3 x)$\n", - "Output Answer": [ - "$-3 e^{6-9 x} (3 \\cos (8-3 x)-\\sin (8-3 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6-9*x)*cos(8-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^4}{z^4}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{4 y^3}{z^4} & -\\frac{4 y^4}{z^5} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**4)/(z**4))\ng = cos(y)\nh = (1/(y**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\cosh (x)+\\frac{3 \\sqrt{y}}{2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = y**(3/2)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the seventh order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$-\\frac{x^6}{720}+\\frac{x^4}{24}-\\frac{x^2}{2}-\\sqrt{x}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{x^2}+\\frac{1}{2 \\sqrt{y}}+\\frac{1}{1-z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = sqrt(y)\nh = atanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^5}{y^5 z^{20}}$", - "Output Answer": [ - "$\\frac{30 x^5}{y^7 z^{20}}+\\frac{420 x^5}{y^5 z^{22}}+\\frac{20 x^3}{y^5 z^{20}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**5)/(y**5*z**20))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}-z\\right)^{3/2}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$3 x^2+\\frac{3 x}{2 y^2 \\left(\\frac{x}{y}-z\\right)^{5/2}}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = (1/(((x/y)-z)**(3/2)))\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{z} & 0 & -\\frac{x}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = sqrt(y)\nh = (x/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x-7} \\sqrt{-5 x-9}$\n", - "Output Answer": [ - "$\\frac{e^{2 x-7} \\left(400 x^2+1640 x+1631\\right)}{4 (-5 x-9)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x-7)*sqrt(-5*x-9)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x+7}+\\sin (\\tan (6 x+8))$\n", - "Output Answer": [ - "$\\frac{5}{2 \\sqrt{5 x+7}}+6 \\sec ^2(6 x+8) \\cos (\\tan (6 x+8))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x+7)+sin(tan(6*x+8)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$\\{0,-z \\cos (x z),-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-x\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = e^{y z}$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\left\\{5 y^4-y e^{y z},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = math.e**(y*z)\nh = math.e**(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (3 x)-\\sin (2-2 x)$\n", - "Output Answer": [ - "$2 \\cos (2-2 x)+3 \\sec ^2(3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(3*x)-sin(2-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left\\{0,\\frac{z}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(y**2))\nh = (1/(y**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x+y$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{y^2+1}+\\frac{1}{3 \\sqrt[3]{z}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y\ng = atan(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4-2 x}-\\tan (1-8 x)$\n", - "Output Answer": [ - "$4 \\left(e^{4-2 x}-32 \\tan (1-8 x) \\sec ^2(1-8 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4-2*x)-tan(1-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z^2+1},\\frac{1}{2 \\sqrt{x}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(-2 x^2\\right)$ on the interval $x = 4$ to $x = 14$\n", - "Output Answer": [ - "$10 \\sqrt{2}-2 \\sqrt{5}+\\log (49)-\\log \\left(51+10 \\sqrt{2}\\right)+\\log \\left(\\frac{1}{2} \\left(3+\\sqrt{5}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-2*x**2)\na = 4\nb = 14\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = log(y*z)\nh = log(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7 x-7}-\\cos \\left(8-x^4\\right)$\n", - "Output Answer": [ - "$\\frac{7}{2 \\sqrt{7 x-7}}-4 x^3 \\sin \\left(8-x^4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7*x-7)-cos(8-x**4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z}$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{y z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{1}{z^2} \\\\\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n 0 & \\frac{z}{2 \\sqrt{y z}} & \\frac{y}{2 \\sqrt{y z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/z)\ng = acosh(y)\nh = sqrt(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = \\sinh ^{-1}(z (x+y))$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{z^2 (x+y)^2+1}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = asinh(z*(x+y))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (7-6 x) \\tan (4-6 x)$\n", - "Output Answer": [ - "$6 \\sin (7-6 x) \\tan (4-6 x)-6 \\cos (7-6 x) \\sec ^2(4-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(7-6*x)*tan(4-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2-x$, and $h(x,y,z) = z \\left(x-y^2\\right)$", - "Output Answer": [ - "$x-y^2+2 y+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2-x\nh = z*(x-y**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{x^2+1}+\\frac{1}{y}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = log(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\cosh (x)+4 y^3-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = y**4\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$\\sqrt{\\frac{14}{5}} \\sqrt{x}$\n", - "Output Answer": [ - "$-\\frac{1}{256} i \\sqrt{\\frac{7}{10}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt((14/5))*sqrt(x))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x^2 y^3}$", - "Output Answer": [ - "$-\\frac{x^2 y^6}{\\left(x^2 y^3\\right)^{3/2}}-\\frac{9 x^4 y^4}{4 \\left(x^2 y^3\\right)^{3/2}}+\\frac{y^3}{\\sqrt{x^2 y^3}}+\\frac{3 x^2 y}{\\sqrt{x^2 y^3}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**2*y**3)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log \\left(\\frac{x-y}{z}\\right)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{z},0,\\frac{1}{x-y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(((x-y)/z))\nh = log(((x-y)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-x)^{3/2}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$-\\frac{3 \\sqrt{y-x}}{2}-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**(3/2)\ng = (1/(y**(3/2)))\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{2 x+\\frac{13}{2}}{(8-7 x)^5}$\n", - "Output Answer": [ - "$-\\frac{35 (56 x+305)}{(7 x-8)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((2*x+(13/2))/((8-7*x)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sqrt[3]{x+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2} & \\frac{\\sec ^2\\left(\\frac{z}{y}\\right)}{y} \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x+z}^2} & 0 & \\frac{1}{3 \\sqrt[3]{x+z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan((z/y))\ng = atanh(y)\nh = cbrt(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-2 x^5-7}$\n", - "Output Answer": [ - "$20 e^{-2 x^5-7} x^3 \\left(5 x^5-2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-2*x**5-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\sqrt{x^2}$", - "Output Answer": [ - "$-80 (x+2)^2+79 (x+2)-30$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = sqrt(x**2)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^4\\right)$, $g(x,y,z) = x^4$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2},0,4 x^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**4)\ng = x**4\nh = x**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan (3 x)$ on the interval $x = 4$ to $x = 8$\n", - "Output Answer": [ - "$\\int_4^8 \\sqrt{9 \\sec ^4(3 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(3*x)\na = 4\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y+z)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,-\\sin (y+z),\\sec ^2(x)+\\sin (y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y+z)\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (y-z)$, $g(x,y,z) = e^{x y-z}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$x e^{x y-z}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(y-z)\ng = math.e**(x*y-z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z-y)$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z-y},\\frac{1}{x+y}+\\frac{1}{z-y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z-y)\ng = log(x+y)\nh = log(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 1$ on the interval $x = 4$ to $x = 6$\n", - "Output Answer": [ - "$2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 1\na = 4\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$2 \\sqrt{x^2}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 2*sqrt(x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y+z$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & 1 & 1 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = y+z\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(x^5 y+z\\right)^5$\n", - "Output Answer": [ - "$\\left\\{25 x^4 y \\left(x^5 y+z\\right)^4,5 x^5 \\left(x^5 y+z\\right)^4,5 \\left(x^5 y+z\\right)^4\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**5*y+z)**5\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = \\left(\\frac{y^5}{x}\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{15 y^4 \\sqrt{\\frac{y^5}{x}}}{2 x},\\frac{3 y^5 \\sqrt{\\frac{y^5}{x}}}{2 x^2},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = cos(y**5)\nh = cos(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 2 \\sqrt{x^2}$ on the interval $x = 5$ to $x = 10$\n", - "Output Answer": [ - "$5 \\sqrt{5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 2*sqrt(x**2)\na = 5\nb = 10\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^4\\right)$ and $g(x) = $\\tan \\left(x^4\\right)$", - "Output Answer": [ - "$-500 (x+5) \\cos (625)+(x+5)^2 (150 \\cos (625)-125000 \\sin (625))+\\sin (625)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**4)\ng = tan(x**4)\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^3-y\\right)^5$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,5 \\left(x^3-y\\right)^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**3-y)**5\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sinh ^{-1}(x-z)$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{(x-z)^2+1}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asinh(x-z)\ng = tan(y**5)\nh = tan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(4 x+\\frac{20}{3}\\right)$\n", - "Output Answer": [ - "$-32 \\tan \\left(4 x+\\frac{20}{3}\\right) \\sec ^2\\left(4 x+\\frac{20}{3}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(4*x+(20/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-x}},\\frac{1}{2 \\sqrt{y-x}},-x\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\tan (x+z)$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\sec ^2(x+z) & 0 & \\sec ^2(x+z) \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = tan(x+z)\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x}{y^2}-z$", - "Output Answer": [ - "$\\frac{6 x}{y^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(y**2))-z\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4 x-7}-\\log \\left(2-9 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{45 x^4}{2-9 x^5}+\\frac{2}{\\sqrt{4 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4*x-7)-log(2-9*x**5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(4 x+1)^4}-\\sin (8 x+7)$\n", - "Output Answer": [ - "$-\\frac{16}{(4 x+1)^5}-8 \\cos (8 x+7)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((4*x+1)**4))-sin(8*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = x$, and $h(x,y,z) = \\cosh (x+z)$", - "Output Answer": [ - "$y \\cos (x y)+\\sinh (x+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = x\nh = cosh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\cos \\left(x^5\\right)$", - "Output Answer": [ - "$(x-5) (\\cos (5) \\sec (3125)+3125 \\sin (5) \\tan (3125) \\sec (3125))+\\sin (5) \\sec (3125)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = cos(x**5)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\sin (z)$, and $h(x,y,z) = e^{\\frac{y^5}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\cos (z) \\\\\n -\\frac{y^5 e^{\\frac{y^5}{x}}}{x^2} & \\frac{5 y^4 e^{\\frac{y^5}{x}}}{x} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(z)\ng = sin(z)\nh = math.e**((y**5)/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{16 x}{3}-\\frac{5}{3}\\right)^2-\\cos \\left(\\frac{x}{3}+4\\right)$\n", - "Output Answer": [ - "$\\frac{1}{9} \\left(512 x+3 \\sin \\left(\\frac{x}{3}+4\\right)-160\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((((16*x)/3)-(5/3))**2-cos((x/3)+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(\\frac{15 x}{2}+\\frac{11}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{36 (15 x+11)}{\\left(45 x^2+66 x+25\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(((15*x)/2)+(11/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(5 x^3+7\\right)-\\tan \\left(8 x^2+7\\right)$\n", - "Output Answer": [ - "$225 x^4 \\sin \\left(5 x^3+7\\right)-30 x \\cos \\left(5 x^3+7\\right)-16 \\left(32 x^2 \\tan \\left(8 x^2+7\\right)+1\\right) \\sec ^2\\left(8 x^2+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(5*x**3+7)-tan(8*x**2+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = x^2+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 2 x & 0 & 1 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = x**2+z\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\cosh ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = acosh(x/z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$, $g(x,y,z) = y z$, and $h(x,y,z) = \\frac{1}{y^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & z & y \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((y/x))\ng = y*z\nh = (1/(y**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{5 x}{2}+\\frac{3}{2}}+\\frac{1}{\\left(\\frac{17 x}{2}+\\frac{5}{2}\\right)^5}$\n", - "Output Answer": [ - "$\\frac{5}{2 \\sqrt{10 x+6}}-\\frac{2720}{(17 x+5)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(((5*x)/2)+(3/2))+(1/((((17*x)/2)+(5/2))**5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\left(\\frac{x}{y}\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 x \\sqrt{\\frac{x}{y}}}{2 y^2},-\\frac{3 \\sqrt{\\frac{x}{y}}}{2 y},-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = asin(y)\nh = asin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{2-x}}{(-9 x-3)^4}$\n", - "Output Answer": [ - "$-\\frac{e^{2-x} (3 x+13)}{81 (3 x+1)^5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(2-x))/((-9*x-3)**4)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (z-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = cos(y)\nh = log(z-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\{\\cos (y+z),1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos \\left(x^3\\right)$", - "Output Answer": [ - "$(x-2) \\left(\\frac{\\cos (8)}{2}-12 \\log (2) \\sin (8)\\right)+\\log (2) \\cos (8)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cos(x**3)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x}{y^3}+z}$", - "Output Answer": [ - "$-\\frac{9 x^2}{4 y^8 \\left(\\frac{x}{y^3}+z\\right)^{3/2}}+\\frac{6 x}{y^5 \\sqrt{\\frac{x}{y^3}+z}}-\\frac{1}{4 y^6 \\left(\\frac{x}{y^3}+z\\right)^{3/2}}-\\frac{1}{4 \\left(\\frac{x}{y^3}+z\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((x/(y**3))+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(8-5 x)$\n", - "Output Answer": [ - "$-\\frac{25 (8-5 x)}{\\left(1-(8-5 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(8-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{y}{x}\\right)^{3/2}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 y \\sqrt{\\frac{y}{x}}}{2 x^2} & \\frac{3 \\sqrt{\\frac{y}{x}}}{2 x} & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)**(3/2)\ng = asinh(y)\nh = asinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^2}{x^5}$, $g(x,y,z) = y^8$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left\\{0,\\frac{2 z}{x^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/(x**5))\ng = y**8\nh = y**8\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x^2 z^2$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 2 x z^2 & 0 & 2 x^2 z \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = x**2*z**2\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z-y}$, $g(x,y,z) = y^3$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$3 y^2-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z-y)\ng = y**3\nh = x-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin (5 x) (-\\cos (3 x))$ on the interval $x = 4$ to $x = 4$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(5*x)*(-cos(3*x))\na = 4\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x+z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**4\nh = y**4\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{7 x}{2}+\\frac{1}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{4} \\cos \\left(\\frac{1}{2} (7 x+1)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(((7*x)/2)+(1/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(2-x^3\\right)-\\tan (6 x+7)$\n", - "Output Answer": [ - "$-3 \\left(x^2 \\sin \\left(2-x^3\\right)+2 \\sec ^2(6 x+7)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos(2-x**3)-tan(6*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{x y}$, and $h(x,y,z) = e^{y+z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & e^{y+z} & e^{y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = sqrt(x*y)\nh = math.e**(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x-2} \\sin (6 x+3)$\n", - "Output Answer": [ - "$e^{7 x-2} (7 \\sin (6 x+3)+6 \\cos (6 x+3))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x-2)*sin(6*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-9 x^2-2}+\\tan (5-4 x)$\n", - "Output Answer": [ - "$-18 e^{-9 x^2-2} x-4 \\sec ^2(5-4 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-9*x**2-2)+tan(5-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}\\left(8 x+\\frac{9}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{128 \\left(8 x+\\frac{9}{5}\\right)}{\\left(\\left(8 x+\\frac{9}{5}\\right)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(8*x+(9/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh \\left(\\frac{z}{x^4}\\right)$, $g(x,y,z) = \\frac{1}{y^5}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{\\cosh \\left(\\frac{z}{x^4}\\right)}{x^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(z/(x**4))\ng = (1/(y**5))\nh = (1/(y**5))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{1}{\\sqrt{z}}$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = (1/(sqrt(z)))\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (5 x)$ on the interval $x = 4$ to $x = 14$\n", - "Output Answer": [ - "$\\int_4^{14} \\sqrt{25 \\sec ^4(5 x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(5*x)\na = 4\nb = 14\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (5 x-8)+\\tan (7-4 x)$\n", - "Output Answer": [ - "$\\frac{5}{5 x-8}-4 \\sec ^2(7-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(5*x-8)+tan(7-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$-\\frac{125}{343 x^3}$\n", - "Output Answer": [ - "$\\frac{3}{153125}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-(125/(343*x**3)))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (5-5 x)-\\tan \\left(4 x^3+7\\right)$\n", - "Output Answer": [ - "$-24 \\left(12 x^4 \\tan \\left(4 x^3+7\\right)+x\\right) \\sec ^2\\left(4 x^3+7\\right)-\\frac{1}{(x-1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(5-5*x)-tan(4*x**3+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y+z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\left\\{z e^{y z},\\frac{1}{\\sqrt{1-(y+z)^2}},-\\frac{1}{\\sqrt{1-(y+z)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y+z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $e^{x^2}$", - "Output Answer": [ - "$\\left(1-9 e^4\\right) (x+2)^2+\\left(4 e^4-4\\right) (x+2)-e^4+4$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = math.e**(x**2)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{y^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y)\ng = atan(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{x^2 z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{x-z}+\\frac{1}{y}-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = log(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$-\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2}+\\frac{1}{x}+5 y^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**5\nh = sin((x/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{3 x^5}{2}+\\frac{17}{2}}+\\tan (8-5 x)$\n", - "Output Answer": [ - "$\\frac{15}{2} e^{\\frac{3 x^5}{2}+\\frac{17}{2}} x^4-5 \\sec ^2(8-5 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((3*x**5)/2)+(17/2))+tan(8-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x y^2-z\\right)^2}$, $g(x,y,z) = z^5 \\left(x+y^2\\right)^5$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{-5 z^4 \\left(x+y^2\\right)^5,\\frac{2}{\\left(x y^2-z\\right)^3},5 z^5 \\left(x+y^2\\right)^4+\\frac{4 x y}{\\left(x y^2-z\\right)^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x*y**2-z)**2))\ng = z**5*(x+y**2)**5\nh = z**5*(x+y**2)**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{(x+y)^{3/2}}$, and $h(x,y,z) = \\tan (y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n -\\frac{3}{2 (x+y)^{5/2}} & -\\frac{3}{2 (x+y)^{5/2}} & 0 \\\\\n 0 & \\sec ^2(y-z) & -\\sec ^2(y-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = (1/((x+y)**(3/2)))\nh = tan(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z-\\frac{1}{2 x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = cbrt(z)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $x$", - "Output Answer": [ - "$\\left(\\frac{1}{2 \\sqrt{3}}-1\\right) (x-3)+\\sqrt{3}-3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = x\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(\\frac{x y}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{1-x^2} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{x} & \\frac{1}{y} & -\\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x)\ng = y\nh = log(((x*y)/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-2 x}+\\log (2-3 x)$\n", - "Output Answer": [ - "$\\frac{3}{3 x-2}-2 e^{1-2 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-2*x)+log(2-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, and $h(x,y,z) = (x+y)^4$", - "Output Answer": [ - "$\\left\\{4 (x+y)^3+\\frac{y}{3 z^2 \\sqrt[3]{\\frac{y}{z}}^2},-4 (x+y)^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y/z)\nh = cbrt(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{9 x-4} \\sin (2-x)$\n", - "Output Answer": [ - "$e^{9 x-4} (\\cos (2-x)-9 \\sin (2-x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(9*x-4)*sin(2-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\cosh ^{-1}(x)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\left(\\frac{1}{2 \\sqrt{2}}-\\frac{1}{3\\ 3^{2/3}}\\right) (x-3)-\\sqrt[3]{3}+\\cosh ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acosh(x)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{x-9}-\\tan ^{-1}(5 x+7)$\n", - "Output Answer": [ - "$\\frac{50 (5 x+7)}{\\left((5 x+7)^2+1\\right)^2}-e^{x-9}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(x-9)-atan(5*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (x z)$, and $h(x,y,z) = \\cos \\left(\\frac{x+y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{\\sin \\left(\\frac{x+y}{z}\\right)}{z}-x \\cos (x z),\\frac{\\sin \\left(\\frac{x+y}{z}\\right)}{z},z \\cos (x z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(x*z)\nh = sin(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\begin{cases}\n 4 (x+1)-i \\pi -1 & \\Im(x)\\geq 0 \\\\\n 4 (x+1)+i \\pi -1 & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = log(x)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{x+y^5+z}$", - "Output Answer": [ - "$-\\frac{50 y^8}{9 \\left(x+y^5+z\\right) \\sqrt[3]{x+y^5+z}^2}+\\frac{20 y^3}{3 \\sqrt[3]{x+y^5+z}^2}-\\frac{4}{9 \\left(x+y^5+z\\right) \\sqrt[3]{x+y^5+z}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y**5+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\{0,-\\cos (x+z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = tan(y**3)\nh = tan(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(z^3\\right)$, $g(x,y,z) = \\sqrt{y-x}$, and $h(x,y,z) = z^9$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y-x}}+9 z^8$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z**3)\ng = sqrt(y-x)\nh = z**9\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y z^3}$, and $h(x,y,z) = \\sqrt{z^3-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & z^3 e^{y z^3} & 3 y z^2 e^{y z^3} \\\\\n 0 & -\\frac{1}{2 \\sqrt{z^3-y}} & \\frac{3 z^2}{2 \\sqrt{z^3-y}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = math.e**(y*z**3)\nh = sqrt(z**3-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (3-x)-\\sin (8 x+6)$\n", - "Output Answer": [ - "$64 \\sin (8 x+6)-\\cos (3-x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3-x)-sin(8*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = (x-y)^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 \\sqrt{x-y}}{2}-\\frac{1}{3 \\sqrt[3]{z}^2},-\\frac{3 \\sqrt{x-y}}{2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(z)\nh = cbrt(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z-y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & -1 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = cos(y)\nh = z-y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x+y}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 (x+y)^{3/2}},\\frac{1}{2 (x+y)^{3/2}},-\\frac{1}{\\sqrt{1-x^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = acos(x)\nh = acos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{x^5}}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 x^5 \\left(\\frac{y}{x^5}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt((y/(x**5)))))\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^5}$ and $g(x) = $\\cos \\left(x^3\\right)$", - "Output Answer": [ - "$-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**5)\ng = cos(x**3)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x+\\frac{5}{2}} \\log \\left(9-\\frac{5 x}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{e^{7 x+\\frac{5}{2}} \\left(7 (5 x-18) \\log \\left(9-\\frac{5 x}{2}\\right)+5\\right)}{5 x-18}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x+(5/2))*log(9-((5*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{z}$, and $h(x,y,z) = \\tanh (x+z)$", - "Output Answer": [ - "$\\text{sech}^2(x+z)+\\frac{1}{2 \\sqrt{x}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cbrt(z)\nh = tanh(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = x z$, and $h(x,y,z) = (x+z)^3$", - "Output Answer": [ - "$3 (x+z)^2-\\frac{1}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = x*z\nh = (x+z)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{x}+4 y^3+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y**4\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x^4}{z^4}$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},-\\frac{4 x^4}{z^5},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**4)/(z**4))\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log(z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\tan (x z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-x \\sec ^2(x z),0,z \\sec ^2(x z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = tan(x*z)\nh = tan(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(x+z^5\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{z^5}$", - "Output Answer": [ - "$\\left\\{0,5 z^4 \\sec ^2\\left(x+z^5\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+z**5)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (8-5 x)-\\sin ^{-1}(1-4 x)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{2}}{\\sqrt{x-2 x^2}}-5 \\cos (8-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(8-5*x)-asin(1-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{y^2 z^2}$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{2}{y^2 z^3},\\frac{2}{y^3 z^2}-\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(y**2*z**2))\ng = cbrt(y/x)\nh = cbrt(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$-\\tan (4 x)$\n", - "Output Answer": [ - "$-\\frac{64}{3} \\left(1+4 \\tan ^2(20)+3 \\tan ^4(20)\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(-tan(4*x))\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{e^{7 x+6}}$\n", - "Output Answer": [ - "$49 e^{7 x+e^{7 x+6}+6} \\left(e^{7 x+6}+1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(math.e**(7*x+6))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{7 x^3+4} \\sin (9 x+9)$\n", - "Output Answer": [ - "$-3 e^{7 x^3+4} \\left(7 x^2 \\sin (9 (x+1))+3 \\cos (9 (x+1))\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(7*x**3+4)*sin(9*x+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{y^2}$, and $h(x,y,z) = \\cos \\left(y^2\\right)$", - "Output Answer": [ - "$\\left\\{-2 y \\sin \\left(y^2\\right),0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(y**2)\nh = math.e**(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{0,0,x \\sin (x y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{\\frac{15 x}{2}-\\frac{13}{2}}+\\sin \\left(\\frac{15}{2}-9 x\\right)$\n", - "Output Answer": [ - "$\\frac{15}{2} e^{\\frac{15 x}{2}-\\frac{13}{2}}-9 \\cos \\left(\\frac{15}{2}-9 x\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(((15*x)/2)-(13/2))+sin((15/2)-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\sinh \\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\cos ^{-1}(x-y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(x-y)^2}},\\frac{1}{\\sqrt{1-(x-y)^2}},-\\frac{y \\cosh \\left(\\frac{y}{x}\\right)}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = sinh(y/x)\nh = sinh(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{z^4}}$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sin \\left(\\frac{z^4}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z^4 \\cos \\left(\\frac{z^4}{y}\\right)}{y^2},-\\frac{4 x}{3 z^5 \\sqrt[3]{\\frac{x}{z^4}}^2},e^x\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x/(z**4))\ng = math.e**x\nh = math.e**x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,\\sec ^2(x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = e^{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^5\\right)$, $g(x,y,z) = \\tan \\left(x^5 y^5 z\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$5 x^5 y^4 z \\sec ^2\\left(x^5 y^5 z\\right)+\\frac{5}{x}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**5)\ng = tan(x**5*y**5*z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{e^{4 x-8}}{(3 x+7)^2}$\n", - "Output Answer": [ - "$\\frac{2 e^{4 x-8} \\left(72 x^2+264 x+251\\right)}{(3 x+7)^4}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = ((math.e**(4*x-8))/((3*x+7)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(y^4-z\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{60 y^6}{\\left(y^4-z\\right)^{7/2}}-\\frac{18 y^2}{\\left(y^4-z\\right)^{5/2}}+\\frac{15}{4 \\left(y^4-z\\right)^{7/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((y**4-z)**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\cos (5 x)}{\\tan ^{-1}(6 x+1)}$\n", - "Output Answer": [ - "$\\frac{-\\frac{6 \\cos (5 x)}{(6 x+1)^2+1}-5 \\sin (5 x) \\tan ^{-1}(6 x+1)}{\\tan ^{-1}(6 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((cos(5*x))/(atan(6*x+1))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-4 x^2-\\frac{22}{3}\\right)+\\sin \\left(\\frac{11 x}{3}+\\frac{2}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{12 x}{6 x^2+11}+\\frac{11}{3} \\cos \\left(\\frac{1}{3} (11 x+2)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-4*x**2-(22/3))+sin(((11*x)/3)+(2/3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = e^z$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}}-e^z,0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = math.e**z\nh = math.e**z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z-y}}$", - "Output Answer": [ - "$\\frac{1}{y^2+1}-\\frac{1}{2 (z-y)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = atan(y)\nh = (1/(sqrt(z-y)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(-\\tan \\left(\\frac{9 x}{2}+6\\right)\\right)-(x+8)^2$\n", - "Output Answer": [ - "$9 \\csc (9 x+12)-2 (x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-tan(((9*x)/2)+6))-(x+8)**2, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = acosh(y)\nh = acosh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{y}{z^4}$", - "Output Answer": [ - "$\\frac{1}{y}-\\frac{4 y}{z^5}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = log(y)\nh = (y/(z**4))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tanh (x)$", - "Output Answer": [ - "$\\sec ^2(x+y)-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = (1/(y**(3/2)))\nh = tanh(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y z}$, and $h(x,y,z) = \\cosh (y-z)$", - "Output Answer": [ - "$\\left\\{\\sinh (y-z)-\\frac{y}{3 \\sqrt[3]{y z}^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y*z)\nh = cbrt(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{x}{y}-z$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y} & -\\frac{x}{y^2} & -1 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\text{sech}^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/y)-z\ng = y\nh = tanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^2}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$2 e^{x^2} x+\\cos (y)+\\frac{1}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**2)\ng = sin(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y)\ng = acos(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x z)$, $g(x,y,z) = x y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$z \\cos (x z)+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*z)\ng = x*y\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x y)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\frac{y}{x^2 y^2+1}+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x*y)\ng = x+z\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\cos (x)+\\frac{1}{y}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cos(z)\nh = (z/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\frac{x}{y}+z^4}$, $g(x,y,z) = \\frac{x}{y}$, and $h(x,y,z) = \\cos \\left(z^4\\right)$", - "Output Answer": [ - "$-\\frac{x}{y^2}-\\frac{1}{y \\left(\\frac{x}{y}+z^4\\right)^2}-4 z^3 \\sin \\left(z^4\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x/y)+z**4))\ng = (x/y)\nh = cos(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2 x^4+9}$\n", - "Output Answer": [ - "$8 e^{2 x^4+9} x^2 \\left(8 x^4+3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2*x**4+9)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\frac{1}{\\sqrt{x y+z}}$, and $h(x,y,z) = \\tanh (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n -\\frac{y}{2 (x y+z)^{3/2}} & -\\frac{x}{2 (x y+z)^{3/2}} & -\\frac{1}{2 (x y+z)^{3/2}} \\\\\n z \\text{sech}^2(x z) & 0 & x \\text{sech}^2(x z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = (1/(sqrt(x*y+z)))\nh = tanh(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{1,\\frac{x}{2 \\sqrt{x z}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = x-z\nh = x-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(7 x^2-2\\right)+\\sqrt{-x-2}$\n", - "Output Answer": [ - "$-\\frac{196 x^2}{\\left(2-7 x^2\\right)^2}+\\frac{14}{7 x^2-2}-\\frac{1}{4 (-x-2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(7*x**2-2)+sqrt(-x-2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x+y)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tanh ^{-1}(y+z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{1-(y+z)^2},0,\\frac{1}{\\sqrt{1-(x+y)^2}}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x+y)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{y^3}{x}}}$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n \\frac{y^3}{2 x^2 \\left(\\frac{y^3}{x}\\right)^{3/2}} & -\\frac{3 y^2}{2 x \\left(\\frac{y^3}{x}\\right)^{3/2}} & 0 \\\\\n \\frac{1}{x} & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = (1/(sqrt(((y**3)/x))))\nh = log(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\log \\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{\\frac{x y^4}{z^3}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{y^4}{2 z^3 \\sqrt{\\frac{x y^4}{z^3}}},\\frac{2 x y^3}{z^3 \\sqrt{\\frac{x y^4}{z^3}}},-\\frac{3 x y^4}{2 z^4 \\sqrt{\\frac{x y^4}{z^3}}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(((x*y**4)/(z**3)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt[3]{x+z}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\frac{1}{x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cbrt(x+z)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(\\frac{x+y^3}{z}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{\\sinh \\left(\\frac{x+y^3}{z}\\right)}{z},\\frac{3 y^2 \\sinh \\left(\\frac{x+y^3}{z}\\right)}{z},-\\frac{\\left(x+y^3\\right) \\sinh \\left(\\frac{x+y^3}{z}\\right)}{z^2}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh((x+y**3)/z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y-z}}$, and $h(x,y,z) = \\cos (x y z)$", - "Output Answer": [ - "$\\left\\{-x z \\sin (x y z)-\\frac{1}{2 (y-z)^{3/2}},y z \\sin (x y z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(sqrt(y-z)))\nh = (1/(sqrt(y-z)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(y)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x},-\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(y)\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{5 x}{\\log (3 x+6)}$\n", - "Output Answer": [ - "$\\frac{5 \\left(\\log (3 (x+2))-\\frac{x}{x+2}\\right)}{\\log ^2(3 (x+2))}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((5*x)/(log(3*x+6))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-5 x-7}+\\log (-2 x)$\n", - "Output Answer": [ - "$25 e^{-5 x-7}-\\frac{1}{x^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-5*x-7)+log(-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = x^{12}$ and $g(x) = $\\cosh (x)$", - "Output Answer": [ - "$(x-4) (50331648-\\sinh (4))+(x-4)^2 \\left(69206016-\\frac{\\cosh (4)}{2}\\right)+16777216-\\cosh (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**12\ng = cosh(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x+1} \\sin (2 x+5)$\n", - "Output Answer": [ - "$2 e^{6 x+1} (3 \\sin (2 x+5)+\\cos (2 x+5))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x+1)*sin(2*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x y-z^3\\right)^4$, $g(x,y,z) = \\sqrt[3]{y z^3}$, and $h(x,y,z) = \\tan ^{-1}\\left(z^3\\right)$", - "Output Answer": [ - "$4 y \\left(x y-z^3\\right)^3+\\frac{z^3}{3 \\sqrt[3]{y z^3}^2}+\\frac{3 z^2}{z^6+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x*y-z**3)**4\ng = cbrt(y*z**3)\nh = atan(z**3)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x-y+z}}$, $g(x,y,z) = \\cosh ^{-1}(y-z)$, and $h(x,y,z) = \\log (x z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{y-z-1} \\sqrt{y-z+1}},-\\frac{1}{2 (x-y+z)^{3/2}}-\\frac{1}{x},-\\frac{1}{2 (x-y+z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x-y+z)))\ng = acosh(y-z)\nh = acosh(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\cosh (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & z \\sinh (y z) & y \\sinh (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = (1/(y**(3/2)))\nh = cosh(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{e^{-8 x-1}}-\\sin \\left(8 x^2+4\\right)$\n", - "Output Answer": [ - "$-16 x \\cos \\left(8 x^2+4\\right)-8 e^{-8 x+e^{-8 x-1}-1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(math.e**(-8*x-1))-sin(8*x**2+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = cos((x/z))\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{x}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$-\\frac{y}{x^2}+x+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/x)\ng = tan(y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin \\left(\\frac{15}{2}-4 x^5\\right)-9 x-8$\n", - "Output Answer": [ - "$20 x^4 \\cos \\left(\\frac{15}{2}-4 x^5\\right)-9$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin((15/2)-4*x**5)-9*x-8, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sinh (x)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\{0,0,\\cosh (x)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = sinh(x)\nh = sinh(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(7 x^2+2\\right)^4}$\n", - "Output Answer": [ - "$\\frac{56 \\left(63 x^2-2\\right)}{\\left(7 x^2+2\\right)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x**2+2)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = acos(y)\nh = asin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$(x+3) \\left(\\frac{\\cos (3)}{10}-\\sin (3) \\tan ^{-1}(3)\\right)-\\cos (3) \\tan ^{-1}(3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z-\\frac{3}{2 y^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = (1/(y**(3/2)))\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-6 x-5} \\cos (8-x)$\n", - "Output Answer": [ - "$\\frac{6 (6 x+5) \\sin (8-x)-2 \\left(18 x^2+30 x+17\\right) \\cos (8-x)}{(-6 x-5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-6*x-5)*cos(8-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 y^3 z^3$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\sin ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,3 x^3 y^3 z^2-\\frac{z}{\\sqrt{1-x^2 z^2}},y \\sec ^2(x y)-3 x^3 y^2 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*y**3*z**3\ng = tan(x*y)\nh = tan(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^{\\frac{z}{x}}$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{e^{\\frac{z}{x}}}{x},-\\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}},-\\frac{z e^{\\frac{z}{x}}}{x^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**(z/x)\nh = math.e**(z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-2 x)$ on the interval $x = 2$ to $x = 6$\n", - "Output Answer": [ - "$-\\sqrt{5}+\\sqrt{37}+\\tanh ^{-1}\\left(\\sqrt{5}\\right)-\\tanh ^{-1}\\left(\\sqrt{37}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-2*x)\na = 2\nb = 6\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^4\\right)$ and $g(x) = $\\sin \\left(x^3\\right)$", - "Output Answer": [ - "$(x+1)^2 \\left(-\\frac{21 \\sin (1)}{2}-5 \\cos (1)\\right)+(x+1) (4 \\sin (1)-3 \\cos (1))+\\sin (1)+\\cos (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**4)\ng = sin(x**3)\nseries = f.subs(x, g).series(x, -1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2 z^2$, $g(x,y,z) = \\sin (x y-z)$, and $h(x,y,z) = \\sin ^{-1}(y z)$", - "Output Answer": [ - "$x \\cos (x y-z)+2 x z^2+\\frac{y}{\\sqrt{1-y^2 z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2*z**2\ng = sin(x*y-z)\nh = asin(y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^2$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 2 z \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**2\ng = log(y)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cosh (y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2(x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & \\sinh (y+z) & \\sinh (y+z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x)\ng = y\nh = cosh(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = y\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(6 x^4+2\\right)-\\tan ^{-1}(2 x+8)$\n", - "Output Answer": [ - "$-\\frac{24 x^3}{\\sqrt{1-4 \\left(3 x^4+1\\right)^2}}-\\frac{2}{4 (x+4)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(6*x**4+2)-atan(2*x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = (y z)^{3/2}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\frac{2}{x^3}+\\frac{3}{2} z \\sqrt{y z}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = (y*z)**(3/2)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{23 x}{3}+5\\right)+\\cosh \\left(\\frac{19}{3}-4 x\\right)$\n", - "Output Answer": [ - "$\\frac{23}{3} \\cos \\left(\\frac{23 x}{3}+5\\right)-4 \\sinh \\left(\\frac{19}{3}-4 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(((23*x)/3)+5)+cosh((19/3)-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z^5-x}$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\left(x y^3\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{3 \\sqrt[3]{z^5-x}^2} & 0 & \\frac{5 z^4}{3 \\sqrt[3]{z^5-x}^2} \\\\\n 0 & 3 y^2 \\cos \\left(y^3\\right) & 0 \\\\\n \\frac{3}{2} y^3 \\sqrt{x y^3} & \\frac{9}{2} x y^2 \\sqrt{x y^3} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z**5-x)\ng = sin(y**3)\nh = (x*y**3)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = (z/x)\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (y+z)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\sec ^2(y+z),-\\sec ^2(y+z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(y+z)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\tanh \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{2 \\sqrt{y+z}}+\\frac{\\text{sech}^2\\left(\\frac{y}{z}\\right)}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = tanh(y/z)\nh = sqrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = 81 x^4$ on the interval $x = 0$ to $x = 2$\n", - "Output Answer": [ - "$2 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{6};\\frac{7}{6};-6718464\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 81*x**4\na = 0\nb = 2\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh (z (x+y))$", - "Output Answer": [ - "$4 x^3+(x+y) \\cosh (z (x+y))+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = y\nh = sinh(z*(x+y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x z)$, $g(x,y,z) = \\sqrt{x y^3}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,-x \\sin (x z),\\frac{y^3}{2 \\sqrt{x y^3}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z)\ng = sqrt(x*y**3)\nh = sqrt(x*y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = x y$", - "Output Answer": [ - "$\\{x,-y,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\tan (x+4)}-\\sin \\left(3-5 x^2\\right)$\n", - "Output Answer": [ - "$10 x \\cos \\left(3-5 x^2\\right)-e^{-\\tan (x+4)} \\sec ^2(x+4)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-tan(x+4))-sin(3-5*x**2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{x}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$-\\frac{z}{2 x^2 \\sqrt{\\frac{z}{x}}}+\\frac{1}{2 \\sqrt{y}}+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/x))\ng = sqrt(y)\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x+y) & \\sec ^2(x+y) & 0 \\\\\n 0 & \\cos (y-z) & -\\cos (y-z) \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x+y)\ng = sin(y-z)\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}}$, $g(x,y,z) = y^2$, and $h(x,y,z) = (x+y)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n 0 & 2 y & 0 \\\\\n 5 (x+y)^4 & 5 (x+y)^4 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y))\ng = y**2\nh = (x+y)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x^2+9}+\\sin (7-5 x)$\n", - "Output Answer": [ - "$\\frac{6 \\sqrt{3}}{\\left(2 x^2+3\\right)^{3/2}}-25 \\sin (7-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x**2+9)+sin(7-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^5}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5}{x^6} & 0 & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**5))\ng = acos(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tan (x-y)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(x-y),-\\sec ^2(x-y),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{x+y}{z^3}\\right)$, $g(x,y,z) = \\log \\left(\\frac{x}{y}+z^3\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+y} & \\frac{1}{x+y} & -\\frac{3}{z} \\\\\n \\frac{1}{y \\left(\\frac{x}{y}+z^3\\right)} & -\\frac{x}{y^2 \\left(\\frac{x}{y}+z^3\\right)} & \\frac{3 z^2}{\\frac{x}{y}+z^3} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(((x+y)/(z**3)))\ng = log((x/y)+z**3)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$\\frac{19 x^5}{30}+\\frac{x^3}{3}+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x**2)\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}+\\frac{1}{\\sqrt{y-1} \\sqrt{y+1}}+\\cos (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = acosh(y)\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(5-7 x^2\\right)-1$\n", - "Output Answer": [ - "$14 x \\sin \\left(5-7 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5-7*x**2)-1, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (5) \\cos ^{-1}(6 x+6)$\n", - "Output Answer": [ - "$-\\frac{216 (x+1) \\cos (5)}{\\left(1-36 (x+1)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5)*acos(6*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{24 x}{5}-\\frac{26}{5}}$\n", - "Output Answer": [ - "$\\frac{576}{25} e^{\\frac{24 x}{5}-\\frac{26}{5}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(((24*x)/5)-(26/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}\\left(x^4\\right)$, $g(x,y,z) = \\log \\left(x^4 z\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{4 x^3}{1-x^8}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x**4)\ng = log(x**4*z)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-x)^{3/2}$, $g(x,y,z) = \\cos \\left(x y^2\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{3 \\sqrt{z-x}}{2},-y^2 \\sin \\left(x y^2\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-x)**(3/2)\ng = cos(x*y**2)\nh = cos(x*y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log \\left(7 x^4+5\\right)+\\tan (4-5 x)$\n", - "Output Answer": [ - "$\\frac{28 x^3}{7 x^4+5}-5 \\sec ^2(4-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x**4+5)+tan(4-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-24 x^2 \\sin \\left(8 \\left(x^3+1\\right)\\right)$\n", - "Output Answer": [ - "$\\cos \\left(8 \\left(x^3+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -24*x**2*sin(8*(x**3+1))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\sqrt{x^4}$", - "Output Answer": [ - "$(x-5)^2+10 (x-5)+25$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = sqrt(x**4)\nseries = f.subs(x, g).series(x, 5, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\sec ^2(x)-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = acos(y)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cosh ^{-1}(x)$, and $h(x,y,z) = (x+y+z)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n \\frac{1}{\\sqrt{x-1} \\sqrt{x+1}} & 0 & 0 \\\\\n \\frac{3}{2} \\sqrt{x+y+z} & \\frac{3}{2} \\sqrt{x+y+z} & \\frac{3}{2} \\sqrt{x+y+z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = acosh(x)\nh = (x+y+z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin \\left(x+y^5\\right)$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y^5}}$", - "Output Answer": [ - "$5 y^4 \\cos \\left(x+y^5\\right)+\\frac{1}{3 y^5 \\sqrt[3]{\\frac{z}{y^5}}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(x+y**5)\nh = cbrt(z/(y**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = sqrt(z)\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^{z-x}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-e^{z-x},0,-e^{z-x}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**(z-x)\nh = math.e**(z-x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = -\\sin ^{-1}(x-z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\sec ^2(x)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = -asin(x-z)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{y}{3 \\sqrt[3]{x y}^2} & \\frac{x}{3 \\sqrt[3]{x y}^2} & 0 \\\\\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(x*y)\nh = tan((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin (y z)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$e^x+z \\cos (y z)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(y*z)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^2}$, $g(x,y,z) = \\frac{x^2}{z^2}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{2}{z^3} \\\\\n \\frac{2 x}{z^2} & 0 & -\\frac{2 x^2}{z^3} \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**2))\ng = ((x**2)/(z**2))\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(4-2 x^2\\right)-e^{-5 x-3}$\n", - "Output Answer": [ - "$5 e^{-5 x-3}-4 x \\sec ^2\\left(4-2 x^2\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(tan(4-2*x**2)-math.e**(-5*x-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{x-y^3-z}}$", - "Output Answer": [ - "$\\left\\{\\frac{3 y^2}{2 \\left(x-y^3-z\\right)^{3/2}},\\frac{1}{2 \\left(x-y^3-z\\right)^{3/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y**3)\nh = cos(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x+y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x+y) & -\\sin (x+y) & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x+y)\ng = sqrt(y)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = x+z^5$, and $h(x,y,z) = \\tan \\left(z^5\\right)$", - "Output Answer": [ - "$\\left\\{-5 z^4,0,1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = x+z**5\nh = x+z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(2-5 x^2\\right)$\n", - "Output Answer": [ - "$10 \\left(10 x^2 \\sin \\left(2-5 x^2\\right)+\\cos \\left(2-5 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(2-5*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = y^{15} z^5$", - "Output Answer": [ - "$20 y^{15} z^3+210 y^{13} z^5$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**15*z**5\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^5}{x^5}$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 y^5}{x^6} & \\frac{5 y^4}{x^5} & 0 \\\\\n \\frac{1}{x} & \\frac{1}{y} & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**5)/(x**5))\ng = log(x*y)\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (x)$, $g(x,y,z) = \\cos \\left(\\frac{x y}{z}\\right)$, and $h(x,y,z) = \\log (x y)$", - "Output Answer": [ - "$\\text{sech}^2(x)-\\frac{x \\sin \\left(\\frac{x y}{z}\\right)}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(x)\ng = cos(((x*y)/z))\nh = log(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\cos (x+y) & \\cos (x+y) & 0 \\\\\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sin(x+y)\nh = cbrt(y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\frac{x-y}{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},-\\frac{1}{z},-\\frac{\\sin \\left(\\frac{x}{y}\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = cos((x/y))\nh = cos((x/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}+z\\right)$, $g(x,y,z) = \\sqrt{\\frac{z}{y}}$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{y \\left(\\left(\\frac{x}{y}+z\\right)^2+1\\right)} & -\\frac{x}{y^2 \\left(\\left(\\frac{x}{y}+z\\right)^2+1\\right)} & \\frac{1}{\\left(\\frac{x}{y}+z\\right)^2+1} \\\\\n 0 & -\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}} & \\frac{1}{2 y \\sqrt{\\frac{z}{y}}} \\\\\n -\\frac{1}{2 \\sqrt{y-x}} & \\frac{1}{2 \\sqrt{y-x}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan((x/y)+z)\ng = sqrt((z/y))\nh = sqrt(y-x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z}$, $g(x,y,z) = \\left(y^3\\right)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{x}{3 \\sqrt[3]{x z}^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z)\ng = (y**3)**(3/2)\nh = (y**3)**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{y^2}-\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/y)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{-7 x^2-1}}{\\log (5-x)}$\n", - "Output Answer": [ - "$\\frac{e^{-7 x^2-1} (-14 (x-5) x \\log (5-x)-1)}{(x-5) \\log ^2(5-x)}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(-7*x**2-1))/(log(5-x))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z^5}\\right)$, $g(x,y,z) = x^4$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{\\sin \\left(\\frac{x}{z^5}\\right)}{z^5} & 0 & \\frac{5 x \\sin \\left(\\frac{x}{z^5}\\right)}{z^6} \\\\\n 4 x^3 & 0 & 0 \\\\\n 0 & 0 & 5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((x/(z**5)))\ng = x**4\nh = z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$3 e^{x^3+6} x^2$\n", - "Output Answer": [ - "$e^{x^3+6}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = 3*math.e**(x**3+6)*x**2\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x-y^4-z}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x-y^4-z}},-\\frac{2 y^3}{\\sqrt{x-y^4-z}},-\\frac{1}{2 \\sqrt{x-y^4-z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y**4-z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\tan (9 x+9)-\\cosh (2-4 x)$\n", - "Output Answer": [ - "$4 \\sinh (2-4 x)-9 \\sec ^2(9 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-tan(9*x+9)-cosh(2-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{8 x+7}$\n", - "Output Answer": [ - "$-\\frac{16}{(8 x+7)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(8*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = z^5$, and $h(x,y,z) = \\frac{1}{(x y)^{3/2}}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 x}{2 (x y)^{5/2}}-5 z^4,\\frac{3 y}{2 (x y)^{5/2}}-\\sin (z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(z)\ng = z**5\nh = z**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{21 x^2}{\\left(7 x^3+2\\right) \\log \\left(-\\frac{7 x^3}{2}-1\\right)}$\n", - "Output Answer": [ - "$\\log \\left(\\log \\left(-\\frac{7 x^3}{2}-1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((21*x**2)/((7*x**3+2)*log(-((7*x**3)/2)-1)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the third term in the series expansion of the following function around 3:\n\n$3 x$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(3*x)\nseries = f.series(x, 3, None)\nfor i, term in enumerate(series):\n if i == 3: print(term)\n elif i > 3: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = x^4 y$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 4 x^3 y & x^4 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = x**4*y\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(6-6 x)^4 \\left(8-7 x^3\\right)^4}$\n", - "Output Answer": [ - "$\\frac{-28 x^3+21 x^2+8}{324 (x-1)^5 \\left(7 x^3-8\\right)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((6-6*x)**4*(8-7*x**3)**4)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh (y)$, $g(x,y,z) = \\cos (x+y)$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$-\\sin (x+y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(y)\ng = cos(x+y)\nh = tan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{18}{5}-\\frac{7 x}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{49}{25} \\cos \\left(\\frac{1}{5} (18-7 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((18/5)-((7*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sqrt(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = -\\tan (y-z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$-\\sec ^2(y-z)+\\frac{1}{2 \\sqrt{z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = -tan(y-z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x z}{y}}$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{z}{2 y \\sqrt{\\frac{x z}{y}}} & -\\frac{x z}{2 y^2 \\sqrt{\\frac{x z}{y}}} & \\frac{x}{2 y \\sqrt{\\frac{x z}{y}}} \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(((x*z)/y))\ng = (z/x)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left\\{e^y,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (y z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(y*z)\ng = sqrt(y)\nh = asin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y z$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$y+z+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y*z\nh = y*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y-z$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = y-z\nh = y-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-8 x-2} \\cos (2 x)$\n", - "Output Answer": [ - "$4 e^{-8 x-2} (8 \\sin (2 x)+15 \\cos (2 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-8*x-2)*cos(2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y-x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{y-x} & \\frac{1}{y-x} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y-x)\ng = log(y)\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sqrt(y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & -\\frac{1}{y^2 z} & -\\frac{1}{y z^2} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((z/y))\ng = (1/(y*z))\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $e^{x^2}$", - "Output Answer": [ - "$(x+1) (2 e+\\sin (1))-e+\\cos (1)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = math.e**(x**2)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -4$ of the composition $f(g(x))$ for $f(x) = \\cos \\left(x^2\\right)$ and $g(x) = $x^{16}$", - "Output Answer": [ - "$(x+4) (34359738368 \\sin (16)-17179869184 \\cos (16))+4294967296 \\cos (16)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x**2)\ng = x**16\nseries = f.subs(x, g).series(x, -4, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = y$, and $h(x,y,z) = y^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3 \\sqrt{y}}{2},0,-x \\sec ^2(x y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x*y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}(x)$ and $g(x) = $\\sqrt{x^2}$", - "Output Answer": [ - "$i \\sqrt{2} \\sqrt{x-1} (-1)^{\\left\\lfloor -\\frac{\\arg (x-1)}{2 \\pi }\\right\\rfloor }$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x)\ng = sqrt(x**2)\nseries = f.subs(x, g).series(x, 1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left\\{z \\sec ^2(y z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = acos(y)\nh = acos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sin \\left(\\frac{x-y}{z}\\right)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$e^x-\\frac{\\cos \\left(\\frac{x-y}{z}\\right)}{z}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = sin(((x-y)/z))\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x-z}$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = \\sqrt[3]{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x-z}^2} & 0 & -\\frac{1}{3 \\sqrt[3]{x-z}^2} \\\\\n -\\frac{1}{x^2 y} & -\\frac{1}{x y^2} & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x-z}^2} & 0 & -\\frac{1}{3 \\sqrt[3]{x-z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x-z)\ng = (1/(x*y))\nh = cbrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(7 x^2+9\\right)^2}$\n", - "Output Answer": [ - "$\\frac{28 \\left(35 x^2-9\\right)}{\\left(7 x^2+9\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((7*x**2+9)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\cosh ^{-1}(x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\left(-\\frac{1}{64}-\\frac{2}{15 \\sqrt{15}}\\right) (x-4)^2+\\left(\\frac{1}{4}+\\frac{1}{\\sqrt{15}}\\right) (x-4)+2+\\cosh ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acosh(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (6-x)+\\cos (\\sin (5-8 x))$\n", - "Output Answer": [ - "$\\frac{1}{x-6}+8 \\sin (\\sin (5-8 x)) \\cos (5-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(6-x)+cos(sin(5-8*x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan ^{-1}(x+5)$\n", - "Output Answer": [ - "$\\frac{2 (x+5)}{\\left((x+5)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\sqrt{y^5}$, and $h(x,y,z) = y^5+z$", - "Output Answer": [ - "$\\left\\{5 y^4,0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = sqrt(y**5)\nh = sqrt(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\sin (8 x+7)}{\\left(5 x^2-3\\right)^3}$\n", - "Output Answer": [ - "$\\frac{30 x \\sin (8 x+7)-8 \\left(5 x^2-3\\right) \\cos (8 x+7)}{\\left(3-5 x^2\\right)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((sin(8*x+7))/((5*x**2-3)**3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x z^5\\right)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\sqrt{\\frac{x}{z^5}}$", - "Output Answer": [ - "$-\\frac{5 x}{2 z^6 \\sqrt{\\frac{x}{z^5}}}+z^5 \\left(-\\sin \\left(x z^5\\right)\\right)-\\frac{1}{y^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*z**5)\ng = (1/y)\nh = sqrt((x/(z**5)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x-y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\log \\left(x-y-z^5\\right)$", - "Output Answer": [ - "$-\\frac{5 z^4}{x-y-z^5}+\\frac{1}{(x-y)^2+1}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x-y)\ng = y\nh = log(x-y-z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n \\sec ^2(x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = math.e**y\nh = tan(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{z^4}{y}\\right)$", - "Output Answer": [ - "$-\\frac{2 z^{12}}{y^5 \\left(\\frac{z^8}{y^2}+1\\right)^2}-\\frac{32 z^{10}}{y^3 \\left(\\frac{z^8}{y^2}+1\\right)^2}+\\frac{2 z^4}{y^3 \\left(\\frac{z^8}{y^2}+1\\right)}+\\frac{12 z^2}{y \\left(\\frac{z^8}{y^2}+1\\right)}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((z**4)/y)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x z)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\log (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\sec ^2(x z) & 0 & x \\sec ^2(x z) \\\\\n 0 & 2 y & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*z)\ng = y**2\nh = log(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(y z^5\\right)$, $g(x,y,z) = \\cos \\left(z^5\\right)$, and $h(x,y,z) = \\tanh ^{-1}\\left(\\frac{z^5}{y}\\right)$", - "Output Answer": [ - "$\\left\\{5 z^4 \\sin \\left(z^5\\right)-\\frac{z^5}{y^2 \\left(1-\\frac{z^{10}}{y^2}\\right)},-5 y z^4 \\sin \\left(y z^5\\right),z^5 \\sin \\left(y z^5\\right)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y*z**5)\ng = cos(z**5)\nh = cos(z**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\sqrt{x^5+z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{x^5+z}},0,\\frac{5 x^4}{2 \\sqrt{x^5+z}}-\\cos (y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = sqrt(x**5+z)\nh = sqrt(x**5+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{1}{(y+z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{x^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & -\\frac{3}{2 (y+z)^{5/2}} & -\\frac{3}{2 (y+z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/x)\ng = (1/(sqrt(y)))\nh = (1/((y+z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\{-x \\sin (x y),y \\sin (x y),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\frac{1}{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n -\\frac{1}{x^2 z} & 0 & -\\frac{1}{x z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**(3/2)\ng = (1/y)\nh = (1/(x*z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{44 x^6}{945}-\\frac{4 x^4}{45}+\\frac{x^2}{3}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{37 x}{5}+\\frac{37}{5}\\right)$\n", - "Output Answer": [ - "$-\\frac{1369}{25} \\sin \\left(\\frac{37 (x+1)}{5}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((37*x)/5)+(37/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (2-9 x) \\sin \\left(6 x^2+9\\right)$\n", - "Output Answer": [ - "$9 \\sin \\left(6 x^2+9\\right) \\cos (2-9 x)-12 x \\sin (2-9 x) \\cos \\left(6 x^2+9\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(2-9*x)*sin(6*x**2+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = asin(x)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y^2+z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y^2}}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{z}}-\\frac{y}{\\left(y^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y**2+z)\ng = (1/(sqrt(y**2)))\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = z^2$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-2 z,\\frac{x}{z^2 \\sqrt{1-\\frac{x^2}{z^2}}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x/z)\ng = z**2\nh = z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$2 x+\\cos (y)+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = sin(y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^3$ and $g(x) = $e^{x^4}$", - "Output Answer": [ - "$-4678 e^{16} (x+2)^2+268 e^{16} (x+2)-8 e^{16}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = x**3\ng = math.e**(x**4)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-e^{-x-3}$\n", - "Output Answer": [ - "$e^{-x-3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(-x-3)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (\\log (-8 x-4))$\n", - "Output Answer": [ - "$-\\frac{4 (\\cos (\\log (-8 x-4))-\\sin (\\log (-8 x-4)))}{(2 x+1)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(log(-8*x-4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}(2 x+6)+\\frac{1}{e^8}$\n", - "Output Answer": [ - "$-\\frac{2}{\\sqrt{1-4 (x+3)^2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(acos(2*x+6)+(1/(math.e**8)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = z$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = z\nh = acosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos (4 x+9)+\\tan (\\cos (6 x+1))$\n", - "Output Answer": [ - "$-4 \\sin (4 x+9)-6 \\sin (6 x+1) \\sec ^2(\\cos (6 x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(4*x+9)+tan(cos(6*x+1)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{y^2}{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n -\\frac{y^2}{x^2} & \\frac{2 y}{x} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = ((y**2)/x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{x}{z}$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/z)\ng = (y/x)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2+z$, $g(x,y,z) = \\frac{1}{\\sqrt{x^2 y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,1,-\\frac{x y}{\\left(x^2 y\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2+z\ng = (1/(sqrt(x**2*y)))\nh = (1/(sqrt(x**2*y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y}+z\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$4 x^3+\\frac{x}{y^2 \\sqrt{1-\\left(\\frac{x}{y}+z\\right)^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = acos((x/y)+z)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x^2 y^2}{z^8}$", - "Output Answer": [ - "$\\frac{72 x^2 y^2}{z^{10}}+\\frac{2 x^2}{z^8}+\\frac{2 y^2}{z^8}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**2*y**2)/(z**8))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-6 x-2} \\cos \\left(x^3+3\\right)$\n", - "Output Answer": [ - "$e^{-6 x-2} \\left(6 x (6 x-1) \\sin \\left(x^3+3\\right)-9 \\left(x^4-4\\right) \\cos \\left(x^3+3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-6*x-2)*cos(x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y)\ng = y\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sinh ^{-1}(x-z)$, $g(x,y,z) = y^{12}$, and $h(x,y,z) = \\cos ^{-1}\\left(y^4+z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{(x-z)^2+1}} & 0 & \\frac{1}{\\sqrt{(x-z)^2+1}} \\\\\n 0 & 12 y^{11} & 0 \\\\\n 0 & -\\frac{4 y^3}{\\sqrt{1-\\left(y^4+z\\right)^2}} & -\\frac{1}{\\sqrt{1-\\left(y^4+z\\right)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -asinh(x-z)\ng = y**12\nh = acos(y**4+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\log \\left(7 x^3+2\\right)-2$\n", - "Output Answer": [ - "$\\frac{21 x \\left(7 x^3-4\\right)}{\\left(7 x^3+2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -log(7*x**3+2)-2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & -\\frac{1}{y^2} & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = (1/y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x+y}{z}}}$, and $h(x,y,z) = \\cos (y+z)$", - "Output Answer": [ - "$\\left\\{-\\frac{x+y}{2 z^2 \\left(\\frac{x+y}{z}\\right)^{3/2}}-\\sin (y+z),0,-\\frac{1}{2 z \\left(\\frac{x+y}{z}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = (1/(sqrt(((x+y)/z))))\nh = (1/(sqrt(((x+y)/z))))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = e^{y z}$", - "Output Answer": [ - "$\\left\\{z e^{y z},1,\\cos (x)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x\ng = sin(x)\nh = sin(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = e^{\\frac{x^4}{z}}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n \\frac{4 x^3 e^{\\frac{x^4}{z}}}{z} & 0 & -\\frac{x^4 e^{\\frac{x^4}{z}}}{z^2} \\\\\n 0 & 0 & \\sinh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = math.e**((x**4)/z)\nh = cosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = \\cos \\left(x+y^5-z\\right)$, and $h(x,y,z) = \\tan ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{x^2+1}} & 0 & 0 \\\\\n -\\sin \\left(x+y^5-z\\right) & -5 y^4 \\sin \\left(x+y^5-z\\right) & \\sin \\left(x+y^5-z\\right) \\\\\n \\frac{1}{(x+z)^2+1} & 0 & \\frac{1}{(x+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(x)\ng = cos(x+y**5-z)\nh = atan(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(x^5-y+z\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{5 x^4}{\\left(x^5-y+z\\right)^2+1},-\\frac{1}{\\left(x^5-y+z\\right)^2+1},\\frac{1}{\\left(x^5-y+z\\right)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x**5-y+z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sin ^{-1}(x-y+z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-(x-y+z)^2}},0,\\frac{1}{\\sqrt{1-(x-y+z)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = asin(x-y+z)\nh = asin(x-y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$-\\frac{1}{2 x^{3/2}}-\\frac{z}{y^2}-\\frac{1}{z^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = (z/y)\nh = (1/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{z^2}{y}}$, $g(x,y,z) = x+z^2$, and $h(x,y,z) = \\frac{1}{z^4}$", - "Output Answer": [ - "$\\left\\{-2 z,\\frac{2 z}{3 y \\sqrt[3]{\\frac{z^2}{y}}^2},\\frac{z^2}{3 y^2 \\sqrt[3]{\\frac{z^2}{y}}^2}+1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt((z**2)/y)\ng = x+z**2\nh = x+z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{y}{x}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{y}{x^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (y/x)\nh = (y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log \\left(\\frac{9 x}{2}\\right)$ on the interval $x = 5$ to $x = 12$\n", - "Output Answer": [ - "$-\\sqrt{26}+\\sqrt{145}+\\tanh ^{-1}\\left(\\sqrt{26}\\right)-\\tanh ^{-1}\\left(\\sqrt{145}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((9*x)/2))\na = 5\nb = 12\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^5\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x+1) (-4 \\csc (1)-5 \\tan (1) \\sec (1))+\\sec (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**5)\ng = sin(x)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y+z)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y+z)\ng = x\nh = cbrt(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\frac{1}{\\sqrt{y+z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{\\cos \\left(\\frac{x}{z}\\right)}{z} & 0 & -\\frac{x \\cos \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{1}{2 (y+z)^{3/2}} & -\\frac{1}{2 (y+z)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin((x/z))\ng = cos(x)\nh = (1/(sqrt(y+z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\sin ^{-1}(2 x)$ on the interval $x = 2$ to $x = 7$\n", - "Output Answer": [ - "$\\frac{1}{2} \\sqrt{5} \\left(E\\left(\\sin ^{-1}(14)|\\frac{1}{5}\\right)-E\\left(\\sin ^{-1}(4)|\\frac{1}{5}\\right)\\right)+i \\sqrt{11}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(2*x)\na = 2\nb = 7\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{x^2+y}{z}\\right)$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},-\\frac{x^2+y}{z^2 \\sqrt{1-\\frac{\\left(x^2+y\\right)^2}{z^2}}},-\\frac{1}{z \\sqrt{1-\\frac{\\left(x^2+y\\right)^2}{z^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin((x**2+y)/z)\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$x-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(y)\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(x y)$", - "Output Answer": [ - "$\\left\\{\\frac{x}{\\sqrt{1-x^2 y^2}},-\\frac{y}{\\sqrt{1-x^2 y^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = asinh(y)\nh = asinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{x+1}+\\cos (4 x+8)$\n", - "Output Answer": [ - "$e^{x+1}-4 \\sin (4 (x+2))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(x+1)+cos(4*x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y+z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sin \\left(\\frac{z}{y^4}\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & -\\frac{4 z \\cos \\left(\\frac{z}{y^4}\\right)}{y^5} & \\frac{\\cos \\left(\\frac{z}{y^4}\\right)}{y^4} \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sin((z/(y**4)))\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(4 x+4)-\\cos (1-5 x)$\n", - "Output Answer": [ - "$\\frac{4}{(4 x+4)^2+1}-5 \\sin (1-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(4*x+4)-cos(1-5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x y+z^4$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos ^{-1}\\left(x z^4\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y & x & 4 z^3 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{z^4}{\\sqrt{1-x^2 z^8}} & 0 & -\\frac{4 x z^3}{\\sqrt{1-x^2 z^8}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*y+z**4\ng = sqrt(y)\nh = acos(x*z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (7 x+7)+\\cos (7 x+1)$\n", - "Output Answer": [ - "$\\frac{1}{x+1}-7 \\sin (7 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(7*x+7)+cos(7*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x+4} \\cos (x+8)$\n", - "Output Answer": [ - "$e^{4 x+4} (4 \\cos (x+8)-\\sin (x+8))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x+4)*cos(x+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(7-9 x^2\\right)-\\sin (4-2 x)$\n", - "Output Answer": [ - "$2 \\left(\\cos (4-2 x)-9 x \\cos \\left(7-9 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7-9*x**2)-sin(4-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{x}{y}$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = z\nh = (x/y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\sqrt{-9 x-8}\\right)+\\sin (3-2 x)$\n", - "Output Answer": [ - "$-\\frac{9 \\cos \\left(\\sqrt{-9 x-8}\\right)}{2 \\sqrt{-9 x-8}}-2 \\cos (3-2 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(sqrt(-9*x-8))+sin(3-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^2\\right)^{3/2}$, $g(x,y,z) = \\sin \\left(x^2\\right)$, and $h(x,y,z) = \\left(x^2-y^4-z\\right)^5$", - "Output Answer": [ - "$3 x \\sqrt{x^2}-5 \\left(x^2-y^4-z\\right)^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**2)**(3/2)\ng = sin(x**2)\nh = (x**2-y**4-z)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (4 x+4)+\\tan (4-2 x)$\n", - "Output Answer": [ - "$8 \\tan (4-2 x) \\sec ^2(4-2 x)-16 \\cos (4 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(4*x+4)+tan(4-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = x$, and $h(x,y,z) = y^3 z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\cos (z) \\\\\n 1 & 0 & 0 \\\\\n 0 & 3 y^2 z^3 & 3 y^3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z)\ng = x\nh = y**3*z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\sqrt{x+y}$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sqrt(z)\nh = sqrt(x+y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = e^{y z^5}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & z^5 e^{y z^5} & 5 y z^4 e^{y z^5} \\\\\n e^x & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = math.e**(y*z**5)\nh = math.e**x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(x+1)^3-\\tan \\left(7 x^2+8\\right)$\n", - "Output Answer": [ - "$3 (x+1)^2-14 x \\sec ^2\\left(7 x^2+8\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((x+1)**3-tan(7*x**2+8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z (x-y)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{0,x-y,\\sec ^2(x)+z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z*(x-y)\ng = tan(x)\nh = tan(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\sin ^{-1}\\left(y^5\\right)$, and $h(x,y,z) = y^5$", - "Output Answer": [ - "$\\frac{5 y^4}{\\sqrt{1-y^{10}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = asin(y**5)\nh = y**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-\\sin (3 x+8)}$\n", - "Output Answer": [ - "$-\\frac{9}{4} \\sqrt{-\\sin (3 x+8)} \\left(\\cot ^2(3 x+8)+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-sin(3*x+8))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(y)$, $g(x,y,z) = \\sqrt{x z}$, and $h(x,y,z) = (x-y-z)^4$", - "Output Answer": [ - "$-4 (x-y-z)^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y)\ng = sqrt(x*z)\nh = (x-y-z)**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(3-6 x^2\\right)+\\log (1-9 x)$\n", - "Output Answer": [ - "$12 \\left(24 x^2 \\tan \\left(3-6 x^2\\right)-1\\right) \\sec ^2\\left(3-6 x^2\\right)-\\frac{81}{(1-9 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(3-6*x**2)+log(1-9*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = y^4$, and $h(x,y,z) = z-x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 4 y^3 & 0 \\\\\n -1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = y**4\nh = z-x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\sqrt{-3 x-2}\\right)$\n", - "Output Answer": [ - "$\\frac{9 \\left(\\sin \\left(\\sqrt{-3 x-2}\\right)+\\frac{\\cos \\left(\\sqrt{-3 x-2}\\right)}{\\sqrt{-3 x-2}}\\right)}{12 x+8}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(sqrt(-3*x-2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(-\\frac{25 x}{3}-\\frac{7}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{625}{(25 x+7)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-((25*x)/3)-(7/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = x y^2+z^4$\n", - "Output Answer": [ - "$\\left\\{y^2,2 x y,4 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y**2+z**4\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y}$, $g(x,y,z) = x$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y)\ng = x\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-7 x-2}+e^{-3 x-8}$\n", - "Output Answer": [ - "$-e^{-7 x-8} \\left(3 e^{4 x}+7 e^6\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-7*x-2)+math.e**(-3*x-8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^6$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin \\left(x^2\\right)$", - "Output Answer": [ - "$6 x^5+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**6\ng = math.e**y\nh = sin(x**2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sin (4 x+3)}{\\sqrt{4 x-2}}$\n", - "Output Answer": [ - "$\\frac{4 \\cos (4 x+3)}{\\sqrt{4 x-2}}-\\frac{2 \\sin (4 x+3)}{(4 x-2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sin(4*x+3))/(sqrt(4*x-2))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sin(x)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{y z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^{y-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{z}{3 \\sqrt[3]{y z}^2} & \\frac{y}{3 \\sqrt[3]{y z}^2} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & e^{y-z} & -e^{y-z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y*z)\ng = log(y)\nh = math.e**(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{y^5}{x}\\right)$, $g(x,y,z) = z^3$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y^5 \\sin \\left(\\frac{y^5}{x}\\right)}{x^2} & -\\frac{5 y^4 \\sin \\left(\\frac{y^5}{x}\\right)}{x} & 0 \\\\\n 0 & 0 & 3 z^2 \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(((y**5)/x))\ng = z**3\nh = cos(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^2+y\\right)$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$2 x \\cos \\left(x^2+y\\right)-\\frac{2}{y^3}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**2+y)\ng = (1/(y**2))\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 1 & 0 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{2-2 x} \\cos (3-7 x)$\n", - "Output Answer": [ - "$-e^{2-2 x} (28 \\sin (3-7 x)+45 \\cos (3-7 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(2-2*x)*cos(3-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{y+z}$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & e^{y+z} & e^{y+z} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(y+z)\ng = asin(z)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\log (x y)$, and $h(x,y,z) = x-y+z$", - "Output Answer": [ - "$\\left\\{-1,-1,\\frac{1}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = log(x*y)\nh = log(x*y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x y)$, $g(x,y,z) = \\sqrt{\\frac{x}{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{\\sqrt{1-x^2 y^2}} & \\frac{x}{\\sqrt{1-x^2 y^2}} & 0 \\\\\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x*y)\ng = sqrt((x/y))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^5 \\left(x^5+y\\right)^5$", - "Output Answer": [ - "$500 x^8 z^5 \\left(x^5+y\\right)^3+100 x^3 z^5 \\left(x^5+y\\right)^4+20 z^5 \\left(x^5+y\\right)^3+20 z^3 \\left(x^5+y\\right)^5$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5*(x**5+y)**5\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin ^{-1}(x z)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{\\sqrt{1-x^2 z^2}},0,\\frac{z}{\\sqrt{1-x^2 z^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = asin(x*z)\nh = asin(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(\\frac{1}{2}-\\frac{11 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{121}{4} \\cos \\left(\\frac{1}{2} (1-11 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos((1/2)-((11*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(y-z)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\tan (y)$", - "Output Answer": [ - "$\\left\\{\\sec ^2(y),-\\frac{1}{(y-z)^2+1},-\\frac{1}{(y-z)^2+1}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(y-z)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^4}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\left(1+\\frac{1}{24 \\sqrt{3}}\\right) (x-3)^2+\\left(6-\\frac{1}{2 \\sqrt{3}}\\right) (x-3)-\\sqrt{3}+9$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**4)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $x^4$", - "Output Answer": [ - "$\\frac{x^5}{5}-x^4-\\frac{x^3}{3}+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = x**4\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\log (8 x-8)-\\tan (3 x+6)$\n", - "Output Answer": [ - "$\\frac{1}{1-x}-3 \\sec ^2(3 (x+2))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-log(8*x-8)-tan(3*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\sec ^2(y)+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = tan(y)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\frac{x^2}{y^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & 3 y^2 & 0 \\\\\n \\frac{2 x}{y^2} & -\\frac{2 x^2}{y^3} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = y**3\nh = ((x**2)/(y**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(3 x-\\frac{1}{3}\\right)^2$\n", - "Output Answer": [ - "$18$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (3*x-(1/3))**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = \\cos (z)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\sin (z),0,-\\frac{1}{3 \\sqrt[3]{x+y}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x+y)\ng = cos(z)\nh = cos(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = sqrt(z)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x y}{z^4}\\right)^{3/2}}$", - "Output Answer": [ - "$\\frac{60 x^2 y^2}{z^{10} \\left(\\frac{x y}{z^4}\\right)^{7/2}}+\\frac{15 x^2}{4 z^8 \\left(\\frac{x y}{z^4}\\right)^{7/2}}+\\frac{15 y^2}{4 z^8 \\left(\\frac{x y}{z^4}\\right)^{7/2}}-\\frac{30 x y}{z^6 \\left(\\frac{x y}{z^4}\\right)^{5/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x*y)/(z**4))**(3/2)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y^2}{z^6}$, $g(x,y,z) = y-z^3$, and $h(x,y,z) = \\cos \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{2 y}{z^6} & -\\frac{6 y^2}{z^7} \\\\\n 0 & 1 & -3 z^2 \\\\\n 0 & 0 & -3 z^2 \\sin \\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((y**2)/(z**6))\ng = y-z**3\nh = cos(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y$, $g(x,y,z) = y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 1 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y\ng = y\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n -\\sin (x) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{z-1} \\sqrt{z+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = cos(x)\nh = acosh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\{0,\\sin (x),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{15 x}{2}\\right)$\n", - "Output Answer": [ - "$-900 \\sin ^4\\left(\\frac{15 x}{2}\\right) \\csc ^3(15 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(((15*x)/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y+z$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y+z\nh = y+z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\cos (y)+\\frac{1}{z^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = sin(y)\nh = atan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-4 x-4)-\\sqrt{-8 x-6}$\n", - "Output Answer": [ - "$\\frac{1}{x+1}+\\frac{4}{\\sqrt{-8 x-6}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-4*x-4)-sqrt(-8*x-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z^{10}}{x^5}$, $g(x,y,z) = y+z^2$, and $h(x,y,z) = x^{3/2}$", - "Output Answer": [ - "$1-\\frac{5 z^{10}}{x^6}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**10)/(x**5))\ng = y+z**2\nh = x**(3/2)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = sqrt(x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8) \\cos ^{-1}(-8 x-6)$\n", - "Output Answer": [ - "$\\frac{8 \\tan (8)}{\\sqrt{1-4 (4 x+3)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(8)*acos(-8*x-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-\\sin \\left(4-3 x^4\\right)}+\\cosh (9-6 x)$\n", - "Output Answer": [ - "$-6 \\left(x^3 \\sqrt{-\\sin \\left(4-3 x^4\\right)} \\cot \\left(4-3 x^4\\right)+\\sinh (9-6 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-sin(4-3*x**4))+cosh(9-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+z$, $g(x,y,z) = \\sqrt[3]{\\frac{z}{x}}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 1 \\\\\n -\\frac{z}{3 x^2 \\sqrt[3]{\\frac{z}{x}}^2} & 0 & \\frac{1}{3 x \\sqrt[3]{\\frac{z}{x}}^2} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+z\ng = cbrt(z/x)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh ^{-1}(y)$, $g(x,y,z) = z^4-x^4$, and $h(x,y,z) = \\sqrt[3]{y z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n -4 x^3 & 0 & 4 z^3 \\\\\n 0 & \\frac{z^4}{3 \\sqrt[3]{y z^4}^2} & \\frac{4 y z^3}{3 \\sqrt[3]{y z^4}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asinh(y)\ng = z**4-x**4\nh = cbrt(y*z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{\\left(\\frac{x^4}{z}\\right)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n -\\frac{6 x^3}{z \\left(\\frac{x^4}{z}\\right)^{5/2}} & 0 & \\frac{3 x^4}{2 z^2 \\left(\\frac{x^4}{z}\\right)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = log(y)\nh = (1/(((x**4)/z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$30 x^4 \\sin \\left(4-6 x^5\\right)$\n", - "Output Answer": [ - "$\\cos \\left(4-6 x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = 30*x**4*sin(4-6*x**5)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y^4}{x}}$, $g(x,y,z) = \\log \\left(x y^4\\right)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y^4}{3 x^2 \\sqrt[3]{\\frac{y^4}{x}}^2} & \\frac{4 y^3}{3 x \\sqrt[3]{\\frac{y^4}{x}}^2} & 0 \\\\\n \\frac{1}{x} & \\frac{4}{y} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt((y**4)/x)\ng = log(x*y**4)\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(-6 x-1)^2$\n", - "Output Answer": [ - "$72$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-6*x-1)**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\sin (x-y)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x^3 & 0 & 0 \\\\\n \\cos (x-y) & -\\cos (x-y) & 0 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**4\ng = sin(x-y)\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$x^2-x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = atan(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,y-\\frac{1}{z},1-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = z$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & 0 & 4 z^3 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = z\nh = z**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}(8 x+3)$\n", - "Output Answer": [ - "$-\\frac{64 (8 x+3)}{\\left(1-(8 x+3)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(8*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x+z^2}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\left(x+z^2\\right)^2} & 0 & -\\frac{2 z}{\\left(x+z^2\\right)^2} \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n \\cos (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x+z**2))\ng = atanh(y)\nh = sin(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^2\\right)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**2)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^4}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = x^4 y$", - "Output Answer": [ - "$\\frac{4 x^3}{3 \\sqrt[3]{x^4}^2}+\\frac{1}{y^2+1}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**4)\ng = atan(y)\nh = x**4*y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = sin(y)\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3-8 x}+2 \\sqrt{2} \\sqrt{x}$\n", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{2} x^{3/2}}-\\frac{16}{(3-8 x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3-8*x)+2*sqrt(2)*sqrt(x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = \\tan (x-y)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(x-y),-\\sec ^2(x-y),-\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y/x)\nh = cbrt(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{z-x}$, $g(x,y,z) = \\tan \\left(y^2\\right)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n 0 & 2 y \\sec ^2\\left(y^2\\right) & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(z-x)\ng = tan(y**2)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{x}{z}\\right)^{3/2}$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{\\frac{x}{z}}}{2 z} & 0 & -\\frac{3 x \\sqrt{\\frac{x}{z}}}{2 z^2} \\\\\n 0 & 0 & 1 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x/z)**(3/2)\ng = z\nh = atan(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(e^{5-7 x}\\right)$\n", - "Output Answer": [ - "$49 e^{5-14 x} \\left(e^{7 x} \\cos \\left(e^{5-7 x}\\right)-e^5 \\sin \\left(e^{5-7 x}\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = sin(math.e**(5-7*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y z)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(y*z)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{\\sqrt{1-z^2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = acos(y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(6-9 x^3\\right)^3$\n", - "Output Answer": [ - "$-2916 x \\left(18 x^6-15 x^3+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (6-9*x**3)**3\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\sin ^{-1}(x-z)$, $g(x,y,z) = \\frac{1}{(x+z)^2}$, and $h(x,y,z) = e^{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-(x-z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x-z)^2}} \\\\\n -\\frac{2}{(x+z)^3} & 0 & -\\frac{2}{(x+z)^3} \\\\\n z e^{x z} & 0 & x e^{x z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = -asin(x-z)\ng = (1/((x+z)**2))\nh = math.e**(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & -\\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = (1/(y**(3/2)))\nh = acos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^2}$ and $g(x) = $x^5$", - "Output Answer": [ - "$-\\frac{10}{729} (x+3)^2-\\frac{4 (x+3)}{243}-\\frac{1}{81}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**2)\ng = x**5\nseries = f.subs(x, g).series(x, -3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = (x+z)^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (x+z)**(3/2)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-2 x-1)^5}$\n", - "Output Answer": [ - "$-\\frac{120}{(2 x+1)^7}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-2*x-1)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fourth term in the series expansion of the following function around 4:\n\n$e^x$\n", - "Output Answer": [ - "$\\frac{e^3}{24}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = S(math.e**x)\nseries = f.series(x, 4, None)\nfor i, term in enumerate(series):\n if i == 4: print(term)\n elif i > 4: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = x$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,1-\\frac{1}{(x-y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{x}{z^2}$", - "Output Answer": [ - "$\\frac{6 x}{z^4}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x/(z**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x+z)$, $g(x,y,z) = \\sqrt{y^3+z}$, and $h(x,y,z) = \\left(y^3+z\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{9}{2} y^2 \\sqrt{y^3+z}-\\frac{1}{2 \\sqrt{y^3+z}},-\\sin (x+z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x+z)\ng = sqrt(y**3+z)\nh = sqrt(y**3+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(2-4 x)$\n", - "Output Answer": [ - "$\\frac{16 (2-4 x)}{\\left(1-4 (1-2 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(2-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(8 x^3\\right)-\\sin ^{-1}(8-x)$\n", - "Output Answer": [ - "$-\\frac{4608 x^7}{\\left(1-64 x^6\\right)^{3/2}}-\\frac{48 x}{\\sqrt{1-64 x^6}}+\\frac{x-8}{\\left(1-(x-8)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(8*x**3)-asin(8-x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(5-8 x)^5$\n", - "Output Answer": [ - "$1280 (5-8 x)^3$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (5-8*x)**5\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^4\\right)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$(x-5) \\left(100 \\sqrt{5} \\cos (625)-\\frac{\\sin (625)}{10 \\sqrt{5}}\\right)+\\frac{\\sin (625)}{\\sqrt{5}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**4)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (z (x-y))$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z \\cos (z (x-y)) & -z \\cos (z (x-y)) & (x-y) \\cos (z (x-y)) \\\\\n 0 & e^y & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(z*(x-y))\ng = math.e**y\nh = cbrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (z)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\sin (z) \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(z)\ng = sin(y)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**(3/2)))\ng = atanh(y)\nh = sqrt(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $x^3$", - "Output Answer": [ - "$-4 (x+1)^3+6 (x+1)^2-4 (x+1)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = x**3\nseries = f.subs(x, g).series(x, -1, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$5 x^4+\\frac{1}{\\sqrt{1-y^2}}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = asin(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{y}{x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{x},\\frac{y}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^8$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 8 x^7 & 0 & 0 \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**8\ng = y**(3/2)\nh = acos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^5}$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = e^{z \\left(x^5+y\\right)}$", - "Output Answer": [ - "$\\left\\{z e^{z \\left(x^5+y\\right)}-\\frac{1}{z^2+1},-5 x^4 z e^{z \\left(x^5+y\\right)},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**5)\ng = atan(z)\nh = atan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{x}{y}+z\\right)^2}$, $g(x,y,z) = \\frac{y^2}{x^2}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{y \\left(\\frac{x}{y}+z\\right)^3} & \\frac{2 x}{y^2 \\left(\\frac{x}{y}+z\\right)^3} & -\\frac{2}{\\left(\\frac{x}{y}+z\\right)^3} \\\\\n -\\frac{2 y^2}{x^3} & \\frac{2 y}{x^2} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(((x/y)+z)**2))\ng = ((y**2)/(x**2))\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt{\\frac{z}{y}}$", - "Output Answer": [ - "$\\cos (x)+\\frac{1}{2 y \\sqrt{\\frac{z}{y}}}+\\frac{3 \\sqrt{y}}{2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y**(3/2)\nh = sqrt((z/y))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x z^4}$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log \\left(z^4\\right)$", - "Output Answer": [ - "$\\frac{z^4}{3 \\sqrt[3]{x z^4}^2}-\\frac{1}{\\sqrt{1-y^2}}+\\frac{4}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*z**4)\ng = acos(y)\nh = log(z**4)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (x+5)-\\sin (1-8 x)$\n", - "Output Answer": [ - "$64 \\sin (1-8 x)-\\cos (x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(x+5)-sin(1-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x+y} & \\frac{1}{x+y} & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x+y)\ng = sin(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x-y}$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{-y \\sec ^2(y z),0,-\\frac{1}{(x-y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x-y))\ng = tan(y*z)\nh = tan(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{\\frac{11}{3}-\\frac{25 x}{3}}$\n", - "Output Answer": [ - "$\\frac{625}{9} e^{\\frac{11}{3}-\\frac{25 x}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**((11/3)-((25*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**y\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos \\left(x z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,z^3 \\sin \\left(x z^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x y$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n y & x & 0 \\\\\n 0 & 0 & \\frac{3 \\sqrt{z}}{2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = x*y\nh = z**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(y-x)^{3/2}}$, and $h(x,y,z) = \\sqrt{y+z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{3}{2 (y-x)^{5/2}} & -\\frac{3}{2 (y-x)^{5/2}} & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z^4}} & \\frac{2 z^3}{\\sqrt{y+z^4}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((y-x)**(3/2)))\nh = sqrt(y+z**4)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{z-x}$, and $h(x,y,z) = \\sin \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{1}{3 \\sqrt[3]{z-x}^2} & 0 & \\frac{1}{3 \\sqrt[3]{z-x}^2} \\\\\n -\\frac{z \\cos \\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\cos \\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cbrt(z-x)\nh = sin((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sinh ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & \\frac{1}{\\sqrt{(y+z)^2+1}} & \\frac{1}{\\sqrt{(y+z)^2+1}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = tan(y)\nh = asinh(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $x^{12}$", - "Output Answer": [ - "$\\frac{x^5}{120}-\\frac{x^3}{6}+x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = x**12\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (3-6 x)+\\cos (1-2 x)$\n", - "Output Answer": [ - "$2 \\left(\\frac{1}{2 x-1}+\\sin (1-2 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(3-6*x)+cos(1-2*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^y$, $g(x,y,z) = \\log (x+y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{x+y}-e^y\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**y\ng = log(x+y)\nh = log(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (z-y)$, and $h(x,y,z) = x^5$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z-y},-5 x^4,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = log(z-y)\nh = log(z-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\log (y-z)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y-z},\\frac{1}{z},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = y**3\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos (x y+z)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 1 \\\\\n -y \\sin (x y+z) & -x \\sin (x y+z) & -\\sin (x y+z) \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z\ng = cos(x*y+z)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{x z}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{z}{2 (x z)^{3/2}} & 0 & -\\frac{x}{2 (x z)^{3/2}} \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(x*z)))\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt[3]{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\frac{z^2}{\\sqrt[3]{z^3}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = tan(y)\nh = cbrt(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{15 x}{2}+\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{225}{4} \\sin \\left(\\frac{15 (x+1)}{2}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(((15*x)/2)+(15/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x z$, $g(x,y,z) = e^{y^4}$, and $h(x,y,z) = e^x$", - "Output Answer": [ - "$4 e^{y^4} y^3+z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*z\ng = math.e**(y**4)\nh = math.e**x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{0,-z,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n 0 & \\cos (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = z\nh = sin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^4$ and $g(x) = $\\tan \\left(x^5\\right)$", - "Output Answer": [ - "$(x+1) \\left(1+5 \\tan ^2(1)\\right)+1-\\tan (1)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**4\ng = tan(x**5)\nseries = f.subs(x, g).series(x, -1, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x^3}$, $g(x,y,z) = \\sqrt[3]{\\frac{x^3}{y}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{x^3},\\frac{x^2}{y \\sqrt[3]{\\frac{x^3}{y}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/(x**3))\ng = cbrt((x**3)/y)\nh = cbrt((x**3)/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^3}$, $g(x,y,z) = e^{y/z}$, and $h(x,y,z) = \\cosh (z)$", - "Output Answer": [ - "$\\left\\{\\frac{y e^{y/z}}{z^2},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**3)\ng = math.e**(y/z)\nh = math.e**(y/z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-\\frac{15 x^2}{2}-\\frac{13}{2}}+\\sqrt{\\frac{5}{2}}$\n", - "Output Answer": [ - "$-15 e^{-\\frac{15 x^2}{2}-\\frac{13}{2}} x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-((15*x**2)/2)-(13/2))+sqrt((5/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(2-8 x)$\n", - "Output Answer": [ - "$-\\frac{64 (2-8 x)}{\\left(1-4 (1-4 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-2 x-7)-\\left(2 x^3+7\\right)^5$\n", - "Output Answer": [ - "$\\frac{2}{2 x+7}-30 x^2 \\left(2 x^3+7\\right)^4$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-2*x-7)-(2*x**3+7)**5, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the sixth order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = \\tan ^{-1}(x)$ and $g(x) = $\\tan ^{-1}(x)$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = atan(x)\ng = atan(x)\nseries = f.subs(x, g).series(x, -1, 6)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = x$ and $g(x) = $\\tanh (x)$", - "Output Answer": [ - "$(x+3) \\left(-3+3 \\coth ^2(3)-\\coth (3)\\right)+3 \\coth (3)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x\ng = tanh(x)\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{29 x}{5}+\\frac{37}{5}}$\n", - "Output Answer": [ - "$-\\frac{841}{4 \\sqrt{5} (29 x+37)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((29*x)/5)+(37/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(4 x-5)^4-e^{-6 x-5}$\n", - "Output Answer": [ - "$16 (4 x-5)^3+6 e^{-6 x-5}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((4*x-5)**4-math.e**(-6*x-5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x+z\nh = tan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{1-x^2} & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x)\ng = (1/(y**(3/2)))\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{1}{y^2}$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n 0 & -\\frac{2}{y^3} & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = (1/(y**2))\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan ^{-1}(x-z)$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{-1,\\frac{1}{(x-z)^2+1}-\\frac{1}{x^2+1},-1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atan(x-z)\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{y^2}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = sqrt(y**2)\nh = sqrt(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{\\log (2 x+3)}{(1-6 x)^3}$\n", - "Output Answer": [ - "$-\\frac{4 \\left(-252 x^2-276 x+108 (2 x+3)^2 \\log (2 x+3)+53\\right)}{(2 x+3)^2 (6 x-1)^5}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((log(2*x+3))/((1-6*x)**3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^3}$, $g(x,y,z) = \\log (z-y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{x^2}{\\sqrt[3]{x^3}^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**3)\ng = log(z-y)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(\\sin \\left(x+\\frac{13}{2}\\right)\\right)$\n", - "Output Answer": [ - "$\\sin \\left(\\sin \\left(x+\\frac{13}{2}\\right)\\right) \\cos ^2\\left(x+\\frac{13}{2}\\right)+\\sin \\left(x+\\frac{13}{2}\\right) \\cos \\left(\\sin \\left(x+\\frac{13}{2}\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(sin(x+(13/2)))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\sinh ^{-1}\\left(\\frac{z^5}{x}\\right)$", - "Output Answer": [ - "$\\left\\{0,\\frac{z^5}{x^2 \\sqrt{\\frac{z^{10}}{x^2}+1}},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = math.e**(y**3)\nh = math.e**(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{z \\left(x^5-y\\right)}$", - "Output Answer": [ - "$-\\frac{50 x^8 z}{9 \\left(x^5-y\\right) \\sqrt[3]{z \\left(x^5-y\\right)}^2}+\\frac{20 x^3 z}{3 \\sqrt[3]{z \\left(x^5-y\\right)}^2}-\\frac{2 z}{9 \\left(x^5-y\\right) \\sqrt[3]{z \\left(x^5-y\\right)}^2}-\\frac{2 \\left(x^5-y\\right)}{9 z \\sqrt[3]{z \\left(x^5-y\\right)}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z*(x**5-y))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 z \\sqrt{\\frac{y}{z}}},\\sec ^2(z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(9-2 x)$\n", - "Output Answer": [ - "$-\\frac{4 (9-2 x)}{\\left(1-(9-2 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(9-2*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\frac{1}{x^2+1}-\\frac{1}{2 z^{3/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = y\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\left(\\frac{3 x}{2}-6\\right)^2 \\tan \\left(\\frac{15}{2}-4 x^2\\right)$\n", - "Output Answer": [ - "$\\frac{9}{4} (x-4) \\left(8 (x-4) x-\\sin \\left(15-8 x^2\\right)\\right) \\sec ^2\\left(\\frac{15}{2}-4 x^2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(((3*x)/2)-6)**2*tan((15/2)-4*x**2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\tan \\left(\\frac{7 x}{2}\\right)$ on the interval $x = 2$ to $x = 8$\n", - "Output Answer": [ - "$\\int_2^8 \\sqrt{\\frac{49}{4} \\sec ^4\\left(\\frac{7 x}{2}\\right)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(((7*x)/2))\na = 2\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (z)$, $g(x,y,z) = y^4$, and $h(x,y,z) = y^2$", - "Output Answer": [ - "$4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(z)\ng = y**4\nh = y**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = (z-y)^2$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\sec ^2(x)-2 (z-y)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (z-y)**2\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x+5} \\log \\left(3 x^5\\right)$\n", - "Output Answer": [ - "$\\frac{-9 x^2 \\log \\left(3 x^5\\right)-25 (6 x+5)}{x^2 (6 x+5)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x+5)*log(3*x**5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\sqrt{y+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}+\\frac{1}{2 \\sqrt{y+z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos((z/x))\nh = sqrt(y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x}$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$\\sqrt{x}+\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{y}{x^5}\\right)$, $g(x,y,z) = z$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{5 y \\sin \\left(\\frac{y}{x^5}\\right)}{x^6}+\\frac{1}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((y/(x**5)))\ng = z\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = y^4$, and $h(x,y,z) = \\sqrt{x-y+z}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-y+z}}+4 y^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z)\ng = y**4\nh = sqrt(x-y+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3 z$, $g(x,y,z) = \\frac{1}{y^3}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left\\{0,x^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*z\ng = (1/(y**3))\nh = (1/(y**3))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{y z}$, and $h(x,y,z) = \\sin \\left(\\frac{x}{y}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y z^2}-\\frac{x \\cos \\left(\\frac{x}{y}\\right)}{y^2},-\\frac{\\cos \\left(\\frac{x}{y}\\right)}{y},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(y*z))\nh = (1/(y*z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin \\left(2 x^3+3\\right)$\n", - "Output Answer": [ - "$36 x^4 \\sin \\left(2 x^3+3\\right)-12 x \\cos \\left(2 x^3+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(2*x**3+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\tan ^{-1}(x-y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{(x-y)^2+1},-\\frac{1}{(x-y)^2+1},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**(3/2)\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x-y^2}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{2 y}{3 \\sqrt[3]{x-y^2}^2}+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cbrt(x-y**2)\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x+y$, $g(x,y,z) = y^2$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 1 & 0 \\\\\n 0 & 2 y & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x+y\ng = y**2\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(x-y^3-z\\right)$", - "Output Answer": [ - "$-9 y^4 \\sin \\left(x-y^3-z\\right)-2 \\sin \\left(x-y^3-z\\right)-6 y \\cos \\left(x-y^3-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x-y**3-z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = y^5-x$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\{0,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = y**5-x\nh = y**5-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, $g(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{y z}\\right)$, and $h(x,y,z) = \\tan \\left(\\frac{z}{x}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n -\\frac{1}{y z \\sqrt{1-\\frac{x^2}{y^2 z^2}}} & \\frac{x}{y^2 z \\sqrt{1-\\frac{x^2}{y^2 z^2}}} & \\frac{x}{y z^2 \\sqrt{1-\\frac{x^2}{y^2 z^2}}} \\\\\n -\\frac{z \\sec ^2\\left(\\frac{z}{x}\\right)}{x^2} & 0 & \\frac{\\sec ^2\\left(\\frac{z}{x}\\right)}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(y/x)\ng = acos(x/(y*z))\nh = tan((z/x))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{y+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{(y+z)^2}$", - "Output Answer": [ - "$1-\\frac{2}{(y+z)^3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y+z)\ng = y\nh = (1/((y+z)**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\tan ^{-1}\\left(2 x^4\\right)$\n", - "Output Answer": [ - "$-\\frac{81872}{1050625}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(atan(2*x**4))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^{3/2}$, $g(x,y,z) = \\cos (y+z)$, and $h(x,y,z) = (y+z)^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3 \\sqrt{x}}{2} & 0 & 0 \\\\\n 0 & -\\sin (y+z) & -\\sin (y+z) \\\\\n 0 & 5 (y+z)^4 & 5 (y+z)^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**(3/2)\ng = cos(y+z)\nh = (y+z)**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y z$, $g(x,y,z) = \\log (y z)$, and $h(x,y,z) = \\sqrt{y-x}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y-x}}-\\frac{1}{z},\\frac{1}{2 \\sqrt{y-x}}+y,-z\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y*z\ng = log(y*z)\nh = log(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+z}}+\\cos (z)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z)\ng = y\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{6-2 x^3}-\\tan (1-4 x)$\n", - "Output Answer": [ - "$12 e^{6-2 x^3} x \\left(3 x^3-1\\right)-32 \\tan (1-4 x) \\sec ^2(1-4 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(6-2*x**3)-tan(1-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(x^3\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan \\left(x^3\\right)$", - "Output Answer": [ - "$\\left\\{0,-3 x^2 \\sec ^2\\left(x^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x**3)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = e^{y+z}$, and $h(x,y,z) = (y z)^{3/2}$", - "Output Answer": [ - "$\\left\\{\\frac{3}{2} z \\sqrt{y z}-e^{y+z},0,0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = math.e**(y+z)\nh = math.e**(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(2-7 x)$\n", - "Output Answer": [ - "$-\\frac{49 (2-7 x)}{\\left(1-(2-7 x)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(2-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\sqrt{5 x-1}\\right)$\n", - "Output Answer": [ - "$-\\frac{25}{2 (1-5 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(sqrt(5*x-1))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-4 \\log \\left(\\frac{9}{2}-\\frac{9 x}{2}\\right)$\n", - "Output Answer": [ - "$-\\frac{4}{x-1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-4*log((9/2)-((9*x)/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin ^{-1}(9 x+8)-\\cos (1)$\n", - "Output Answer": [ - "$\\frac{9}{\\sqrt{1-(9 x+8)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(asin(9*x+8)-cos(1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{x^4 z^4}{y^4}$, and $h(x,y,z) = \\cos (x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n \\frac{4 x^3 z^4}{y^4} & -\\frac{4 x^4 z^4}{y^5} & \\frac{4 x^4 z^3}{y^4} \\\\\n -\\sin (x) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = ((x**4*z**4)/(y**4))\nh = cos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(z \\left(x^3+y\\right)\\right)$", - "Output Answer": [ - "$-9 x^4 z^2 \\sin \\left(z \\left(x^3+y\\right)\\right)-z^2 \\sin \\left(z \\left(x^3+y\\right)\\right)-\\left(x^3+y\\right)^2 \\sin \\left(z \\left(x^3+y\\right)\\right)+6 x z \\cos \\left(z \\left(x^3+y\\right)\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z*(x**3+y))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{36 x}{5}-\\tan ^{-1}\\left(\\frac{9 x}{5}+1\\right)+\\frac{13}{5}$\n", - "Output Answer": [ - "$\\frac{9}{5} \\left(-\\frac{1}{\\left(\\frac{9 x}{5}+1\\right)^2+1}-4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((36*x)/5)-atan(((9*x)/5)+1)+(13/5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{y z^5}$\n", - "Output Answer": [ - "$\\left\\{0,z^5 e^{y z^5},5 y z^4 e^{y z^5}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y*z**5)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x-y)$, $g(x,y,z) = \\cosh (x+y)$, and $h(x,y,z) = \\frac{1}{y}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{y^2},0,\\sec ^2(x-y)+\\sinh (x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x-y)\ng = cosh(x+y)\nh = cosh(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x^5$, and $h(x,y,z) = (y+z)^3$", - "Output Answer": [ - "$\\left\\{3 (y+z)^2,0,5 x^4\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x**5\nh = x**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$", - "Output Answer": [ - "$\\frac{2 z^2 \\tan \\left(\\frac{z}{y}\\right) \\sec ^2\\left(\\frac{z}{y}\\right)}{y^4}+\\frac{2 z \\sec ^2\\left(\\frac{z}{y}\\right)}{y^3}+\\frac{2 \\tan \\left(\\frac{z}{y}\\right) \\sec ^2\\left(\\frac{z}{y}\\right)}{y^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((z/y))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (z)$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(z)\ng = atan(z)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{\\sqrt{1-y^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\sqrt{1-x^2}},-\\frac{x \\sin \\left(\\frac{x}{y}\\right)}{y^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos((x/y))\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-\\sin (2-4 x))-\\sqrt{8-x}$\n", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{8-x}}-4 \\cot (2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-sin(2-4*x))-sqrt(8-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\cos \\left(\\frac{3 x}{2}\\right)-\\cos (4 x)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(cos(((3*x)/2))-cos(4*x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x/z}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{e^{x/z}}{z} & 0 & -\\frac{x e^{x/z}}{z^2} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x/z)\ng = cbrt(y)\nh = acos(x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(x-y^3\\right)$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z},\\frac{3 y^2}{\\left(x-y^3\\right)^2+1}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x-y**3)\ng = sin(y**3)\nh = sin(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\cos \\left(\\frac{13}{3}-\\frac{22 x}{3}\\right)-\\tan \\left(\\frac{1}{3}-4 x\\right)$\n", - "Output Answer": [ - "$4 \\sec ^2\\left(\\frac{1}{3}-4 x\\right)-\\frac{22}{3} \\sin \\left(\\frac{1}{3} (13-22 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-cos((13/3)-((22*x)/3))-tan((1/3)-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{6 x^2}{4 x^3+7}$\n", - "Output Answer": [ - "$\\frac{1}{2} \\log \\left(4 x^3+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((6*x**2)/(4*x**3+7))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (-9 x-1)+\\tan (4-4 x)$\n", - "Output Answer": [ - "$\\frac{9}{9 x+1}-4 \\sec ^2(4-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(-9*x-1)+tan(4-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\tanh (z)$", - "Output Answer": [ - "$2 y+\\text{sech}^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y)\ng = y**2\nh = tanh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\frac{x-1}{e}-\\frac{3 (x-1)^2}{2 e}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (6 x-6)-(6 x-3)^2$\n", - "Output Answer": [ - "$-\\frac{1}{(x-1)^2}-72$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(6*x-6)-(6*x-3)**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(\\frac{3}{2}-\\frac{13 x}{2}\\right)-\\cos \\left(\\frac{9}{2}-4 x\\right)$\n", - "Output Answer": [ - "$16 \\cos \\left(\\frac{9}{2}-4 x\\right)-\\frac{169}{4} \\sin \\left(\\frac{1}{2} (3-13 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin((3/2)-((13*x)/2))-cos((9/2)-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+y)\ng = y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^4\\right)$ and $g(x) = $\\sin (x)$", - "Output Answer": [ - "$(x-5)^2 \\left(\\frac{\\sin (5)}{2}-\\frac{2}{25}\\right)+(x-5) \\left(\\frac{4}{5}-\\cos (5)\\right)+4 \\log (5)-\\sin (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**4)\ng = sin(x)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (y-x)^5$, $g(x,y,z) = y z$, and $h(x,y,z) = \\sin (x z)$", - "Output Answer": [ - "$-5 (y-x)^4+x \\cos (x z)+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y-x)**5\ng = y*z\nh = sin(x*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x-y)$, $g(x,y,z) = (x y)^{3/2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n \\frac{3}{2} y \\sqrt{x y} & \\frac{3}{2} x \\sqrt{x y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x-y)\ng = (x*y)**(3/2)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the integral of the following function:\n\n$-\\frac{5}{2 x^2+5 x}$\n", - "Output Answer": [ - "$-5 \\left(\\frac{\\log (x)}{5}-\\frac{1}{5} \\log (2 x+5)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(5/(2*x**2+5*x))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log \\left(z^3 \\left(x+y^3\\right)\\right)$", - "Output Answer": [ - "$-\\frac{9 y^4}{\\left(x+y^3\\right)^2}+\\frac{6 y}{x+y^3}-\\frac{1}{\\left(x+y^3\\right)^2}-\\frac{3}{z^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z**3*(x+y**3))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$e^y+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan((z/y))\ng = math.e**y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 1$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^8$", - "Output Answer": [ - "$-\\frac{17}{2} (x-1)^2+x-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**8\nseries = f.subs(x, g).series(x, 1, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^2\\right)$ and $g(x) = $\\sinh ^{-1}(x)$", - "Output Answer": [ - "$\\left(\\frac{2}{17 \\sqrt{17}}-\\frac{1}{16}\\right) (x-4)^2+\\left(\\frac{1}{2}-\\frac{1}{\\sqrt{17}}\\right) (x-4)+4 \\log (2)-\\sinh ^{-1}(4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**2)\ng = asinh(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $x^{15}$", - "Output Answer": [ - "$\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = x**15\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-6 x-1}+e^{-3 x-3}$\n", - "Output Answer": [ - "$-3 e^{-3 (x+1)}-\\frac{3}{\\sqrt{-6 x-1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-6*x-1)+math.e**(-3*x-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan (x y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n y \\sec ^2(x y) & x \\sec ^2(x y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = sqrt(y)\nh = tan(x*y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x+y^3}}$, $g(x,y,z) = \\cos \\left(y^3\\right)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$-\\frac{1}{2 \\left(x+y^3\\right)^{3/2}}-3 y^2 \\sin \\left(y^3\\right)+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x+y**3)))\ng = cos(y**3)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt{\\frac{z}{y^5}}$, and $h(x,y,z) = \\sqrt[3]{\\frac{z}{y^5}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sin (x) & 0 & 0 \\\\\n 0 & -\\frac{5 z}{2 y^6 \\sqrt{\\frac{z}{y^5}}} & \\frac{1}{2 y^5 \\sqrt{\\frac{z}{y^5}}} \\\\\n 0 & -\\frac{5 z}{3 y^6 \\sqrt[3]{\\frac{z}{y^5}}^2} & \\frac{1}{3 y^5 \\sqrt[3]{\\frac{z}{y^5}}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(x)\ng = sqrt((z/(y**5)))\nh = cbrt(z/(y**5))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan ^{-1}(6-8 x) \\tan (8 x+7)$\n", - "Output Answer": [ - "$8 \\tan ^{-1}(6-8 x) \\sec ^2(8 x+7)-\\frac{8 \\tan (8 x+7)}{(6-8 x)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(atan(6-8*x)*tan(8*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-3 x)$ on the interval $x = 0$ to $x = 1$\n", - "Output Answer": [ - "$\\int_0^1 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-3*x)\na = 0\nb = 1\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x y}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{y}{2 \\sqrt{x y}} & \\frac{x}{2 \\sqrt{x y}} & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x*y)\ng = cos(y)\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\cos ^{-1}(x)$, and $h(x,y,z) = \\log \\left(x+y^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{1}{x+y^2} & \\frac{2 y}{x+y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = acos(x)\nh = log(x+y**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\tan \\left(y^5\\right)$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 z^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = tan(y**5)\nh = tan(y**5)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{4 x^2+5}-(x+6)^3$\n", - "Output Answer": [ - "$\\frac{4 x}{\\sqrt{4 x^2+5}}-3 (x+6)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(4*x**2+5)-(x+6)**3, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-x^2-3}$\n", - "Output Answer": [ - "$\\frac{3}{\\left(-x^2-3\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-x**2-3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\tan \\left(\\frac{y}{z}\\right)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{\\frac{y \\sec ^2\\left(\\frac{y}{z}\\right)}{z^2},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = tan((y/z))\nh = tan((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan \\left(x^3\\right)$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$\\begin{cases}\n 0 & x>0\\lor x<0 \\\\\n \\text{Indeterminate} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x**3)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\sin (x+z)$", - "Output Answer": [ - "$\\cos (x+z)+\\sec ^2(x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x\nh = sin(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = \\log (z-y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$3 x^2-\\frac{1}{z-y}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = log(z-y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(\\frac{5}{3}-\\frac{23 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{1058}{9} \\tan \\left(\\frac{1}{3} (5-23 x)\\right) \\sec ^2\\left(\\frac{1}{3} (5-23 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan((5/3)-((23*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-x}-\\tan (8-7 x)$\n", - "Output Answer": [ - "$7 \\sec ^2(8-7 x)-e^{1-x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-x)-tan(8-7*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y z$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z & y \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y*z\ng = y\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$1-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = y\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+y}$, $g(x,y,z) = \\log \\left(y+z^2\\right)$, and $h(x,y,z) = \\cos ^{-1}\\left(y z^2\\right)$", - "Output Answer": [ - "$\\left\\{-\\frac{z^2}{\\sqrt{1-y^2 z^4}}-\\frac{2 z}{y+z^2},0,-e^{x+y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+y)\ng = log(y+z**2)\nh = log(y+z**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x-6}-\\left(-6 x^2-7\\right)^3$\n", - "Output Answer": [ - "$6480 x^4+9072 x^2-\\frac{\\sqrt{2}}{(2 x-3)^{3/2}}+1764$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x-6)-(-6*x**2-7)**3\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-3 x-9}+\\log (9-7 x)$\n", - "Output Answer": [ - "$-\\frac{49}{(9-7 x)^2}-\\frac{9}{4 (-3 x-9)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-3*x-9)+log(9-7*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(9 x^5+5\\right)+\\frac{1}{(-x-6)^2}$\n", - "Output Answer": [ - "$-45 x^4 \\sin \\left(9 x^5+5\\right)-\\frac{2}{(x+6)^3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(9*x**5+5)+(1/((-x-6)**2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\sinh \\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = y^5 z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n \\frac{\\cosh \\left(\\frac{x}{y}\\right)}{y} & -\\frac{x \\cosh \\left(\\frac{x}{y}\\right)}{y^2} & 0 \\\\\n 0 & 5 y^4 z^5 & 5 y^5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = sinh(x/y)\nh = y**5*z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\tan (x+z)$", - "Output Answer": [ - "$\\sec ^2(x+z)+\\frac{1}{3 \\sqrt[3]{y}^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cbrt(y)\nh = tan(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{2 x^4-3} (-3 x-8)^4$\n", - "Output Answer": [ - "$4 e^{2 x^4-3} (3 x+8)^3 \\left(6 x^4+16 x^3+3\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(2*x**4-3)*(-3*x-8)**4, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\sin (y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cos(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{13}{2}}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt((13/2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cosh ^{-1}(x)$, $g(x,y,z) = x^2$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x-1} \\sqrt{x+1}}+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acosh(x)\ng = x**2\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4) \\cos \\left(6 x^2+7\\right)$\n", - "Output Answer": [ - "$-12 x \\log (4) \\sin \\left(6 x^2+7\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4)*cos(6*x**2+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x}{y}\\right)$, $g(x,y,z) = \\sin ^{-1}(x-z)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-(x-z)^2}},0,\\frac{1}{\\sqrt{1-(x-z)^2}}+\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/y))\ng = asin(x-z)\nh = asin(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cosh \\left(x^3 z\\right)$", - "Output Answer": [ - "$9 x^4 z^2 \\cosh \\left(x^3 z\\right)+6 x z \\sinh \\left(x^3 z\\right)+x^6 \\cosh \\left(x^3 z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cosh(x**3*z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, and $h(x,y,z) = e^{x+y}$", - "Output Answer": [ - "$\\left\\{e^{x+y},-e^{x+y},-\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = cbrt(y/x)\nh = cbrt(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x y}$, $g(x,y,z) = \\log \\left(\\frac{z^5}{x}\\right)$, and $h(x,y,z) = \\log \\left(x y-z^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y e^{x y} & x e^{x y} & 0 \\\\\n -\\frac{1}{x} & 0 & \\frac{5}{z} \\\\\n \\frac{y}{x y-z^5} & \\frac{x}{x y-z^5} & -\\frac{5 z^4}{x y-z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x*y)\ng = log(((z**5)/x))\nh = log(x*y-z**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\log (z-y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{z-y} & \\frac{1}{z-y} \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = log(z-y)\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\tanh (x)$, and $h(x,y,z) = \\cos ^{-1}\\left(\\frac{x y}{z^2}\\right)$", - "Output Answer": [ - "$\\frac{2 x y}{z^3 \\sqrt{1-\\frac{x^2 y^2}{z^4}}}+y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = tanh(x)\nh = acos((x*y)/(z**2))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x^4}$, $g(x,y,z) = \\frac{x^4}{y}$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{4 x^3}{y}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x**4)\ng = ((x**4)/y)\nh = ((x**4)/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(3 x^3+4\\right)^5}+\\cos (7-8 x)$\n", - "Output Answer": [ - "$8 \\sin (7-8 x)-\\frac{45 x^2}{\\left(3 x^3+4\\right)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3*x**3+4)**5))+cos(7-8*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x z}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\frac{z}{2 \\sqrt{x z}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x*z)\ng = y\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6-4 x}-\\tan (2 x+3)$\n", - "Output Answer": [ - "$-4 e^{6-4 x}-2 \\sec ^2(2 x+3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6-4*x)-tan(2*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (x)$", - "Output Answer": [ - "$e^y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = math.e**y\nh = sin(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{x y}$, and $h(x,y,z) = (y+z)^5$", - "Output Answer": [ - "$-\\frac{1}{x y^2}+\\frac{1}{2 \\sqrt{x}}+5 (y+z)^4$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/(x*y))\nh = (y+z)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\tan (x)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = tan(x)\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sin ^{-1}(x)$ and $g(x) = $x^{25}$", - "Output Answer": [ - "$x$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = asin(x)\ng = x**25\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh \\left(\\frac{x+y}{z}\\right)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = x-y$", - "Output Answer": [ - "$\\left\\{-1,-\\frac{(x+y) \\text{sech}^2\\left(\\frac{x+y}{z}\\right)}{z^2}-1,-\\frac{\\text{sech}^2\\left(\\frac{x+y}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh((x+y)/z)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{-9 x-4}}{\\sqrt{-7 x-8}}$\n", - "Output Answer": [ - "$\\frac{22}{\\sqrt{-9 x-4} (-7 x-8)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(-9*x-4))/(sqrt(-7*x-8))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(3-5 x^5\\right)^4}-\\frac{1}{216 x^3}$\n", - "Output Answer": [ - "$\\frac{100 x^4}{\\left(3-5 x^5\\right)^5}+\\frac{1}{72 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3-5*x**5)**4))-(1/(216*x**3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{x^3}{3}+\\frac{x^2}{2}+x-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = y z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{-y,1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z-y}$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z-y))\ng = tan(y)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\sin (x)$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n \\cos (x) & 0 & 0 \\\\\n 0 & z & y \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/z)\ng = sin(x)\nh = y*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-8 x^3-3} \\log \\left(-6 x^2-6\\right)$\n", - "Output Answer": [ - "$\\frac{e^{-8 x^3-3} \\left(2 x-24 x \\left(x^3+x\\right) \\log \\left(-6 \\left(x^2+1\\right)\\right)\\right)}{x^2+1}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-8*x**3-3)*log(-6*x**2-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(z)$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\cos \\left(x-y^5\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n 1 & 0 & -1 \\\\\n -\\sin \\left(x-y^5\\right) & 5 y^4 \\sin \\left(x-y^5\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(z)\ng = x-z\nh = cos(x-y**5)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\log \\left(y^3\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**5\ng = log(y**3)\nh = log(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\cos ^{-1}\\left(x^4\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{4 x^3}{\\sqrt{1-x^8}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**4)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-3 \\sqrt{-x}-\\tan (\\tan (2-x))$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{-x}}+\\sec ^2(2-x) \\sec ^2(\\tan (2-x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-3*sqrt(-x)-tan(tan(2-x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\frac{49 x^2}{4}$ on the interval $x = 0$ to $x = 0$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((49*x**2)/4)\na = 0\nb = 0\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{1-9 x} \\sin (x+7)$\n", - "Output Answer": [ - "$e^{1-9 x} (\\cos (x+7)-9 \\sin (x+7))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(1-9*x)*sin(x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}+e^y+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = math.e**y\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh ^{-1}(z-x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{-x+z-1} \\sqrt{-x+z+1}} & 0 & \\frac{1}{\\sqrt{-x+z-1} \\sqrt{-x+z+1}} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acosh(z-x)\ng = y\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\left(\\frac{y}{z}\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & \\frac{3 \\sqrt{\\frac{y}{z}}}{2 z} & -\\frac{3 y \\sqrt{\\frac{y}{z}}}{2 z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = sin(y)\nh = (y/z)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x+y)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\sec ^2(x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y)\ng = (1/(y**(3/2)))\nh = (1/(y**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{1}{24} x^4 \\log (x)-\\frac{1}{2} x^2 \\log (x)+\\log (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, 0, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{-9 x-2} \\sin (3-9 x)$\n", - "Output Answer": [ - "$\\frac{18 (9 x+2) \\cos (3-9 x)-9 \\sin (3-9 x)}{2 \\sqrt{-9 x-2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(-9*x-2)*sin(3-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}}$, $g(x,y,z) = \\cos ^{-1}(x y)$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}}} & 0 \\\\\n -\\frac{y}{\\sqrt{1-x^2 y^2}} & -\\frac{x}{\\sqrt{1-x^2 y^2}} & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y))\ng = acos(x*y)\nh = acos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cosh \\left(y^2\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cosh(y**2)\nh = cosh(y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = \\tan (x)$ and $g(x) = $\\cos (x)$", - "Output Answer": [ - "$\\frac{1}{2} (x+2)^2 \\sin (2)+(x+2) \\cos (2)-\\sin (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tan(x)\ng = cos(x)\nseries = f.subs(x, g).series(x, -2, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(1-8 x)$\n", - "Output Answer": [ - "$\\frac{1-8 x}{((1-4 x) x)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(1-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sin ^{-1}(y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & \\frac{z}{\\sqrt{1-y^2 z^2}} & \\frac{y}{\\sqrt{1-y^2 z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = cos(y)\nh = asin(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (9-6 x)$\n", - "Output Answer": [ - "$36 \\sin (9-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(9-6*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cosh (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sinh (x) & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cosh(x)\ng = tan(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\cos ^{-1}(y)$, and $h(x,y,z) = \\log \\left(z^5\\right)$", - "Output Answer": [ - "$\\cos (x)-\\frac{1}{\\sqrt{1-y^2}}+\\frac{5}{z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = acos(y)\nh = log(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{4-4 x^5}+\\tan (8-3 x)$\n", - "Output Answer": [ - "$80 e^{4-4 x^5} \\left(5 x^5-1\\right) x^3+18 \\tan (8-3 x) \\sec ^2(8-3 x)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(4-4*x**5)+tan(8-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(-5 x^4-4\\right)^2}-\\sin \\left(7-8 x^2\\right)$\n", - "Output Answer": [ - "$8 \\left(x^2 \\left(\\frac{15 \\left(15 x^4-4\\right)}{\\left(5 x^4+4\\right)^4}+32 \\sin \\left(7-8 x^2\\right)\\right)+2 \\cos \\left(7-8 x^2\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-5*x**4-4)**2))-sin(7-8*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = \\cos (x)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left\\{0,e^{x+z},-\\sin (x)\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x+z)\ng = cos(x)\nh = cos(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x+y}$, $g(x,y,z) = (y-z)^3$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x+y}^2} & \\frac{1}{3 \\sqrt[3]{x+y}^2} & 0 \\\\\n 0 & 3 (y-z)^2 & -3 (y-z)^2 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x+y)\ng = (y-z)**3\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^2$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z}}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-\\frac{x}{2 z^2 \\left(\\frac{x}{z}\\right)^{3/2}},0,-2 (x+y)-\\frac{1}{2 z \\left(\\frac{x}{z}\\right)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**2\ng = (1/(sqrt((x/z))))\nh = (1/(sqrt((x/z))))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y+z^3}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\log \\left(z^3\\right)$", - "Output Answer": [ - "$\\left\\{0,3 z^2 e^{y+z^3},-e^{y+z^3}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y+z**3)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 4$ of the composition $f(g(x))$ for $f(x) = \\sin (x)$ and $g(x) = $\\log (x)$", - "Output Answer": [ - "$(x-4)^2 \\left(\\frac{1}{32}-\\frac{\\sin (4)}{2}\\right)+(x-4) \\left(\\cos (4)-\\frac{1}{4}\\right)-2 \\log (2)+\\sin (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x)\ng = log(x)\nseries = f.subs(x, g).series(x, 4, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z},\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((z/y))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan ^{-1}\\left(1-2 x^2\\right)+\\tan ^{-1}(x+3)$\n", - "Output Answer": [ - "$\\frac{8 \\left(2 x^2-1\\right) x^2}{\\left(2 x^4-2 x^2+1\\right)^2}-\\frac{4}{\\left(1-2 x^2\\right)^2+1}-\\frac{2 (x+3)}{\\left((x+3)^2+1\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = atan(1-2*x**2)+atan(x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = math.e**y\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-3 x-4)-\\sin (2-4 x)$\n", - "Output Answer": [ - "$\\frac{\\sqrt{3} (3 x+4)}{\\left(-3 x^2-8 x-5\\right)^{3/2}}+16 \\sin (2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-3*x-4)-sin(2-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$-\\sin (x)+\\sec ^2(y)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = tan(y)\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (y z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(y*z)\ng = y\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{y^2 z}$\n", - "Output Answer": [ - "$\\left\\{0,\\frac{y z}{\\sqrt{y^2 z}},\\frac{y^2}{2 \\sqrt{y^2 z}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**2*z)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & 0 & -\\frac{1}{2 z^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos((x/z))\ng = sqrt(y+z)\nh = (1/(sqrt(z)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{15}{2} x^4 \\sin \\left(\\frac{3 x^5}{2}+4\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{3 x^5}{2}+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(15/2)*x**4*sin(((3*x**5)/2)+4)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$e^x+\\frac{1}{\\sqrt{y^2+1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = asinh(y)\nh = y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan (1-9 x) \\tan (4 x+7)$\n", - "Output Answer": [ - "$32 \\tan (1-9 x) \\tan (4 x+7) \\sec ^2(4 x+7)-18 \\sec ^2(1-9 x) \\left(4 \\sec ^2(4 x+7)-9 \\tan (1-9 x) \\tan (4 x+7)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(1-9*x)*tan(4*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(x^2-z\\right)^2$, $g(x,y,z) = \\sqrt{x^2+y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 x \\left(x^2-z\\right) & 0 & -2 \\left(x^2-z\\right) \\\\\n \\frac{x}{\\sqrt{x^2+y}} & \\frac{1}{2 \\sqrt{x^2+y}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x**2-z)**2\ng = sqrt(x**2+y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\sqrt{x^3}$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\left(\\frac{3}{\\sqrt{2}}-e^2\\right) (x-2)-e^2+2 \\sqrt{2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = sqrt(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{y}{z}}}$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{1-x^2} & 0 & 0 \\\\\n 0 & -\\frac{1}{2 z \\left(\\frac{y}{z}\\right)^{3/2}} & \\frac{y}{2 z^2 \\left(\\frac{y}{z}\\right)^{3/2}} \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atanh(x)\ng = (1/(sqrt((y/z))))\nh = asin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y-z)$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,-\\cos (y-z),1-\\cos (y-z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y-z)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = x^2$ and $g(x) = $x^5$", - "Output Answer": [ - "$-10 (x+1)^3+11 (x+1)^2-7 (x+1)+2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**2\ng = x**5\nseries = f.subs(x, g).series(x, -1, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = x^2 z^2$, and $h(x,y,z) = \\sin (y+z)$", - "Output Answer": [ - "$\\left\\{\\cos (y+z)-2 x^2 z,0,2 x z^2\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = x**2*z**2\nh = x**2*z**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{\\frac{7}{2}-\\frac{x}{2}} \\log (4 x-6)$\n", - "Output Answer": [ - "$\\frac{(3-2 x) \\log (4 x-6)-4 (x-7)}{2 \\sqrt{2} \\sqrt{7-x} (2 x-3)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt((7/2)-(x/2))*log(4*x-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y z^2}}$, and $h(x,y,z) = \\sqrt{x y}$", - "Output Answer": [ - "$-\\sin (x)-\\frac{z^2}{2 \\left(y z^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(sqrt(y*z**2)))\nh = sqrt(x*y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fourth order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $e^x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = math.e**x\nseries = f.subs(x, g).series(x, -3, 4)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z-x$, $g(x,y,z) = y$, and $h(x,y,z) = \\cos (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 0 & 1 \\\\\n 0 & 1 & 0 \\\\\n 0 & -z \\sin (y z) & -y \\sin (y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z-x\ng = y\nh = cos(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x+y}{z^5}\\right)$", - "Output Answer": [ - "$-\\frac{25 (x+y)^2 \\sin \\left(\\frac{x+y}{z^5}\\right)}{z^{12}}-\\frac{2 \\sin \\left(\\frac{x+y}{z^5}\\right)}{z^{10}}+\\frac{30 (x+y) \\cos \\left(\\frac{x+y}{z^5}\\right)}{z^7}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((x+y)/(z**5)))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos \\left(z^4\\right)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^4}}$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-x^2}}-\\frac{2 z^3}{\\left(z^4\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cos(z**4)\nh = (1/(sqrt(z**4)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin (5 x)-\\tan (7 x+4)$\n", - "Output Answer": [ - "$-5 \\cos (5 x)-7 \\sec ^2(7 x+4)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-sin(5*x)-tan(7*x+4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{z}{x}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{x},0,-\\frac{z}{x^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (z/x)\nh = (z/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = y^3$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$3 y^2$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = y**3\nh = math.e**y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 \\sqrt[3]{x}^2} & 0 & 0 \\\\\n 0 & 5 y^4 & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x)\ng = y**5\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\frac{18 x}{5}+\\frac{29}{5}}$\n", - "Output Answer": [ - "$-\\frac{81}{\\sqrt{5} (18 x+29)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(((18*x)/5)+(29/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{\\left(6-7 x^2\\right)^5}+\\log \\left(-4 x-\\frac{13}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{70 x}{\\left(6-7 x^2\\right)^6}+\\frac{8}{8 x+13}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((6-7*x**2)**5))+log(-4*x-(13/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{18 x}{\\left(9-9 x^2\\right)^2+1}-45 x^4 \\cos \\left(7-9 x^5\\right)$\n", - "Output Answer": [ - "$\\sin \\left(7-9 x^5\\right)-\\tan ^{-1}\\left(9 \\left(x^2-1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((18*x)/((9-9*x**2)**2+1))-45*x**4*cos(7-9*x**5)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^3 (x+y)^3$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(x y z)$", - "Output Answer": [ - "$\\frac{x y}{x^2 y^2 z^2+1}+3 z^3 (x+y)^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3*(x+y)**3\ng = y\nh = atan(x*y*z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan (4 x+5)$\n", - "Output Answer": [ - "$-32 \\tan (4 x+5) \\sec ^2(4 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(4*x+5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt[3]{x y-z^3}$", - "Output Answer": [ - "$-\\frac{2 x^2}{9 \\left(x y-z^3\\right) \\sqrt[3]{x y-z^3}^2}-\\frac{2 y^2}{9 \\left(x y-z^3\\right) \\sqrt[3]{x y-z^3}^2}-\\frac{2 z^4}{\\left(x y-z^3\\right) \\sqrt[3]{x y-z^3}^2}-\\frac{2 z}{\\sqrt[3]{x y-z^3}^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x*y-z**3)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x+z)$, $g(x,y,z) = \\cosh (y)$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x+z) & 0 & \\cos (x+z) \\\\\n 0 & \\sinh (y) & 0 \\\\\n 0 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x+z)\ng = cosh(y)\nh = y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\log (x+z)$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}+\\frac{1}{x+z}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = math.e**y\nh = log(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(4-5 x^2\\right)$\n", - "Output Answer": [ - "$-\\frac{10 \\left(5 x^2+4\\right)}{\\left(4-5 x^2\\right)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4-5*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\tan ^{-1}(x-z)$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{(x-z)^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -atan(x-z)\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 \\sqrt{x^4}-\\cos ^{-1}\\left(-8 x^4-5\\right)$\n", - "Output Answer": [ - "$\\frac{4 \\sqrt{x^4}}{x}-\\frac{8 x^3}{\\sqrt{-4 x^8-5 x^4-\\frac{3}{2}}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2*sqrt(x**4)-acos(-8*x**4-5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $e^x$", - "Output Answer": [ - "$(x+3) \\left(\\frac{1}{e^3}+\\sin (3)\\right)+\\frac{1}{e^3}+\\cos (3)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = math.e**x\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\frac{1}{x+y}$, and $h(x,y,z) = \\left(\\frac{x}{y}\\right)^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{3 x \\sqrt{\\frac{x}{y}}}{2 y^2},-\\frac{3 \\sqrt{\\frac{x}{y}}}{2 y},-\\frac{1}{(x+y)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = (1/(x+y))\nh = (1/(x+y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{y}\\right)$, $g(x,y,z) = \\sin (y-z)$, and $h(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\cos (y-z)-\\frac{\\sin \\left(\\frac{y}{x}\\right)}{x},\\frac{1}{y \\sqrt{1-\\frac{z^2}{y^2}}}-\\frac{y \\sin \\left(\\frac{y}{x}\\right)}{x^2},\\frac{z}{y^2 \\sqrt{1-\\frac{z^2}{y^2}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(z/y)\ng = sin(y-z)\nh = sin(y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x-y$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{x z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & -1 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{z}{3 \\sqrt[3]{x z}^2} & 0 & \\frac{x}{3 \\sqrt[3]{x z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x-y\ng = y\nh = cbrt(x*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x y}^2}-\\sin (x-z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = cbrt(x*y)\nh = atan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x+1)+\\log (5 x+3)$\n", - "Output Answer": [ - "$\\frac{5}{5 x+3}+\\frac{4}{4 x+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x+1)+log(5*x+3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos (y)$, $g(x,y,z) = \\cos ^{-1}(x y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\sin (y) & 0 \\\\\n -\\frac{y}{\\sqrt{1-x^2 y^2}} & -\\frac{x}{\\sqrt{1-x^2 y^2}} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(y)\ng = acos(x*y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\{-1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(x)\ng = z\nh = z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^5$, $g(x,y,z) = y$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 5 z^4 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**5\ng = y\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\left(x^2\\right)^{3/2}$, $g(x,y,z) = y$, and $h(x,y,z) = -\\sin ^{-1}\\left(x^2-y\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{\\sqrt{1-\\left(x^2-y\\right)^2}},\\frac{2 x}{\\sqrt{1-\\left(x^2-y\\right)^2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x**2)**(3/2)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\frac{17 x}{2}-\\frac{7}{2}}-\\left(-8 x-\\frac{11}{2}\\right)^2$\n", - "Output Answer": [ - "$\\frac{1156}{(17 x-7)^3}-128$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(((17*x)/2)-(7/2)))-(-8*x-(11/2))**2\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\sin \\left(x^4\\right)$ and $g(x) = $x^3$", - "Output Answer": [ - "$(x+5) (-75-500 \\cos (625))+(x+5)^2 (15-125000 \\sin (625)+150 \\cos (625))+125+\\sin (625)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = sin(x**4)\ng = x**3\nseries = f.subs(x, g).series(x, -5, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{82 x^3}{\\left(x^4-8\\right)^{3/2} \\sqrt{6 x^4-7}}$\n", - "Output Answer": [ - "$\\frac{\\sqrt{6 x^4-7}}{\\sqrt{x^4-8}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((82*x**3)/((x**4-8)**(3/2)*sqrt(6*x**4-7)))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y^5 z^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 5 y^4 z^5 & 5 y^5 z^4 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = cbrt(y)\nh = y**5*z**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$(4 x+3)^3 \\sin \\left(7-8 x^2\\right)$\n", - "Output Answer": [ - "$16 (4 x+3) \\left(-2 \\left(128 x^4+192 x^3+72 x^2-3\\right) \\sin \\left(7-8 x^2\\right)-\\left(\\left(112 x^2+96 x+9\\right) \\cos \\left(7-8 x^2\\right)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (4*x+3)**3*sin(7-8*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\tan \\left(x^4\\right)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x^3}{\\sqrt{x^4}} & 0 & 0 \\\\\n 4 x^3 \\sec ^2\\left(x^4\\right) & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x**4)\ng = tan(x**4)\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\cos (x)+\\cosh (y)+2 z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sinh(y)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-x)$ on the interval $x = 0$ to $x = 4$\n", - "Output Answer": [ - "$\\int_0^4 \\sqrt{\\frac{1}{x^2}+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-x)\na = 0\nb = 4\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-y+z}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y},\\frac{1}{2 \\sqrt{x-y+z}}+\\frac{1}{x},\\frac{1}{2 \\sqrt{x-y+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y+z)\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$1-\\sqrt{2-3 x}$\n", - "Output Answer": [ - "$\\frac{3}{2 \\sqrt{2-3 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(1-sqrt(2-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{(-8 x-8)^2}$\n", - "Output Answer": [ - "$\\frac{3}{32 (x+1)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((-8*x-8)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$2 x+\\cos ^{-1}(-x-5)+8$\n", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(x+5)^2}}+2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(2*x+acos(-x-5)+8, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x+8}-\\frac{1}{(6 x-1)^5}$\n", - "Output Answer": [ - "$-\\frac{1080}{(6 x-1)^7}-\\frac{1}{2 (x+2)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x+8)-(1/((6*x-1)**5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{1}{z}$, and $h(x,y,z) = y-z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (1/z)\nh = y-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(2-9 x^2\\right)^5$\n", - "Output Answer": [ - "$90 \\left(2-9 x^2\\right)^3 \\left(81 x^2-2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (2-9*x**2)**5\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z-x^3$, $g(x,y,z) = x^3-z$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{z}{x^3}\\right)$", - "Output Answer": [ - "$\\frac{1}{x^3 \\sqrt{1-\\frac{z^2}{x^6}}}-3 x^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z-x**3\ng = x**3-z\nh = asin(z/(x**3))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\frac{1}{\\sqrt{y^4}}$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n 0 & -\\frac{2 y^3}{\\left(y^4\\right)^{3/2}} & 0 \\\\\n z & 0 & x \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = (1/(sqrt(y**4)))\nh = x*z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan ^{-1}(5 x)$ on the interval $x = 3$ to $x = 3$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -atan(5*x)\na = 3\nb = 3\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{x/y}$, $g(x,y,z) = y$, and $h(x,y,z) = \\left(\\frac{x}{y}+z\\right)^2$", - "Output Answer": [ - "$\\left\\{-\\frac{2 x \\left(\\frac{x}{y}+z\\right)}{y^2},-\\frac{2 \\left(\\frac{x}{y}+z\\right)}{y},\\frac{x e^{x/y}}{y^2}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(x/y)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(z^5\\right)$", - "Output Answer": [ - "$\\frac{20 z^3}{z^{10}+1}-\\frac{50 z^{13}}{\\left(z^{10}+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan(z**5)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\log \\left(x^5\\right)$", - "Output Answer": [ - "$\\frac{2}{25} (x-5)^2-\\frac{4 (x-5)}{5}-4 \\log (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = log(x**5)\nseries = f.subs(x, g).series(x, 5, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (7-5 x) \\tan (4 x+2)$\n", - "Output Answer": [ - "$4 \\sin (7-5 x) \\sec ^2(4 x+2)-5 \\cos (7-5 x) \\tan (4 x+2)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7-5*x)*tan(4*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 2 z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = y\nh = z**2\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = (y-x)^3$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x} & 0 & 0 \\\\\n -3 (y-x)^2 & 3 (y-x)^2 & 0 \\\\\n 1 & 1 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x)\ng = (y-x)**3\nh = x+y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\frac{1}{x^{3/2}}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{3}{2 x^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = (1/(x**(3/2)))\nh = (1/(x**(3/2)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{\\tan (9-6 x)}-\\tan (2-4 x)$\n", - "Output Answer": [ - "$-\\frac{9 \\sec ^4(9-6 x)}{\\tan ^{\\frac{3}{2}}(9-6 x)}+36 \\sqrt{\\tan (9-6 x)} \\sec ^2(9-6 x)-32 \\tan (2-4 x) \\sec ^2(2-4 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(tan(9-6*x))-tan(2-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (9 x-4)-e^{-4 x-4}$\n", - "Output Answer": [ - "$-16 e^{-4 (x+1)}-\\frac{81}{(4-9 x)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = log(9*x-4)-math.e**(-4*x-4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\cos ^{-1}(y-z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(y-z)^2}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = math.e**y\nh = acos(y-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\frac{\\sin (7-7 x)}{(4-2 x)^4}$\n", - "Output Answer": [ - "$\\frac{\\left(49 x^2-196 x+176\\right) \\sin (7-7 x)-56 (x-2) \\cos (7-7 x)}{16 (x-2)^6}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -((sin(7-7*x))/((4-2*x)**4))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(\\frac{11}{2}-2 x\\right)-\\tan (9-x)$\n", - "Output Answer": [ - "$\\sec ^2(9-x)-2 \\sec ^2\\left(\\frac{11}{2}-2 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan((11/2)-2*x)-tan(9-x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x-z$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x-z\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = x+z$, and $h(x,y,z) = \\tan ^{-1}(y+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 1 & 0 & 1 \\\\\n 0 & \\frac{1}{(y+z)^2+1} & \\frac{1}{(y+z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = x+z\nh = atan(y+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin ^{-1}(y-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\sec ^2(y)+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -asin(y-z)\ng = tan(y)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^5+y}$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{2 \\sqrt{x^5+y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**5+y)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(x^3+z\\right)^2}$, $g(x,y,z) = \\tan (z)$, and $h(x,y,z) = \\tan ^{-1}\\left(x^3-z\\right)$", - "Output Answer": [ - "$\\left\\{-\\sec ^2(z),-\\frac{3 x^2}{\\left(x^3-z\\right)^2+1}-\\frac{2}{\\left(x^3+z\\right)^3},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x**3+z)**2))\ng = tan(z)\nh = tan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{e^{\\frac{9 x}{2}-2}}{\\sqrt{9 x+\\frac{13}{2}}}$\n", - "Output Answer": [ - "$\\frac{9 e^{\\frac{9 x}{2}-2} (18 x+11)}{\\sqrt{2} (18 x+13)^{3/2}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(((math.e**(((9*x)/2)-2))/(sqrt(9*x+(13/2)))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = x^5$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n 0 & \\cos (y) & 0 \\\\\n 5 x^4 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/x)\ng = sin(y)\nh = x**5\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (5-8 x)+\\tan ^{-1}(9 x+2)$\n", - "Output Answer": [ - "$-\\frac{162 (9 x+2)}{\\left((9 x+2)^2+1\\right)^2}-64 \\cos (5-8 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5-8*x)+atan(9*x+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\left(\\frac{5}{2}-3 x\\right)^3+\\cos \\left(\\frac{3 x}{2}+5\\right)$\n", - "Output Answer": [ - "$-\\frac{9}{4} (5-6 x)^2-\\frac{3}{2} \\sin \\left(\\frac{3 x}{2}+5\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((5/2)-3*x)**3+cos(((3*x)/2)+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(y^5\\right)$, $g(x,y,z) = \\log \\left(x+y^5\\right)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\frac{5 y^4}{x+y^5}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y**5)\ng = log(x+y**5)\nh = x+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^3$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$3 (x+y)^2-\\frac{3}{2 y^{5/2}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**3\ng = (1/(y**(3/2)))\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$-\\frac{1}{x^2}+x+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = math.e**y\nh = x*z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y z$, and $h(x,y,z) = \\log \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{y}-y,\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(\\frac{z}{y}\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -\\frac{1}{y} & \\frac{1}{z} \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log((z/y))\ng = y\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (y-z)$, $g(x,y,z) = \\tan ^{-1}(z)$, and $h(x,y,z) = \\cos (x y)$", - "Output Answer": [ - "$\\left\\{-x \\sin (x y)-\\frac{1}{z^2+1},y \\sin (x y)+\\sin (y-z),\\sin (y-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(y-z)\ng = atan(z)\nh = atan(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt[3]{x y}$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{x}{3 \\sqrt[3]{x y}^2}-\\frac{1}{2 x^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = cbrt(x*y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x+y)^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x+z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 \\sqrt{x+z}},-2 (x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x+y)**2\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(y^3\\right)$, $g(x,y,z) = \\sqrt{y^3}$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3}{y} & 0 \\\\\n 0 & \\frac{3 y^2}{2 \\sqrt{y^3}} & 0 \\\\\n 0 & 0 & \\frac{1}{1-z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y**3)\ng = sqrt(y**3)\nh = atanh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x}$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$\\begin{cases}\n \\sqrt[3]{x}-\\sqrt{x} & x>0 \\\\\n -\\sqrt{x}-\\sqrt[3]{-x} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8)-\\sqrt{2 x+1}$\n", - "Output Answer": [ - "$-\\frac{1}{\\sqrt{2 x+1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(8)-sqrt(2*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -2$ of the composition $f(g(x))$ for $f(x) = x^5$ and $g(x) = $\\tan \\left(x^4\\right)$", - "Output Answer": [ - "$16 (x+2) \\left(64+64 \\tan ^2(16)+5 \\tan (16)\\right)-32 \\tan (16)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = x**5\ng = tan(x**4)\nseries = f.subs(x, g).series(x, -2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\left(\\frac{z}{y}\\right)^{3/2}}$, $g(x,y,z) = \\sqrt{x^2}$, and $h(x,y,z) = \\sqrt[3]{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{y}^2},-\\frac{3}{2 y \\left(\\frac{z}{y}\\right)^{5/2}},\\frac{x}{\\sqrt{x^2}}-\\frac{3 z}{2 y^2 \\left(\\frac{z}{y}\\right)^{5/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((z/y)**(3/2)))\ng = sqrt(x**2)\nh = sqrt(x**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{z (x+y)}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = y z$", - "Output Answer": [ - "$\\left\\{z,\\frac{x+y}{2 \\sqrt{z (x+y)}},-\\frac{z}{2 \\sqrt{z (x+y)}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(z*(x+y))\ng = (1/(sqrt(y)))\nh = (1/(sqrt(y)))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin ^{-1}\\left(3-3 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{9 x \\left(9 x^6+9 x^3-16\\right)}{\\left(-9 x^6+18 x^3-8\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -asin(3-3*x**3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x}{y^5}-z\\right)^3$", - "Output Answer": [ - "$\\frac{150 x^2 \\left(\\frac{x}{y^5}-z\\right)}{y^{12}}+\\frac{90 x \\left(\\frac{x}{y^5}-z\\right)^2}{y^7}+\\frac{6 \\left(\\frac{x}{y^5}-z\\right)}{y^{10}}+6 \\left(\\frac{x}{y^5}-z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x/(y**5))-z)**3\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos ^{-1}\\left(7-4 x^5\\right)+\\frac{1}{1-8 x}$\n", - "Output Answer": [ - "$\\frac{20 x^4}{\\sqrt{1-\\left(7-4 x^5\\right)^2}}+\\frac{8}{(1-8 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(acos(7-4*x**5)+(1/(1-8*x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,-\\sin (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = cos(x-y)\nh = cos(x-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{x}{y}+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n \\frac{1}{y} & -\\frac{x}{y^2} & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = z\nh = (x/y)+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{z^2}{x}$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\frac{1}{\\sqrt{\\frac{x}{z^2}}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z^2}{x^2} & 0 & \\frac{2 z}{x} \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n -\\frac{1}{2 z^2 \\left(\\frac{x}{z^2}\\right)^{3/2}} & 0 & \\frac{x}{z^3 \\left(\\frac{x}{z^2}\\right)^{3/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = ((z**2)/x)\ng = cbrt(y)\nh = (1/(sqrt((x/(z**2)))))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (8-5 x) \\cosh (8-3 x)$\n", - "Output Answer": [ - "$-3 \\tan (8-5 x) \\sinh (8-3 x)-5 \\sec ^2(8-5 x) \\cosh (8-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(8-5*x)*cosh(8-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{1}{2} x^2 \\left(15 \\cos \\left(2-\\frac{5 x^3}{2}\\right)+52 x\\right)$\n", - "Output Answer": [ - "$\\sin \\left(2-\\frac{5 x^3}{2}\\right)-\\frac{13 x^4}{2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(1/2)*x**2*(15*cos(2-((5*x**3)/2))+52*x)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & 0 & \\frac{1}{z^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = cos(y)\nh = atan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4 x+7}-e^{5 x+7}$\n", - "Output Answer": [ - "$e^{4 x+7} \\left(4-5 e^x\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4*x+7)-math.e**(5*x+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = e^{x+y}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n e^{x+y} & e^{x+y} & 0 \\\\\n 0 & 0 & \\cosh (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = math.e**(x+y)\nh = sinh(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = \\log \\left(\\frac{x-y}{z}\\right)$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$-\\frac{1}{x-y}-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = log(((x-y)/z))\nh = x-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x}$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{y}{x}\\right)$, and $h(x,y,z) = \\frac{x}{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{z},-\\frac{y}{x^2 \\left(\\frac{y^2}{x^2}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/x)\ng = atan(y/x)\nh = atan(y/x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{1}{\\sqrt{\\frac{z}{y^2}}}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n 0 & \\frac{z}{y^3 \\left(\\frac{z}{y^2}\\right)^{3/2}} & -\\frac{1}{2 y^2 \\left(\\frac{z}{y^2}\\right)^{3/2}} \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = (1/(sqrt((z/(y**2)))))\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = x-y^3-z$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\{1,0,1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = x-y**3-z\nh = x-y**3-z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^z$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = y^4$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & e^z \\\\\n \\frac{1}{z \\left(\\frac{x^2}{z^2}+1\\right)} & 0 & -\\frac{x}{z^2 \\left(\\frac{x^2}{z^2}+1\\right)} \\\\\n 0 & 4 y^3 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**z\ng = atan(x/z)\nh = y**4\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin (x+y)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,\\cos (x+y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sin(x+y)\nh = sin(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{z \\left(x-y^2\\right)}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z \\left(x-y^2\\right)^2},\\frac{2 y}{z \\left(x-y^2\\right)^2},-\\frac{1}{z^2 \\left(x-y^2\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z*(x-y**2)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = z^3 \\left(x^3+y\\right)^3$", - "Output Answer": [ - "$54 x^4 z^3 \\left(x^3+y\\right)+18 x z^3 \\left(x^3+y\\right)^2+6 z^3 \\left(x^3+y\\right)+6 z \\left(x^3+y\\right)^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**3*(x**3+y)**3\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sinh (x+y)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x},\\cosh (x+y)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sinh(x+y)\nh = sinh(x+y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = x^5 z$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$\\frac{5 x^4}{3 \\sqrt[3]{x^5}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5)\ng = x**5*z\nh = atan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{y^2}{x^2}$, and $h(x,y,z) = \\sqrt[3]{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{3 z \\sqrt[3]{\\frac{x}{z}}^2},-\\frac{2 y^2}{x^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = ((y**2)/(x**2))\nh = ((y**2)/(x**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(4 x^4+1\\right)-\\sqrt{5 x-3}$\n", - "Output Answer": [ - "$16 x^3 \\cos \\left(4 x^4+1\\right)-\\frac{5}{2 \\sqrt{5 x-3}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(4*x**4+1)-sqrt(5*x-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{256}$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/256)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x^4+z$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = sqrt(y)\nh = x**4+z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{3 x+7}+\\tan (5 x+7)$\n", - "Output Answer": [ - "$50 \\tan (5 x+7) \\sec ^2(5 x+7)-\\frac{9}{4 (3 x+7)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(3*x+7)+tan(5*x+7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^{3/2}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**(3/2)\ng = log(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x^3 z^3$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-3 x^3 z^2,0,3 x^2 z^3\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x**3*z**3\nh = x**3*z**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\cos ^{-1}\\left(x^2\\right)$ and $g(x) = $\\tan \\left(x^4\\right)$", - "Output Answer": [ - "$-\\frac{\\pi x^4}{6}-\\frac{x^2}{6}-\\frac{1}{x^2}+\\frac{\\pi }{2 x^4}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acos(x**2)\ng = tan(x**4)\nseries = f.subs(x, g).series(x, 0, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8-6 x}-\\tan (5-7 x)$\n", - "Output Answer": [ - "$7 \\sec ^2(5-7 x)-6 e^{8-6 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8-6*x)-tan(5-7*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{7}{5}-\\frac{27 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1458}{25} \\tan \\left(\\frac{1}{5} (7-27 x)\\right) \\sec ^2\\left(\\frac{1}{5} (7-27 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan((7/5)-((27*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = z^{3/2}$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{2 \\sqrt{y+z}},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sqrt(y+z)\nh = sqrt(y+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\cos \\left(x^5 y z\\right)$", - "Output Answer": [ - "$-25 x^8 y^2 z^2 \\cos \\left(x^5 y z\\right)+x^{10} \\left(-y^2\\right) \\cos \\left(x^5 y z\\right)-x^{10} z^2 \\cos \\left(x^5 y z\\right)-20 x^3 y z \\sin \\left(x^5 y z\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5*y*z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y}$, $g(x,y,z) = e^{\\frac{y}{x}}$, and $h(x,y,z) = z^2$", - "Output Answer": [ - "$\\frac{e^{\\frac{y}{x}}}{x}+2 z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y)\ng = math.e**(y/x)\nh = z**2\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3+y$, $g(x,y,z) = y$, and $h(x,y,z) = \\left(z^3\\right)^{3/2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 1 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{9}{2} z^2 \\sqrt{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3+y\ng = y\nh = (z**3)**(3/2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{z^3-y}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = e^{z^3}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & -e^{z^3-y} & 3 z^2 e^{z^3-y} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 3 e^{z^3} z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z**3-y)\ng = sqrt(y)\nh = math.e**(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-18 x \\sin \\left(9 x^2+2\\right)$\n", - "Output Answer": [ - "$\\cos \\left(9 x^2+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -18*x*sin(9*x**2+2)\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = \\cos (x-y)$, and $h(x,y,z) = \\sin ^{-1}\\left(\\frac{x}{y z}\\right)$", - "Output Answer": [ - "$\\sin (x-y)-\\frac{x}{y z^2 \\sqrt{1-\\frac{x^2}{y^2 z^2}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = cos(x-y)\nh = asin(x/(y*z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(8 x^2+7\\right)+\\tan (3 x+3)$\n", - "Output Answer": [ - "$-2 \\left(8 \\sin \\left(8 x^2+7\\right)+128 x^2 \\cos \\left(8 x^2+7\\right)-9 \\tan (3 (x+1)) \\sec ^2(3 (x+1))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(8*x**2+7)+tan(3*x+3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$1-\\sin ^{-1}(4 x+2)$\n", - "Output Answer": [ - "$-\\frac{4}{\\sqrt{1-4 (2 x+1)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(1-asin(4*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = (x+z)^4$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 4 (x+z)^3 & 0 & 4 (x+z)^3 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (x+z)**4\ng = tan(y)\nh = acos(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\frac{2 z}{\\left(1-z^2\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt{x y-z}$", - "Output Answer": [ - "$\\left\\{\\frac{x}{2 \\sqrt{x y-z}},-\\frac{y}{2 \\sqrt{x y-z}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**2))\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(-\\frac{15 x}{2}-1\\right)^4$\n", - "Output Answer": [ - "$\\frac{675}{4} (15 x+2)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (-((15*x)/2)-1)**4\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(y+z^3\\right)$", - "Output Answer": [ - "$-9 z^4 \\sin \\left(y+z^3\\right)-\\sin \\left(y+z^3\\right)+6 z \\cos \\left(y+z^3\\right)$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y+z**3)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z$, $g(x,y,z) = x+y$, and $h(x,y,z) = (x z)^{3/2}$", - "Output Answer": [ - "$\\left\\{0,1-\\frac{3}{2} z \\sqrt{x z},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z\ng = x+y\nh = x+y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$-\\frac{5 x^4}{\\sqrt{1-x^{10}}}-\\sin (y)+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x**5)\ng = cos(y)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (7 x-5)+\\cos ^{-1}(-8 x-1)$\n", - "Output Answer": [ - "$\\frac{8 x+1}{(-x (4 x+1))^{3/2}}-\\frac{49}{(5-7 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(7*x-5)+acos(-8*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x+z^5\\right)$, $g(x,y,z) = y$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,5 z^4 \\cos \\left(x+z^5\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x+z**5)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\log (1-x)}{\\log (8 x-6)}$\n", - "Output Answer": [ - "$\\frac{\\frac{4 \\log (1-x)}{3-4 x}+\\frac{\\log (8 x-6)}{x-1}}{\\log ^2(8 x-6)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((log(1-x))/(log(8*x-6))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x+y^5+z$", - "Output Answer": [ - "$20 y^3$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x+y**5+z\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cos ^{-1}(y)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{\\sqrt{1-y^2}},-\\frac{3}{2 z^{5/2}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(z**(3/2)))\ng = y**2\nh = y**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (-7 x-1)+\\sin (2 x+4)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+1)^2}-4 \\sin (2 (x+2))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-7*x-1)+sin(2*x+4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sqrt[3]{x}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^5}}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{3 \\sqrt[3]{x}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = cbrt(x)\nh = cbrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\tan ^{-1}(x z)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{z}{x^2 z^2+1},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**2\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 z \\sqrt[3]{\\frac{y}{z}}^2},\\sec ^2(z),0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan \\left(7 x^5+4\\right)+\\log (5 x)$\n", - "Output Answer": [ - "$35 x^4 \\sec ^2\\left(7 x^5+4\\right)+\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(7*x**5+4)+log(5*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^2\\right)$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\tan (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2}{x} & 0 & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n 0 & z \\sec ^2(y z) & y \\sec ^2(y z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**2)\ng = sin(y)\nh = tan(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-e^{5 x+5} \\sin (6 x+8)$\n", - "Output Answer": [ - "$e^{5 x+5} (11 \\sin (6 x+8)-60 \\cos (6 x+8))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = -math.e**(5*x+5)*sin(6*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the fifth term in the series expansion of the following function around 5:\n\n$\\frac{3 \\sqrt{x}}{\\sqrt{2}}$\n", - "Output Answer": [ - "$-\\frac{7 i}{6912 \\sqrt{6}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(((3*sqrt(x))/(sqrt(2))))\nseries = f.series(x, 5, None)\nfor i, term in enumerate(series):\n if i == 5: print(term)\n elif i > 5: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\tan (x+1)-\\tan (8-9 x)$\n", - "Output Answer": [ - "$9 \\sec ^2(8-9 x)+\\sec ^2(x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(tan(x+1)-tan(8-9*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{\\left(\\frac{15 x}{2}+1\\right)^2}$\n", - "Output Answer": [ - "$\\frac{5400}{(15 x+2)^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/((((15*x)/2)+1)**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\cosh (y)-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = sinh(y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\cosh ^{-1}\\left(\\frac{y}{z}\\right)$", - "Output Answer": [ - "$-\\sin (x-z)-\\frac{y}{z^2 \\sqrt{\\frac{y}{z}-1} \\sqrt{\\frac{y}{z}+1}}+\\sec ^2(y)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = tan(y)\nh = acosh(y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(y^4 z\\right)$, $g(x,y,z) = \\left(x y^4-z\\right)^5$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$20 x y^3 \\left(x y^4-z\\right)^4+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(y**4*z)\ng = (x*y**4-z)**5\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 1 & -1 & 0 \\\\\n 0 & 0 & -\\frac{2}{z^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = x-y\nh = (1/(z**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\cosh ^{-1}\\left(x^4\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$(x+5) \\left(-1-\\frac{125}{\\sqrt{24414}}-\\tan ^2(5)\\right)+\\tan (5)+\\cosh ^{-1}(625)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = acosh(x**4)\ng = tan(x)\nseries = f.subs(x, g).series(x, -5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sqrt{2-7 x}-\\sin \\left(\\frac{7}{2}-8 x\\right)$\n", - "Output Answer": [ - "$\\frac{49}{4 (2-7 x)^{3/2}}+64 \\sin \\left(\\frac{7}{2}-8 x\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sqrt(2-7*x)-sin((7/2)-8*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = z^2-x$, $g(x,y,z) = y-z^2$, and $h(x,y,z) = \\sqrt[3]{y+z^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -1 & 0 & 2 z \\\\\n 0 & 1 & -2 z \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y+z^2}^2} & \\frac{2 z}{3 \\sqrt[3]{y+z^2}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = z**2-x\ng = y-z**2\nh = cbrt(y+z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (z)$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$-\\frac{3}{2 y^{5/2}}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(z)\ng = (1/(y**(3/2)))\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = -\\sin (x-z)$", - "Output Answer": [ - "$\\cos (x-z)+\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{1}{2 y^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(sqrt(y)))\nh = -sin(x-z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(y)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{\\sqrt{1-y^2}} & 0 \\\\\n 0 & \\frac{1}{3 \\sqrt[3]{y}^2} & 0 \\\\\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(y)\ng = cbrt(y)\nh = sqrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(z^4\\right)^{3/2}$, $g(x,y,z) = (x y)^{3/2}$, and $h(x,y,z) = \\frac{y}{z^4}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & 6 z^3 \\sqrt{z^4} \\\\\n \\frac{3}{2} y \\sqrt{x y} & \\frac{3}{2} x \\sqrt{x y} & 0 \\\\\n 0 & \\frac{1}{z^4} & -\\frac{4 y}{z^5} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (z**4)**(3/2)\ng = (x*y)**(3/2)\nh = (y/(z**4))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{-7 x-8} \\cos (4 x)$\n", - "Output Answer": [ - "$-e^{-7 x-8} (4 \\sin (4 x)+7 \\cos (4 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(-7*x-8)*cos(4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(x^5-y\\right)$, and $h(x,y,z) = \\sinh \\left(x^5\\right)$", - "Output Answer": [ - "$\\left\\{0,-5 x^4 \\cosh \\left(x^5\\right),\\frac{5 x^4}{\\sqrt{1-\\left(x^5-y\\right)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5)\ng = asin(x**5-y)\nh = asin(x**5-y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^{3/2}$, $g(x,y,z) = e^{\\frac{x}{y z}}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$-\\frac{x e^{\\frac{x}{y z}}}{y^2 z}+\\frac{3 \\sqrt{x-y}}{2}+\\cos (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**(3/2)\ng = math.e**(x/(y*z))\nh = sin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$-\\frac{68}{5} x \\sin \\left(\\frac{1}{5} \\left(34 x^2+41\\right)\\right)$\n", - "Output Answer": [ - "$\\cos \\left(\\frac{1}{5} \\left(34 x^2+41\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -(68/5)*x*sin((1/5)*(34*x**2+41))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -\\tan (x)$ on the interval $x = 0$ to $x = 8$\n", - "Output Answer": [ - "$\\int_0^8 \\sqrt{\\sec ^4(x)+1} \\, dx$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(x)\na = 0\nb = 8\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x^5-y+z^2}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\frac{1}{\\sqrt{z^2}}$", - "Output Answer": [ - "$\\frac{5 x^4}{3 \\sqrt[3]{x^5-y+z^2}^2}+\\frac{3 \\sqrt{y}}{2}-\\frac{z}{\\left(z^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x**5-y+z**2)\ng = y**(3/2)\nh = (1/(sqrt(z**2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^4+z}$, $g(x,y,z) = \\sqrt{y^4}$, and $h(x,y,z) = z^5$", - "Output Answer": [ - "$\\left\\{0,e^{y^4+z},-4 y^3 e^{y^4+z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**4+z)\ng = sqrt(y**4)\nh = sqrt(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{y^{3/2}}$, and $h(x,y,z) = \\tan \\left(\\frac{z^5}{y}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{3}{2 y^{5/2}} & 0 \\\\\n 0 & -\\frac{z^5 \\sec ^2\\left(\\frac{z^5}{y}\\right)}{y^2} & \\frac{5 z^4 \\sec ^2\\left(\\frac{z^5}{y}\\right)}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(y**(3/2)))\nh = tan(((z**5)/y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(4-9 x^4\\right)$\n", - "Output Answer": [ - "$\\frac{36 \\sqrt{3} x^2 \\left(9 x^8+8 x^4-5\\right)}{\\left(-27 x^8+24 x^4-5\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(4-9*x**4)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos \\left(x^5\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\cosh ^{-1}(z)$", - "Output Answer": [ - "$-5 x^4 \\sin \\left(x^5\\right)+2 y+\\frac{1}{\\sqrt{z-1} \\sqrt{z+1}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x**5)\ng = y**2\nh = acosh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(1-5 x^2\\right)+\\cos (x)$\n", - "Output Answer": [ - "$10 x \\sin \\left(1-5 x^2\\right)-\\sin (x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(1-5*x**2)+cos(x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sin ^{-1}(x)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = asin(x)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{4}{5}-\\frac{21 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{882}{25} \\tan \\left(\\frac{1}{5} (4-21 x)\\right) \\sec ^2\\left(\\frac{1}{5} (4-21 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan((4/5)-((21*x)/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $\\cos \\left(x^2\\right)$", - "Output Answer": [ - "$(x-2) (\\sin (2) (-\\cos (4))-4 \\sin (4) \\cos (2))+\\cos (2) \\cos (4)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = cos(x**2)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y$, and $h(x,y,z) = (y-z)^3$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-3 (y-z)^2+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y\nh = (y-z)**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}(-6 x-6)$\n", - "Output Answer": [ - "$\\frac{216 (x+1)}{\\left(-36 x^2-72 x-35\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = acos(-6*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (z-y)^2$, $g(x,y,z) = \\sin (x-z)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z-y)**2\ng = sin(x-z)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh (z)$, $g(x,y,z) = \\cos (x-z)$, and $h(x,y,z) = \\sqrt{\\frac{x}{z}}$", - "Output Answer": [ - "$\\left\\{-\\sin (x-z),\\text{sech}^2(z)-\\frac{1}{2 z \\sqrt{\\frac{x}{z}}},-\\sin (x-z)\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tanh(z)\ng = cos(x-z)\nh = cos(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^5$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{(x-z)^2}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 5 x^4 & 0 & 0 \\\\\n 0 & \\frac{1}{y^2+1} & 0 \\\\\n -\\frac{2}{(x-z)^3} & 0 & \\frac{2}{(x-z)^3} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**5\ng = atan(y)\nh = (1/((x-z)**2))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}\\right)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$-\\frac{x}{y^2 \\left(\\frac{x^2}{y^2}+1\\right)}-\\sin (x)-\\sin (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = atan(x/y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$\\tan \\left(x^4\\right)+\\tan (x)$\n", - "Output Answer": [ - "$-255+\\tan ^2(4)-256 \\tan ^2(256)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(tan(x**4)+tan(x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{7-6 x^4}-\\sqrt{-9 x-\\frac{1}{3}}$\n", - "Output Answer": [ - "$\\frac{9}{2 \\sqrt{-9 x-\\frac{1}{3}}}-\\frac{12 x^3}{\\sqrt{7-6 x^4}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(7-6*x**4)-sqrt(-9*x-(1/3)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the fifth order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $e^x$", - "Output Answer": [ - "$1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = math.e**x\nseries = f.subs(x, g).series(x, -5, 5)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-3 x^2-5}$\n", - "Output Answer": [ - "$6 e^{-3 x^2-5} \\left(6 x^2-1\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-3*x**2-5)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = y z$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1-y,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = y*z\nh = y*z\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\cos (x)$ and $g(x) = $x^5$", - "Output Answer": [ - "$(x-5) \\left(-\\frac{\\sin (5)}{3125}-\\frac{\\cos (5)}{3125}\\right)+\\frac{\\cos (5)}{3125}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cos(x)\ng = x**5\nseries = f.subs(x, g).series(x, 5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3 z^3$, $g(x,y,z) = y^3$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 z^3 & 0 & 3 x^3 z^2 \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3*z**3\ng = y**3\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{x+z}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sqrt(x+z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\frac{x y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & 0 & 1 \\\\\n \\frac{y}{z} & \\frac{x}{z} & -\\frac{x y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = z\nh = ((x*y)/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = \\sqrt{z}$, and $h(x,y,z) = \\sqrt{z}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{1}{2 \\sqrt{z}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = sqrt(z)\nh = sqrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{x^5+7} \\sin (5-4 x)$\n", - "Output Answer": [ - "$e^{x^5+7} \\left(4 \\cos (5-4 x)-5 x^4 \\sin (5-4 x)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(x**5+7)*sin(5-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y-z}}$, $g(x,y,z) = \\sin ^{-1}(y+z)$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{1-(y+z)^2}}-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y-z)))\ng = asin(y+z)\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (4 x+7)-\\cos ^{-1}(-6 x-6)$\n", - "Output Answer": [ - "$\\frac{4}{4 x+7}-\\frac{6}{\\sqrt{1-36 (x+1)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(4*x+7)-acos(-6*x-6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log (y)$, $g(x,y,z) = \\log (x-y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & \\frac{1}{y} & 0 \\\\\n \\frac{1}{x-y} & -\\frac{1}{x-y} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(y)\ng = log(x-y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n \\frac{1}{x} & 0 & -\\frac{1}{z} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = log((x/z))\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^{15}$", - "Output Answer": [ - "$e^y+y+15 z^{14}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = math.e**y\nh = z**15\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\log (y z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n 0 & \\frac{3 \\sqrt{y}}{2} & 0 \\\\\n 0 & \\frac{1}{y} & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/x)\ng = y**(3/2)\nh = log(y*z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\frac{1}{z^2}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{x}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = (1/(z**2))\nh = (z/x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = z^{15}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the first term in the series expansion of the following function around 1:\n\n$8 x^3 \\cos (2 x)$\n", - "Output Answer": [ - "$8 (12 \\cos (4)-16 \\sin (4))$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(8*x**3*cos(2*x))\nseries = f.series(x, 1, None)\nfor i, term in enumerate(series):\n if i == 1: print(term)\n elif i > 1: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{2} \\pi \\cos (3 x+5)$\n", - "Output Answer": [ - "$-\\frac{3}{2} \\pi \\sin (3 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/2)*pi*cos(3*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x^4}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = x^{12} z^3$", - "Output Answer": [ - "$\\left\\{0,-12 x^{11} z^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x**4)\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\cos (x)+\\sec ^2(z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = z\nh = tan(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\log (z)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{1}{z},0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = log(z)\nh = log(z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\begin{cases}\n 1-\\frac{x^2}{3} & x>0\\lor x<0 \\\\\n \\text{Indeterminate} & \\text{True}\n\\end{cases}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^2}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{x^3} & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n -\\frac{y}{3 x^2 \\sqrt[3]{\\frac{y}{x}}^2} & \\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**2))\ng = y**3\nh = cbrt(y/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = (x-y)^2$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\frac{1}{\\sqrt{x}}$", - "Output Answer": [ - "$2 (x-y)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (x-y)**2\ng = math.e**x\nh = (1/(sqrt(x)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\log \\left(x^5\\right)$ and $g(x) = $\\tan (x)$", - "Output Answer": [ - "$\\frac{\\log \\left(x^5\\right)}{x}-\\frac{1}{3} x \\log \\left(x^5\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x**5)\ng = tan(x)\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\left(x+y^4-z\\right)^2}$, $g(x,y,z) = y^4$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{2}{\\left(x+y^4-z\\right)^3} & -\\frac{8 y^3}{\\left(x+y^4-z\\right)^3} & \\frac{2}{\\left(x+y^4-z\\right)^3} \\\\\n 0 & 4 y^3 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/((x+y**4-z)**2))\ng = y**4\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (y z)$, $g(x,y,z) = \\sqrt[3]{y+z}$, and $h(x,y,z) = \\frac{1}{(x z)^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{y+z}^2}-\\frac{3 x}{2 (x z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(y*z)\ng = cbrt(y+z)\nh = (1/((x*z)**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{1-7 x}-\\log \\left(\\frac{3 x}{2}-\\frac{15}{2}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{5-x}-\\frac{7}{2 \\sqrt{1-7 x}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(1-7*x)-log(((3*x)/2)-(15/2)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^{y^3}$, and $h(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = math.e**(y**3)\nh = math.e**(y**3)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{3 x-7}+\\log (-2 x-4)$\n", - "Output Answer": [ - "$3 e^{3 x-7}+\\frac{1}{x+2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(3*x-7)+log(-2*x-4), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\sqrt{y-z}}$\n", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{2 (y-z)^{3/2}},\\frac{1}{2 (y-z)^{3/2}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y-z)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x)$, $g(x,y,z) = \\sqrt[3]{y}$, and $h(x,y,z) = y$", - "Output Answer": [ - "$\\{1,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x)\ng = cbrt(y)\nh = cbrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x+y}$, $g(x,y,z) = \\tan \\left(z^4\\right)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x+y}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y)\ng = tan(z**4)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = -x^3$ on the interval $x = 3$ to $x = 5$\n", - "Output Answer": [ - "$5 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{4};\\frac{5}{4};-5625\\right)-3 \\, _2F_1\\left(-\\frac{1}{2},\\frac{1}{4};\\frac{5}{4};-729\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -x**3\na = 3\nb = 5\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$e^x+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = y\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\frac{1}{y}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(y)\ng = log(y)\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt[3]{x y^2}$, and $h(x,y,z) = \\sqrt[3]{z^3}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{y^2}{3 \\sqrt[3]{x y^2}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cbrt(x*y**2)\nh = cbrt(x*y**2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{-4 x^3-1}$\n", - "Output Answer": [ - "$\\frac{12 \\left(x^4+x\\right)}{\\left(-4 x^3-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(-4*x**3-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y/z}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{y e^{y/z}}{z^2},-\\frac{e^{y/z}}{z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y/z)\ng = y**3\nh = y**3\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin \\left(x^4+9\\right)+\\tan (3-5 x)$\n", - "Output Answer": [ - "$-16 x^6 \\sin \\left(x^4+9\\right)+12 x^2 \\cos \\left(x^4+9\\right)+50 \\tan (3-5 x) \\sec ^2(3-5 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(x**4+9)+tan(3-5*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x^5}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{5 x^4}{2 \\left(x^5\\right)^{3/2}} & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x**5)))\ng = y\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 0$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^3}$ and $g(x) = $e^x$", - "Output Answer": [ - "$x^2+x$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**3)\ng = math.e**x\nseries = f.subs(x, g).series(x, 0, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^x$, $g(x,y,z) = \\frac{1}{\\sqrt{y^4+z}}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$e^x-\\frac{2 y^3}{\\left(y^4+z\\right)^{3/2}}+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**x\ng = (1/(sqrt(y**4+z)))\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^5}$ and $g(x) = $e^x$", - "Output Answer": [ - "$\\left(\\frac{5}{\\sqrt[3]{3}}-\\frac{1}{e^3}\\right) (x+3)-\\frac{1}{e^3}-3\\ 3^{2/3}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**5)\ng = math.e**x\nseries = f.subs(x, g).series(x, -3, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{x+z}$, $g(x,y,z) = e^x$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^{x+z} & 0 & e^{x+z} \\\\\n e^x & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{3 \\sqrt[3]{z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(x+z)\ng = math.e**x\nh = cbrt(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the arclength of the function $f(x) = \\log (-2 x)$ on the interval $x = 5$ to $x = 12$\n", - "Output Answer": [ - "$-\\sqrt{26}+\\sqrt{145}+\\tanh ^{-1}\\left(\\sqrt{26}\\right)-\\tanh ^{-1}\\left(\\sqrt{145}\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(-2*x)\na = 5\nb = 12\narclength = integrate(sqrt(1 + diff(f, x) ** 2), (x, a, b))\nprint(arclength)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos \\left(6 x^4+1\\right)$\n", - "Output Answer": [ - "$-72 x^2 \\left(\\sin \\left(6 x^4+1\\right)+8 x^4 \\cos \\left(6 x^4+1\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6*x**4+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x)$, $g(x,y,z) = e^{x z}$, and $h(x,y,z) = \\sinh (x+y)$", - "Output Answer": [ - "$\\left\\{\\cosh (x+y)-x e^{x z},-\\cosh (x+y),z e^{x z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x)\ng = math.e**(x*z)\nh = math.e**(x*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\sin (x y-z)$", - "Output Answer": [ - "$\\{x \\cos (x y-z),-y \\cos (x y-z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}\\left(y-x^5\\right)$, $g(x,y,z) = \\left(\\frac{y}{z}\\right)^{3/2}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{\\sqrt{1-\\left(y-x^5\\right)^2}} & -\\frac{1}{\\sqrt{1-\\left(y-x^5\\right)^2}} & 0 \\\\\n 0 & \\frac{3 \\sqrt{\\frac{y}{z}}}{2 z} & -\\frac{3 y \\sqrt{\\frac{y}{z}}}{2 z^2} \\\\\n 0 & 0 & e^z \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(y-x**5)\ng = (y/z)**(3/2)\nh = math.e**z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = -\\sin (x-y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = x z$", - "Output Answer": [ - "$\\{0,-z,-\\cos (x-y)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = -sin(x-y)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{z}{x}$, $g(x,y,z) = \\sqrt{\\frac{y^2}{z}}$, and $h(x,y,z) = \\cos ^{-1}\\left(y^2+z\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{y^2}{2 z^2 \\sqrt{\\frac{y^2}{z}}}-\\frac{2 y}{\\sqrt{1-\\left(y^2+z\\right)^2}},\\frac{1}{x},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z/x)\ng = sqrt(((y**2)/z))\nh = sqrt(((y**2)/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\sin ^{-1}(x+z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n \\frac{1}{\\sqrt{1-(x+z)^2}} & 0 & \\frac{1}{\\sqrt{1-(x+z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = acos(x)\ng = sqrt(y)\nh = asin(x+z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x+y)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{z}{y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{(x+y)^2+1} & \\frac{1}{(x+y)^2+1} & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x+y)\ng = log(y)\nh = (z/y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = z^5$, $g(x,y,z) = y z$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z**5\ng = y*z\nh = x+y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x y)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sqrt[3]{x-z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n y \\sec ^2(x y) & x \\sec ^2(x y) & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{3 \\sqrt[3]{x-z}^2} & 0 & -\\frac{1}{3 \\sqrt[3]{x-z}^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x*y)\ng = y\nh = cbrt(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sin ^{-1}(x-y+z)$", - "Output Answer": [ - "$\\frac{3 (x-y+z)}{\\left(1-(x-y+z)^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x-y+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (3 x+8) \\left(-\\cos ^{-1}(8-x)\\right)$\n", - "Output Answer": [ - "$-\\frac{\\sin (3 x+8)}{\\sqrt{1-(x-8)^2}}-3 \\cos ^{-1}(8-x) \\cos (3 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3*x+8)*(-acos(8-x)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{2 x+4}+\\tan (3-3 x)$\n", - "Output Answer": [ - "$18 \\tan (3-3 x) \\sec ^2(3-3 x)-\\frac{1}{(2 x+4)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(2*x+4)+tan(3-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(\\frac{z^5}{x}\\right)$\n", - "Output Answer": [ - "$\\left\\{-\\frac{z^5 \\sec ^2\\left(\\frac{z^5}{x}\\right)}{x^2},0,\\frac{5 z^4 \\sec ^2\\left(\\frac{z^5}{x}\\right)}{x}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((z**5)/x))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{38}{5}-\\frac{22 x}{5}\\right)^3$\n", - "Output Answer": [ - "$-\\frac{5808}{125} (11 x-19)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((38/5)-((22*x)/5))**3\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = z^{20}$", - "Output Answer": [ - "$\\sec ^2(x)-\\frac{1}{2 y^{3/2}}+20 z^{19}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = (1/(sqrt(y)))\nh = z**20\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = e^{x-z}$, and $h(x,y,z) = \\cos ^{-1}(x)$", - "Output Answer": [ - "$\\left\\{e^{x-z},\\frac{1}{\\sqrt{1-x^2}},e^{x-z}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = math.e**(x-z)\nh = math.e**(x-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = sqrt(y+z)\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\tan \\left(z^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{\\sqrt{1-x^2}} & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n 0 & 0 & 3 z^2 \\sec ^2\\left(z^3\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = asin(x)\ng = sqrt(y)\nh = tan(z**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x-z)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,\\sin (x-z),0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x-z)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (6 x+1)-\\cos ^{-1}(6 x+6)$\n", - "Output Answer": [ - "$\\frac{216 (x+1)}{\\left(1-36 (x+1)^2\\right)^{3/2}}+36 \\sin (6 x+1)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(6*x+1)-acos(6*x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{\\frac{x}{y}}$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{(x-z)^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{3 y \\sqrt[3]{\\frac{x}{y}}^2} & -\\frac{x}{3 y^2 \\sqrt[3]{\\frac{x}{y}}^2} & 0 \\\\\n 1 & 0 & 0 \\\\\n -\\frac{3}{2 (x-z)^{5/2}} & 0 & \\frac{3}{2 (x-z)^{5/2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x/y)\ng = x\nh = (1/((x-z)**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log (\\cosh (7 x+8))$\n", - "Output Answer": [ - "$49 \\text{sech}^2(7 x+8)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(cosh(7*x+8))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}+z\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{\\left(\\frac{x}{y}+z\\right)^2+1},\\frac{x}{y^2 \\left(\\left(\\frac{x}{y}+z\\right)^2+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x/y)+z)\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{-\\frac{23 x}{3}-\\frac{2}{3}}$\n", - "Output Answer": [ - "$\\frac{529}{9} e^{-\\frac{23 x}{3}-\\frac{2}{3}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(-((23*x)/3)-(2/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\left(\\frac{y}{x}\\right)^{3/2}$, $g(x,y,z) = z$, and $h(x,y,z) = \\tanh ^{-1}(x+y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3 y \\sqrt{\\frac{y}{x}}}{2 x^2} & \\frac{3 \\sqrt{\\frac{y}{x}}}{2 x} & 0 \\\\\n 0 & 0 & 1 \\\\\n \\frac{1}{1-(x+y)^2} & \\frac{1}{1-(x+y)^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (y/x)**(3/2)\ng = z\nh = atanh(x+y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan ^{-1}(x)$, $g(x,y,z) = \\frac{x}{y z}$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{x^2+1} & 0 & 0 \\\\\n \\frac{1}{y z} & -\\frac{x}{y^2 z} & -\\frac{x}{y z^2} \\\\\n 0 & \\frac{1}{z} & -\\frac{y}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = atan(x)\ng = (x/(y*z))\nh = (y/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{1}{\\frac{x^2}{y}-z^2}$", - "Output Answer": [ - "$\\frac{2 x^4}{y^4 \\left(\\frac{x^2}{y}-z^2\\right)^3}-\\frac{2 x^2}{y^3 \\left(\\frac{x^2}{y}-z^2\\right)^2}+\\frac{8 x^2}{y^2 \\left(\\frac{x^2}{y}-z^2\\right)^3}-\\frac{2}{y \\left(\\frac{x^2}{y}-z^2\\right)^2}+\\frac{2}{\\left(\\frac{x^2}{y}-z^2\\right)^2}+\\frac{8 z^2}{\\left(\\frac{x^2}{y}-z^2\\right)^3}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(((x**2)/y)-z**2))\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{8 x^2-8}-\\log (7 x-7)$\n", - "Output Answer": [ - "$16 e^{8 x^2-8} x+\\frac{1}{1-x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(8*x**2-8)-log(7*x-7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(6-4 x^5\\right)+\\sin (4 x+8)$\n", - "Output Answer": [ - "$16 \\left(\\left(50 x^8 \\tan \\left(6-4 x^5\\right)-5 x^3\\right) \\sec ^2\\left(6-4 x^5\\right)-\\sin (4 (x+2))\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(6-4*x**5)+sin(4*x+8)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^{25}$, $g(x,y,z) = z-x^5$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$25 x^{24}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**25\ng = z-x**5\nh = sin(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{3 x-8}}{\\log (4 x-7)}$\n", - "Output Answer": [ - "$\\frac{-24 x+3 (4 x-7) \\log (4 x-7)+64}{2 \\sqrt{3 x-8} (4 x-7) \\log ^2(4 x-7)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(3*x-8))/(log(4*x-7))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sin \\left(\\frac{x y}{z^5}\\right)$\n", - "Output Answer": [ - "$\\left\\{\\frac{y \\cos \\left(\\frac{x y}{z^5}\\right)}{z^5},\\frac{x \\cos \\left(\\frac{x y}{z^5}\\right)}{z^5},-\\frac{5 x y \\cos \\left(\\frac{x y}{z^5}\\right)}{z^6}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((x*y)/(z**5)))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$(9-8 x) \\cos (8-6 x)$\n", - "Output Answer": [ - "$6 (9-8 x) \\sin (8-6 x)-8 \\cos (8-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((9-8*x)*cos(8-6*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = e^{\\frac{x^4+y}{z^2}}$\n", - "Output Answer": [ - "$\\left\\{\\frac{4 x^3 e^{\\frac{x^4+y}{z^2}}}{z^2},\\frac{e^{\\frac{x^4+y}{z^2}}}{z^2},-\\frac{2 \\left(x^4+y\\right) e^{\\frac{x^4+y}{z^2}}}{z^3}\\right\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**((x**4+y)/(z**2))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(x-y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{\\sqrt{1-(x-y)^2}} & -\\frac{1}{\\sqrt{1-(x-y)^2}} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y\nh = asin(x-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y$, $g(x,y,z) = (y-z)^3$, and $h(x,y,z) = \\sqrt{\\frac{y}{z}}$", - "Output Answer": [ - "$3 (y-z)^2-\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y\ng = (y-z)**3\nh = sqrt((y/z))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x+z^2}$", - "Output Answer": [ - "$-\\frac{z^2}{\\left(x+z^2\\right)^{3/2}}+\\frac{1}{\\sqrt{x+z^2}}-\\frac{1}{4 \\left(x+z^2\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+z**2)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x-y^4}{z}\\right)$", - "Output Answer": [ - "$-\\frac{32 y^6 \\left(x-y^4\\right)}{z^3 \\left(\\frac{\\left(x-y^4\\right)^2}{z^2}+1\\right)^2}-\\frac{12 y^2}{z \\left(\\frac{\\left(x-y^4\\right)^2}{z^2}+1\\right)}+\\frac{2 \\left(x-y^4\\right)}{z^3 \\left(\\frac{\\left(x-y^4\\right)^2}{z^2}+1\\right)}-\\frac{2 \\left(x-y^4\\right)}{z^3 \\left(\\frac{\\left(x-y^4\\right)^2}{z^2}+1\\right)^2}-\\frac{2 \\left(x-y^4\\right)^3}{z^5 \\left(\\frac{\\left(x-y^4\\right)^2}{z^2}+1\\right)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x-y**4)/z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-(6 x+8)^4 \\sin ^{-1}\\left(4-7 x^3\\right)$\n", - "Output Answer": [ - "$\\frac{21 x^2 (6 x+8)^4}{\\sqrt{1-\\left(4-7 x^3\\right)^2}}-24 (6 x+8)^3 \\sin ^{-1}\\left(4-7 x^3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-(6*x+8)**4*asin(4-7*x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = 5$ of the composition $f(g(x))$ for $f(x) = \\log (x)$ and $g(x) = $\\sqrt[3]{x^3}$", - "Output Answer": [ - "$-\\frac{1}{150} (x-5)^3+\\frac{1}{10} (x-5)^2+(x-5) (1+\\log (5))+5 \\log (5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = log(x)\ng = cbrt(x**3)\nseries = f.subs(x, g).series(x, 5, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = \\sinh ^{-1}(y)$, and $h(x,y,z) = \\tan ^{-1}\\left(\\frac{x}{y}-z\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & \\frac{1}{\\sqrt{y^2+1}} & 0 \\\\\n \\frac{1}{y \\left(\\left(\\frac{x}{y}-z\\right)^2+1\\right)} & -\\frac{x}{y^2 \\left(\\left(\\frac{x}{y}-z\\right)^2+1\\right)} & -\\frac{1}{\\left(\\frac{x}{y}-z\\right)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = asinh(y)\nh = atan((x/y)-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^{\\frac{z}{x}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(\\frac{x}{z}\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{z e^{\\frac{z}{x}}}{x^2} & 0 & \\frac{e^{\\frac{z}{x}}}{x} \\\\\n 0 & \\frac{1}{2 \\sqrt{y}} & 0 \\\\\n -\\frac{\\sin \\left(\\frac{x}{z}\\right)}{z} & 0 & \\frac{x \\sin \\left(\\frac{x}{z}\\right)}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**(z/x)\ng = sqrt(y)\nh = cos((x/z))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x-z)$, $g(x,y,z) = \\tan (x y)$, and $h(x,y,z) = \\tan (x)$", - "Output Answer": [ - "$x \\sec ^2(x y)+\\frac{1}{x-z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x-z)\ng = tan(x*y)\nh = tan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\left(\\frac{x}{y}+z\\right)^2$, and $h(x,y,z) = \\tanh ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{-2 \\left(\\frac{x}{y}+z\\right),0,\\frac{2 \\left(\\frac{x}{y}+z\\right)}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = ((x/y)+z)**2\nh = ((x/y)+z)**2\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = x y-z$", - "Output Answer": [ - "$\\left\\{x-\\frac{1}{x+z},-y,\\frac{1}{x+z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = log(x+z)\nh = log(x+z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y+z}$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\frac{1}{y^2+1}-\\sin (z)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y+z)\ng = atan(y)\nh = cos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\sin ^{-1}(5 x+3) \\cos (3 x+9)$\n", - "Output Answer": [ - "$3 \\sin ^{-1}(5 x+3) \\sin (3 (x+3))-\\frac{5 \\cos (3 (x+3))}{\\sqrt{1-(5 x+3)^2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-asin(5*x+3)*cos(3*x+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = x^3 z^{12}$", - "Output Answer": [ - "$132 x^3 z^{10}+6 x z^{12}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3*z**12\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^4$, $g(x,y,z) = \\frac{1}{x^2}$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{2}{x^3}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**4\ng = (1/(x**2))\nh = (1/(x**2))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{34 x}{5}+\\frac{39}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{2312}{25} \\tan \\left(\\frac{1}{5} (34 x+39)\\right) \\sec ^2\\left(\\frac{1}{5} (34 x+39)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan(((34*x)/5)+(39/5))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin (2-6 x)-\\frac{1}{16}$\n", - "Output Answer": [ - "$-36 \\sin (2-6 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sin(2-6*x)-(1/16)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(z-y)$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{0,-\\frac{1}{\\sqrt{1-(z-y)^2}},\\frac{1}{2 \\sqrt{x}}-\\frac{1}{\\sqrt{1-(z-y)^2}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z-y)\ng = sqrt(x)\nh = sqrt(x)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = \\sin ^{-1}(y)$, and $h(x,y,z) = \\log (x)$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}+\\frac{1}{\\sqrt{1-y^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = asin(y)\nh = log(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\cos (y z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\frac{1}{z}-z \\sin (y z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = cos(y*z)\nh = log(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{7 x-5}+\\cos (3 x+5)$\n", - "Output Answer": [ - "$-\\frac{7}{(5-7 x)^2}-3 \\sin (3 x+5)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/(7*x-5))+cos(3*x+5), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\frac{y^4}{x^4}$, and $h(x,y,z) = x^4 y^4$", - "Output Answer": [ - "$\\left\\{4 x^4 y^3,-4 x^3 y^4,-\\frac{4 y^4}{x^5}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(x)))\ng = ((y**4)/(x**4))\nh = ((y**4)/(x**4))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x-y}$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = e^{z^2}$", - "Output Answer": [ - "$\\left\\{0,0,\\frac{1}{2 \\sqrt{x-y}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x-y)\ng = sinh(y)\nh = sinh(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\frac{1}{81 x^2}$\n", - "Output Answer": [ - "$\\frac{2}{27 x^4}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (1/(81*x**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin (3 x+8)+\\tan ^{-1}(8-7 x)$\n", - "Output Answer": [ - "$3 \\cos (3 x+8)-\\frac{7}{(8-7 x)^2+1}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(3*x+8)+atan(8-7*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\left(z^5 (x+y)\\right)^{3/2}$", - "Output Answer": [ - "$\\frac{3 z^{10}}{2 \\sqrt{z^5 (x+y)}}+\\frac{75 z^8 (x+y)^2}{4 \\sqrt{z^5 (x+y)}}+30 z^3 (x+y) \\sqrt{z^5 (x+y)}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (z**5*(x+y))**(3/2)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{z}$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\cosh \\left(y^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & \\frac{1}{2 \\sqrt{z}} \\\\\n 0 & 3 y^2 & 0 \\\\\n 0 & 3 y^2 \\sinh \\left(y^3\\right) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(z)\ng = y**3\nh = cosh(y**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{z^{3/2}}$, $g(x,y,z) = \\cosh ^{-1}(y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 0 & -\\frac{3}{2 z^{5/2}} \\\\\n 0 & \\frac{1}{\\sqrt{y-1} \\sqrt{y+1}} & 0 \\\\\n 0 & 0 & -\\sin (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(z**(3/2)))\ng = acosh(y)\nh = cos(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{e}-\\sqrt{7 x+9}$\n", - "Output Answer": [ - "$-\\frac{7}{2 \\sqrt{7 x+9}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff((1/math.e)-sqrt(7*x+9), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(z)$, $g(x,y,z) = x y$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$x+3 z^2$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(z)\ng = x*y\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x-2}+\\tan (6 x+6)$\n", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x-2}}+6 \\sec ^2(6 (x+1))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x-2)+tan(6*x+6), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (x+y)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = \\frac{1}{z^{3/2}}$", - "Output Answer": [ - "$\\frac{1}{x+y}+\\frac{1}{y^2+1}-\\frac{3}{2 z^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y)\ng = atan(y)\nh = (1/(z**(3/2)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan \\left(\\frac{z^3}{x}\\right)$, $g(x,y,z) = \\sinh (y)$, and $h(x,y,z) = x+y$", - "Output Answer": [ - "$\\cosh (y)-\\frac{z^3 \\sec ^2\\left(\\frac{z^3}{x}\\right)}{x^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(((z**3)/x))\ng = sinh(y)\nh = x+y\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = y^4-x$\n", - "Output Answer": [ - "$\\left\\{-1,4 y^3,0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y**4-x\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = -\\tan (x-y)$, $g(x,y,z) = x y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\sec ^2(x-y) & \\sec ^2(x-y) & 0 \\\\\n y & x & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = -tan(x-y)\ng = x*y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\left(z^5\\right)^{3/2}}$, and $h(x,y,z) = \\tan \\left(z^5\\right)$", - "Output Answer": [ - "$5 z^4 \\sec ^2\\left(z^5\\right)+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/((z**5)**(3/2)))\nh = tan(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind an indefinite integral (which can vary by a constant) of the following function:\n\n$\\frac{36 x^3}{9 x^4+4}$\n", - "Output Answer": [ - "$\\log \\left(9 x^4+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = ((36*x**3)/(9*x**4+4))\nprint(integrate(f, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = sin(y)\nh = sin(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{4 x^4-1}$\n", - "Output Answer": [ - "$\\frac{8 x^2 \\left(4 x^4-3\\right)}{\\left(4 x^4-1\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(4*x**4-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tanh ^{-1}(x)$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atanh(x)\ng = math.e**y\nh = math.e**y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (5-8 x) \\cos (7 x+1)$\n", - "Output Answer": [ - "$\\frac{1}{2} (-225 \\cos (4-15 x)-\\cos (6-x))$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(5-8*x)*cos(7*x+1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\frac{z^2}{x^2 y^4}$\n", - "Output Answer": [ - "$\\left\\{-\\frac{2 z^2}{x^3 y^4},-\\frac{4 z^2}{x^2 y^5},\\frac{2 z}{x^2 y^4}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((z**2)/(x**2*y**4))\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{\\frac{x}{y}+z}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x+z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 y \\sqrt{\\frac{x}{y}+z}} & -\\frac{x}{2 y^2 \\sqrt{\\frac{x}{y}+z}} & \\frac{1}{2 \\sqrt{\\frac{x}{y}+z}} \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 1 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt((x/y)+z)\ng = log(y)\nh = x+z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos ^{-1}(y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cosh (x) & 0 & 0 \\\\\n 0 & -\\sin (y) & 0 \\\\\n 0 & -\\frac{1}{\\sqrt{1-(y-z)^2}} & \\frac{1}{\\sqrt{1-(y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sinh(x)\ng = cos(y)\nh = acos(y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^5}$, $g(x,y,z) = \\tanh ^{-1}(y)$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{5 x^4}{3 \\sqrt[3]{x^5}^2} & 0 & 0 \\\\\n 0 & \\frac{1}{1-y^2} & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**5)\ng = atanh(y)\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh ^{-1}(x)$, $g(x,y,z) = z (x+y)$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\frac{1}{\\sqrt{x^2+1}}+3 z^2+z$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asinh(x)\ng = z*(x+y)\nh = z**3\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}\\left(x^5\\right)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x**5)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = -\\sin (x-y)$, and $h(x,y,z) = \\sin (x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n -\\cos (x-y) & \\cos (x-y) & 0 \\\\\n \\cos (x-z) & 0 & -\\cos (x-z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = -sin(x-y)\nh = sin(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = -5$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^5}$ and $g(x) = $\\sqrt[3]{x}$", - "Output Answer": [ - "$5 \\sqrt[3]{5}-\\frac{4}{3} \\sqrt[3]{5} (x+5)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**5)\ng = cbrt(x)\nseries = f.subs(x, g).series(x, -5, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\left(\\frac{x^3}{y^3}\\right)^{3/2}$\n", - "Output Answer": [ - "$\\left\\{\\frac{9 x^2 \\sqrt{\\frac{x^3}{y^3}}}{2 y^3},-\\frac{9 x^3 \\sqrt{\\frac{x^3}{y^3}}}{2 y^4},0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = ((x**3)/(y**3))**(3/2)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (3)$\n", - "Output Answer": [ - "$0$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(3)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{x^3}$, $g(x,y,z) = \\left(y^3\\right)^{3/2}$, and $h(x,y,z) = \\cos \\left(x^3\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{3}{x^4} & 0 & 0 \\\\\n 0 & \\frac{9}{2} y^2 \\sqrt{y^3} & 0 \\\\\n -3 x^2 \\sin \\left(x^3\\right) & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(x**3))\ng = (y**3)**(3/2)\nh = cos(x**3)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\sqrt{z^3-y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n 0 & -\\frac{1}{2 \\sqrt{z^3-y}} & \\frac{3 z^2}{2 \\sqrt{z^3-y}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = sqrt(x)\ng = math.e**y\nh = sqrt(z**3-y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\frac{x}{y z}$, and $h(x,y,z) = \\sqrt[3]{x}$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{x}}-\\frac{x}{y^2 z}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = (x/(y*z))\nh = cbrt(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\tan \\left(x^3+2\\right)$\n", - "Output Answer": [ - "$-6 x \\left(3 x^3 \\tan \\left(x^3+2\\right)+1\\right) \\sec ^2\\left(x^3+2\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -tan(x**3+2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sin ^{-1}(9-3 x)+\\tan (5-3 x)$\n", - "Output Answer": [ - "$\\frac{9 (9-3 x)}{\\left(1-9 (x-3)^2\\right)^{3/2}}+18 \\tan (5-3 x) \\sec ^2(5-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = asin(9-3*x)+tan(5-3*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{x}$, $g(x,y,z) = x+y$, and $h(x,y,z) = \\frac{y}{z}$", - "Output Answer": [ - "$\\frac{1}{3 \\sqrt[3]{x}^2}-\\frac{y}{z^2}+1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(x)\ng = x+y\nh = (y/z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\frac{1}{z}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & -\\frac{1}{2 y^{3/2}} & 0 \\\\\n 0 & 0 & -\\frac{1}{z^2} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/(sqrt(y)))\nh = (1/z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos (x y z)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\frac{1}{z^2}$", - "Output Answer": [ - "$\\{0,-x y \\sin (x y z),x z \\sin (x y z)\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cos(x*y*z)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-\\frac{\\tan ^{-1}(8 x+7)}{\\sqrt{2 x-8}}$\n", - "Output Answer": [ - "$\\frac{\\tan ^{-1}(8 x+7)}{(2 x-8)^{3/2}}-\\frac{8}{\\sqrt{2 x-8} \\left((8 x+7)^2+1\\right)}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-((atan(8*x+7))/(sqrt(2*x-8))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{(x+z)^{3/2}}$, $g(x,y,z) = z$, and $h(x,y,z) = \\tan ^{-1}(y)$", - "Output Answer": [ - "$-\\frac{3}{2 (x+z)^{5/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/((x+z)**(3/2)))\ng = z\nh = atan(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\sqrt{2 x+1}\\right)-\\sqrt{3 x-1}$\n", - "Output Answer": [ - "$\\frac{\\cos \\left(\\sqrt{2 x+1}\\right)}{\\sqrt{2 x+1}}-\\frac{3}{2 \\sqrt{3 x-1}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(sqrt(2*x+1))-sqrt(3*x-1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-e^{-9 x-4} \\sin (3-4 x)$\n", - "Output Answer": [ - "$e^{-9 x-4} (9 \\sin (3-4 x)+4 \\cos (3-4 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(-math.e**(-9*x-4)*sin(3-4*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(\\frac{x y}{z}\\right)$, $g(x,y,z) = \\tan \\left(\\frac{x z}{y}\\right)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left\\{-\\frac{x \\sec ^2\\left(\\frac{x z}{y}\\right)}{y},-\\frac{x y \\cos \\left(\\frac{x y}{z}\\right)}{z^2},\\frac{z \\sec ^2\\left(\\frac{x z}{y}\\right)}{y}-\\frac{x \\cos \\left(\\frac{x y}{z}\\right)}{z}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(((x*y)/z))\ng = tan(((x*z)/y))\nh = tan(((x*z)/y))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\sqrt{x+y^5+z^5}$\n", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{x+y^5+z^5}},\\frac{5 y^4}{2 \\sqrt{x+y^5+z^5}},\\frac{5 z^4}{2 \\sqrt{x+y^5+z^5}}\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x+y**5+z**5)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\tan (y z)$, and $h(x,y,z) = \\cosh (y-z)$", - "Output Answer": [ - "$\\left\\{\\sinh (y-z)-y \\sec ^2(y z),0,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = tan(y*z)\nh = tan(y*z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sinh (x)$, $g(x,y,z) = x-y$, and $h(x,y,z) = \\tanh ^{-1}(y)$", - "Output Answer": [ - "$\\cosh (x)-1$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sinh(x)\ng = x-y\nh = atanh(y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(\\frac{14 x}{3}-7\\right)$\n", - "Output Answer": [ - "$-\\frac{4}{(3-2 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(((14*x)/3)-7)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the third order expansion about $x = -1$ of the composition $f(g(x))$ for $f(x) = e^x$ and $g(x) = $x^{16}$", - "Output Answer": [ - "$\\frac{5761 (x+1)^3}{6 e}+\\frac{305 (x+1)^2}{2 e}+\\frac{17 (x+1)}{e}+\\frac{1}{e}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x\n\nf = math.e**x\ng = x**16\nseries = f.subs(x, g).series(x, -1, 3)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x y)$, $g(x,y,z) = y^5$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$y \\cos (x y)+5 y^4+e^z$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x*y)\ng = y**5\nh = math.e**z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the coefficient of the second term in the series expansion of the following function around 2:\n\n$\\sqrt{2} \\sqrt{-x}-\\sqrt{-x^4}$\n", - "Output Answer": [ - "$-i-\\frac{i}{32 \\sqrt{2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = S(sqrt(2)*sqrt(-x)-sqrt(-x**4))\nseries = f.series(x, 2, None)\nfor i, term in enumerate(series):\n if i == 2: print(term)\n elif i > 2: break\nprint(0)\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = z-x$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{-1,0,-1\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = z-x\nh = z-x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(z^5\\right)$, $g(x,y,z) = \\tan ^{-1}(y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5 z^4}{\\sqrt{1-z^{10}}}-1,0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(z**5)\ng = atan(y)\nh = atan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y+z$, $g(x,y,z) = \\sin (y)$, and $h(x,y,z) = \\frac{1}{\\sqrt{z}}$", - "Output Answer": [ - "$\\cos (y)-\\frac{1}{2 z^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y+z\ng = sin(y)\nh = (1/(sqrt(z)))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = y^5$, $g(x,y,z) = y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & 5 y^4 & 0 \\\\\n 0 & 1 & 0 \\\\\n 0 & 0 & 1 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = y**5\ng = y\nh = z\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{\\frac{z}{y}}$, $g(x,y,z) = \\sqrt[3]{x-y-z}$, and $h(x,y,z) = e^z$", - "Output Answer": [ - "$\\left\\{\\frac{1}{3 \\sqrt[3]{x-y-z}^2},\\frac{1}{2 y \\sqrt{\\frac{z}{y}}},\\frac{1}{3 \\sqrt[3]{x-y-z}^2}+\\frac{z}{2 y^2 \\sqrt{\\frac{z}{y}}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt((z/y))\ng = cbrt(x-y-z)\nh = cbrt(x-y-z)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = y$, and $h(x,y,z) = \\sin ^{-1}(x+y-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\cos (x) & 0 & 0 \\\\\n 0 & 1 & 0 \\\\\n \\frac{1}{\\sqrt{1-(x+y-z)^2}} & \\frac{1}{\\sqrt{1-(x+y-z)^2}} & -\\frac{1}{\\sqrt{1-(x+y-z)^2}} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(x)\ng = y\nh = asin(x+y-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x+5} \\cos \\left(4-7 x^2\\right)$\n", - "Output Answer": [ - "$-7 e^{7 x+5} \\left(7 \\left(4 x^2-1\\right) \\cos \\left(4-7 x^2\\right)-2 (14 x+1) \\sin \\left(4-7 x^2\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x+5)*cos(4-7*x**2)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{5 x+8}+\\log (-3 x-8)$\n", - "Output Answer": [ - "$\\frac{3}{3 x+8}+\\frac{5}{2 \\sqrt{5 x+8}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(5*x+8)+log(-3*x-8), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}(x)$, $g(x,y,z) = \\cosh ^{-1}(y z)$, and $h(x,y,z) = \\tan ^{-1}(x)$", - "Output Answer": [ - "$\\frac{z}{\\sqrt{y z-1} \\sqrt{y z+1}}-\\frac{1}{\\sqrt{1-x^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x)\ng = acosh(y*z)\nh = atan(x)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(7-3 x^3\\right)+\\cos \\left(4 x^3+7\\right)$\n", - "Output Answer": [ - "$-3 x^2 \\left(4 \\sin \\left(4 x^3+7\\right)+3 \\cos \\left(7-3 x^3\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin(7-3*x**3)+cos(4*x**3+7), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the first order expansion about $x = 2$ of the composition $f(g(x))$ for $f(x) = \\tanh (x)$ and $g(x) = $\\sqrt{x}$", - "Output Answer": [ - "$(x-2) \\left(1+\\frac{1}{2 \\sqrt{2}}-\\tanh ^2(2)\\right)+\\sqrt{2}+\\tanh (2)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = tanh(x)\ng = sqrt(x)\nseries = f.subs(x, g).series(x, 2, 1)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(\\frac{11 x}{2}-\\frac{11}{2}\\right)^4+1$\n", - "Output Answer": [ - "$\\frac{43923}{4} (x-1)^2$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (((11*x)/2)-(11/2))**4+1\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = e^y$, and $h(x,y,z) = z^5 (x-y)^5$", - "Output Answer": [ - "$5 z^4 (x-y)^5+\\frac{1}{2 \\sqrt{x}}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = math.e**y\nh = z**5*(x-y)**5\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{6 x^3+7}+\\log (7 x+2)$\n", - "Output Answer": [ - "$18 e^{6 x^3+7} x^2+\\frac{7}{7 x+2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(6*x**3+7)+log(7*x+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (6 x+1) \\log (\\cos (1-2 x))$\n", - "Output Answer": [ - "$-4 \\left(6 \\sin (6 x+1) \\tan (1-2 x)+\\cos (6 x+1) \\left(\\sec ^2(1-2 x)+9 \\log (\\cos (1-2 x))\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = cos(6*x+1)*log(cos(1-2*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sin (y z)$, $g(x,y,z) = \\frac{z}{y}$, and $h(x,y,z) = -\\tan ^{-1}(x-z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 0 & z \\cos (y z) & y \\cos (y z) \\\\\n 0 & -\\frac{z}{y^2} & \\frac{1}{y} \\\\\n -\\frac{1}{(x-z)^2+1} & 0 & \\frac{1}{(x-z)^2+1} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = sin(y*z)\ng = (z/y)\nh = -atan(x-z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tanh \\left(x+y^3\\right)$, $g(x,y,z) = \\sin ^{-1}\\left(y^3\\right)$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\text{sech}^2\\left(x+y^3\\right) & 3 y^2 \\text{sech}^2\\left(x+y^3\\right) & 0 \\\\\n 0 & \\frac{3 y^2}{\\sqrt{1-y^6}} & 0 \\\\\n -\\frac{1}{x^2} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tanh(x+y**3)\ng = asin(y**3)\nh = (1/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y^4}$, $g(x,y,z) = \\tan \\left(y^4\\right)$, and $h(x,y,z) = z^4$", - "Output Answer": [ - "$4 y^3 \\sec ^2\\left(y^4\\right)+4 z^3$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y**4)\ng = tan(y**4)\nh = z**4\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{(x y)^{3/2}}$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n -\\frac{3 y}{2 (x y)^{5/2}} & -\\frac{3 x}{2 (x y)^{5/2}} & 0 \\\\\n 1 & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = (1/((x*y)**(3/2)))\nh = x\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\sqrt{\\frac{y}{z}}$, and $h(x,y,z) = \\frac{1}{x}$", - "Output Answer": [ - "$\\left\\{\\frac{y}{2 z^2 \\sqrt{\\frac{y}{z}}},\\frac{1}{x^2},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = sqrt((y/z))\nh = sqrt((y/z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^y$, and $h(x,y,z) = z$", - "Output Answer": [ - "$3 x^2+e^y+1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x**3\ng = math.e**y\nh = z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{4-7 x} \\tan \\left(2 x^2+2\\right)$\n", - "Output Answer": [ - "$e^{4-7 x} \\left(4 x \\sec ^2\\left(2 \\left(x^2+1\\right)\\right)-7 \\tan \\left(2 \\left(x^2+1\\right)\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(4-7*x)*tan(2*x**2+2), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the second order expansion about $x = 3$ of the composition $f(g(x))$ for $f(x) = \\sqrt[3]{x^4}$ and $g(x) = $x^4$", - "Output Answer": [ - "$312 \\sqrt[3]{3} (x-3)^2+432 \\sqrt[3]{3} (x-3)+243 \\sqrt[3]{3}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x\n\nf = cbrt(x**4)\ng = x**4\nseries = f.subs(x, g).series(x, 3, 2)\nprint(series)\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(5 x^4+3\\right)-\\tan (7-3 x)$\n", - "Output Answer": [ - "$3 \\sec ^2(7-3 x)-20 x^3 \\sin \\left(5 x^4+3\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(5*x**4+3)-tan(7-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$-2^{2/3} (-x-3)$\n", - "Output Answer": [ - "$2^{2/3}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(-2**(2/3)*(-x-3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos ^{-1}\\left(e^{6-2 x}\\right)$\n", - "Output Answer": [ - "$-\\frac{4 e^{6 x+6} \\sqrt{1-e^{12-4 x}}}{\\left(e^{12}-e^{4 x}\\right)^2}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = acos(math.e**(6-2*x))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\cos \\left(\\frac{x+y}{z}\\right)$, $g(x,y,z) = y^2$, and $h(x,y,z) = \\sin (y)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{\\sin \\left(\\frac{x+y}{z}\\right)}{z} & -\\frac{\\sin \\left(\\frac{x+y}{z}\\right)}{z} & \\frac{(x+y) \\sin \\left(\\frac{x+y}{z}\\right)}{z^2} \\\\\n 0 & 2 y & 0 \\\\\n 0 & \\cos (y) & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cos(((x+y)/z))\ng = y**2\nh = sin(y)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = e^x$, $g(x,y,z) = y^3 z^3$, and $h(x,y,z) = z^3$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n e^x & 0 & 0 \\\\\n 0 & 3 y^2 z^3 & 3 y^3 z^2 \\\\\n 0 & 0 & 3 z^2 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = math.e**x\ng = y**3*z**3\nh = z**3\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sqrt{x^2-3}+\\cos (8-3 x)$\n", - "Output Answer": [ - "$\\frac{x}{\\sqrt{x^2-3}}+3 \\sin (8-3 x)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sqrt(x**2-3)+cos(8-3*x), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{x+\\frac{3}{2}}+\\frac{1}{\\left(2-\\frac{13 x}{2}\\right)^2}$\n", - "Output Answer": [ - "$\\frac{4056}{(4-13 x)^4}-\\frac{1}{4 \\left(x+\\frac{3}{2}\\right)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(x+(3/2))+(1/((2-((13*x)/2))**2))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = e^{y^3}$, $g(x,y,z) = \\sin \\left(y^3\\right)$, and $h(x,y,z) = \\sinh ^{-1}(z)$", - "Output Answer": [ - "$3 y^2 \\cos \\left(y^3\\right)+\\frac{1}{\\sqrt{z^2+1}}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = math.e**(y**3)\ng = sin(y**3)\nh = asinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{z}}$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos (x+z)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\sin (x+z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y/z)\ng = sqrt(y)\nh = cos(x+z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = x$, and $h(x,y,z) = \\log (z-x)$", - "Output Answer": [ - "$\\left\\{0,\\frac{1}{z-x},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\log \\left(x^3\\right)$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = \\tan (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{3}{x} & 0 & 0 \\\\\n 0 & \\sec ^2(y) & 0 \\\\\n 0 & 0 & \\sec ^2(z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = log(x**3)\ng = tan(y)\nh = tan(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{\\sqrt{-3 x-7}}{\\sqrt{-4 x-3}}$\n", - "Output Answer": [ - "$-\\frac{19}{2 (-4 x-3)^{3/2} \\sqrt{-3 x-7}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(((sqrt(-3*x-7))/(sqrt(-4*x-3))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\frac{1}{y}$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\{0,0,-x\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = (1/y)\nh = (1/y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\frac{1}{(3 x+2) (8 x-3)}$\n", - "Output Answer": [ - "$\\frac{-48 x-7}{(3-8 x)^2 (3 x+2)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff((1/((3*x+2)*(8*x-3))), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{5 x-8} \\sin (4 x+1)$\n", - "Output Answer": [ - "$e^{5 x-8} (5 \\sin (4 x+1)+4 \\cos (4 x+1))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(5*x-8)*sin(4*x+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{\\sqrt{y}}$, $g(x,y,z) = \\log (x+z)$, and $h(x,y,z) = z (x-y)$", - "Output Answer": [ - "$x-y$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(sqrt(y)))\ng = log(x+z)\nh = z*(x-y)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\cos \\left(z^2\\right)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\sec ^2(x) & 0 & 0 \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n 0 & 0 & -2 z \\sin \\left(z^2\\right) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = tan(x)\ng = log(y)\nh = cos(z**2)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\sqrt[3]{x^2}$, $g(x,y,z) = \\sin ^{-1}(z)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n \\frac{2 x}{3 \\sqrt[3]{x^2}^2} & 0 & 0 \\\\\n 0 & 0 & \\frac{1}{\\sqrt{1-z^2}} \\\\\n 0 & 0 & \\frac{1}{z} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = cbrt(x**2)\ng = asin(z)\nh = log(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\sin \\left(y^4\\right)$, and $h(x,y,z) = \\sin ^{-1}\\left(x y^4\\right)$", - "Output Answer": [ - "$\\left\\{\\frac{4 x y^3}{\\sqrt{1-x^2 y^8}},-\\frac{y^4}{\\sqrt{1-x^2 y^8}},0\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = sin(y**4)\nh = sin(y**4)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\cos (\\cos (3-7 x))-e^{-4 x-6}$\n", - "Output Answer": [ - "$-16 e^{-4 x-6}-49 \\sin ^2(3-7 x) \\cos (\\cos (3-7 x))+49 \\cos (3-7 x) \\sin (\\cos (3-7 x))$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = cos(cos(3-7*x))-math.e**(-4*x-6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = y-z$, $g(x,y,z) = y z$, and $h(x,y,z) = \\cos ^{-1}(z)$", - "Output Answer": [ - "$z-\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = y-z\ng = y*z\nh = acos(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = \\tan \\left(x+y^3\\right)$\n", - "Output Answer": [ - "$\\left\\{\\sec ^2\\left(x+y^3\\right),3 y^2 \\sec ^2\\left(x+y^3\\right),0\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x+y**3)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = \\frac{1}{\\sqrt{x}}$, $g(x,y,z) = \\sqrt{x}$, and $h(x,y,z) = e^y$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n -\\frac{1}{2 x^{3/2}} & 0 & 0 \\\\\n \\frac{1}{2 \\sqrt{x}} & 0 & 0 \\\\\n 0 & e^y & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = (1/(sqrt(x)))\ng = sqrt(x)\nh = math.e**y\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^2$, $g(x,y,z) = y^3$, and $h(x,y,z) = \\frac{1}{x y}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 2 x & 0 & 0 \\\\\n 0 & 3 y^2 & 0 \\\\\n -\\frac{1}{x^2 y} & -\\frac{1}{x y^2} & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**2\ng = y**3\nh = (1/(x*y))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{\\frac{y}{x}}$, $g(x,y,z) = y$, and $h(x,y,z) = \\tan ^{-1}(z)$", - "Output Answer": [ - "$\\left\\{0,0,-\\frac{1}{3 x \\sqrt[3]{\\frac{y}{x}}^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(y/x)\ng = y\nh = y\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan ^{-1}\\left(\\frac{x+y}{z^5}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = z^{15}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{5 (x+y)}{z^6 \\left(\\frac{(x+y)^2}{z^{10}}+1\\right)},-\\frac{1}{z^5 \\left(\\frac{(x+y)^2}{z^{10}}+1\\right)}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = atan((x+y)/(z**5))\ng = sqrt(y)\nh = sqrt(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the gradient of the function $f(x,y,z)$ where $f(x,y,z) = z \\left(x^5-y\\right)$\n", - "Output Answer": [ - "$\\left\\{5 x^4 z,-z,x^5-y\\right\\}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = z*(x**5-y)\nprint(gradient(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin (x)$, $g(x,y,z) = \\tan \\left(y^3\\right)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\cos (x)+3 y^2 \\sec ^2\\left(y^3\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x)\ng = tan(y**3)\nh = x\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x^3$, $g(x,y,z) = e^{\\frac{x}{y z}}$, and $h(x,y,z) = \\frac{z}{x}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 3 x^2 & 0 & 0 \\\\\n \\frac{e^{\\frac{x}{y z}}}{y z} & -\\frac{x e^{\\frac{x}{y z}}}{y^2 z} & -\\frac{x e^{\\frac{x}{y z}}}{y z^2} \\\\\n -\\frac{z}{x^2} & 0 & \\frac{1}{x} \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.abc import x, y, z\n\nf = x**3\ng = math.e**(x/(y*z))\nh = (z/x)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x$, $g(x,y,z) = \\frac{1}{x y+z}$, and $h(x,y,z) = \\log (x y)$", - "Output Answer": [ - "$\\left\\{\\frac{1}{(x y+z)^2}+\\frac{1}{y},-\\frac{1}{x},-\\frac{y}{(x y+z)^2}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x\ng = (1/(x*y+z))\nh = (1/(x*y+z))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{y}{z}$, $g(x,y,z) = e^y$, and $h(x,y,z) = \\frac{z^5}{x^5}$", - "Output Answer": [ - "$\\frac{5 z^4}{x^5}+e^y$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (y/z)\ng = math.e**y\nh = ((z**5)/(x**5))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\cos \\left(6 x^2+4\\right)-1$\n", - "Output Answer": [ - "$-12 x \\sin \\left(6 x^2+4\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(cos(6*x**2+4)-1, x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin ^{-1}(x)$, $g(x,y,z) = \\cos (y)$, and $h(x,y,z) = \\cos (z)$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = asin(x)\ng = cos(y)\nh = cos(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = x$, and $h(x,y,z) = \\frac{1}{(z-x)^{3/2}}$", - "Output Answer": [ - "$\\left\\{0,-\\frac{3}{2 (z-x)^{5/2}},1\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = x\nh = x\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sin \\left(x^5\\right)$, $g(x,y,z) = \\cos \\left(y^5\\right)$, and $h(x,y,z) = \\sqrt[3]{z^5}$", - "Output Answer": [ - "$5 x^4 \\cos \\left(x^5\\right)-5 y^4 \\sin \\left(y^5\\right)+\\frac{5 z^4}{3 \\sqrt[3]{z^5}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sin(x**5)\ng = cos(y**5)\nh = cbrt(z**5)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\tan (x)$, $g(x,y,z) = y^5$, and $h(x,y,z) = \\sqrt{z^4}$", - "Output Answer": [ - "$\\{0,0,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = tan(x)\ng = y**5\nh = y**5\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\cos ^{-1}\\left(\\frac{x}{z}\\right)$, $g(x,y,z) = \\sqrt{y}$, and $h(x,y,z) = \\cos \\left(\\frac{y}{x}\\right)$", - "Output Answer": [ - "$\\frac{1}{2 \\sqrt{y}}-\\frac{1}{z \\sqrt{1-\\frac{x^2}{z^2}}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = acos(x/z)\ng = sqrt(y)\nh = cos((y/x))\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log \\left(\\frac{x}{z}\\right)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt[3]{z}$", - "Output Answer": [ - "$\\frac{1}{x}+\\frac{3 \\sqrt{y}}{2}+\\frac{1}{3 \\sqrt[3]{z}^2}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log((x/z))\ng = y**(3/2)\nh = cbrt(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\log (8 x+4) \\cos \\left(7 x^2+1\\right)$\n", - "Output Answer": [ - "$\\frac{2 \\cos \\left(7 x^2+1\\right)}{2 x+1}-14 x \\log (8 x+4) \\sin \\left(7 x^2+1\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(log(8*x+4)*cos(7*x**2+1), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\log \\left(4-\\frac{26 x}{3}\\right)$\n", - "Output Answer": [ - "$-\\frac{169}{(6-13 x)^2}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = log(4-((26*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$\\sin \\left(\\frac{21}{5}-\\frac{39 x}{5}\\right)-\\sin \\left(\\frac{26}{5}-\\frac{8 x}{5}\\right)$\n", - "Output Answer": [ - "$\\frac{1}{5} \\left(8 \\cos \\left(\\frac{26}{5}-\\frac{8 x}{5}\\right)-39 \\cos \\left(\\frac{3}{5} (7-13 x)\\right)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nprint(diff(sin((21/5)-((39*x)/5))-sin((26/5)-((8*x)/5)), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = x y$, $g(x,y,z) = \\tan (y)$, and $h(x,y,z) = e^{z^2}$", - "Output Answer": [ - "$\\{0,0,-x\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = x*y\ng = tan(y)\nh = tan(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x z$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = \\frac{1}{x^{3/2}}$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n z & 0 & x \\\\\n 0 & \\frac{1}{y} & 0 \\\\\n -\\frac{3}{2 x^{5/2}} & 0 & 0 \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x*z\ng = log(y)\nh = (1/(x**(3/2)))\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt[3]{z}$, $g(x,y,z) = \\sinh (x+y)$, and $h(x,y,z) = \\sin ^{-1}(z)$", - "Output Answer": [ - "$\\cosh (x+y)+\\frac{1}{\\sqrt{1-z^2}}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = cbrt(z)\ng = sinh(x+y)\nh = asin(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\tan \\left(\\frac{13}{3}-\\frac{8 x}{3}\\right)$\n", - "Output Answer": [ - "$\\frac{128}{9} \\tan \\left(\\frac{1}{3} (13-8 x)\\right) \\sec ^2\\left(\\frac{1}{3} (13-8 x)\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = tan((13/3)-((8*x)/3))\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nDifferentiate the following function:\n\n$e^{7 x^2-1}+\\tan \\left(1-x^3\\right)$\n", - "Output Answer": [ - "$x \\left(14 e^{7 x^2-1}-3 x \\sec ^2\\left(1-x^3\\right)\\right)$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nprint(diff(math.e**(7*x**2-1)+tan(1-x**3), x))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^8}$, $g(x,y,z) = \\frac{1}{\\sqrt{y}}$, and $h(x,y,z) = \\sinh (z)$", - "Output Answer": [ - "$-\\frac{8}{x^9}-\\frac{1}{2 y^{3/2}}+\\cosh (z)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**8))\ng = (1/(sqrt(y)))\nh = sinh(z)\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\left(7 x^5+5\\right)^3$\n", - "Output Answer": [ - "$210 x^3 \\left(343 x^{10}+315 x^5+50\\right)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = (7*x**5+5)**3\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{y+z}$, $g(x,y,z) = \\cos \\left(\\frac{z}{x}\\right)$, and $h(x,y,z) = \\log (z)$", - "Output Answer": [ - "$\\left\\{\\frac{\\sin \\left(\\frac{z}{x}\\right)}{x},\\frac{1}{2 \\sqrt{y+z}},\\frac{z \\sin \\left(\\frac{z}{x}\\right)}{x^2}-\\frac{1}{2 \\sqrt{y+z}}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(y+z)\ng = cos((z/x))\nh = cos((z/x))\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\sqrt{x}$, $g(x,y,z) = \\log (y)$, and $h(x,y,z) = x$", - "Output Answer": [ - "$\\{0,-1,0\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = sqrt(x)\ng = log(y)\nh = log(y)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the curl of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\log (y z)$, $g(x,y,z) = y^{3/2}$, and $h(x,y,z) = \\sqrt{y}$", - "Output Answer": [ - "$\\left\\{\\frac{1}{2 \\sqrt{y}},\\frac{1}{z},-\\frac{1}{y}\\right\\}$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(y*z)\ng = y**(3/2)\nh = y**(3/2)\nprint(curl(f * C.i + g * C.j + h * C.k))\n\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the divergence of the vector field $f(x,y,z)\\uvec{i} + g(x,y,z)\\uvec{j} + h(x,y,z)\\uvec{k}$ where $f(x,y,z) = \\frac{1}{x^{3/2}}$, $g(x,y,z) = e^{\\frac{z}{y}}$, and $h(x,y,z) = x-z$", - "Output Answer": [ - "$-\\frac{3}{2 x^{5/2}}-\\frac{z e^{\\frac{z}{y}}}{y^2}-1$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\nfrom sympy.vector import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = (1/(x**(3/2)))\ng = math.e**(z/y)\nh = x-z\nfield = f * C.i + g * C.j + h * C.k\nprint(divergence(field))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the jacobian of the vector valued function $\\begin{pmatrix} f(x,y,z)\\\\ g(x,y,z) \\\\ h(x,y,z)\\end{pmatrix}$ where $f(x,y,z) = x$, $g(x,y,z) = \\sqrt{y+z}$, and $h(x,y,z) = \\sin (z)$", - "Output Answer": [ - "$\\left(\n\\begin{array}{ccc}\n 1 & 0 & 0 \\\\\n 0 & \\frac{1}{2 \\sqrt{y+z}} & \\frac{1}{2 \\sqrt{y+z}} \\\\\n 0 & 0 & \\cos (z) \\\\\n\\end{array}\n\\right)$" - ], - "Output Program": [ - "from sympy import *\nfrom sympy.abc import x, y, z\n\nf = x\ng = sqrt(y+z)\nh = sin(z)\nX = Matrix([f, g, h]) \nprint(X.jacobian((x, y, z)))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$e^{7 x-1}-e^{4-4 x}$\n", - "Output Answer": [ - "$49 e^{7 x-1}-16 e^{4-4 x}$" - ], - "Output Program": [ - "import math\n\nfrom sympy import *\n\nx = symbols('x')\nf = math.e**(7*x-1)-math.e**(4-4*x)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$-\\sin (x+6)$\n", - "Output Answer": [ - "$\\sin (x+6)$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = -sin(x+6)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\nFind the laplacian of the function $f(x,y,z)$ where $f(x,y,z) = \\log (x+y+z)$", - "Output Answer": [ - "$-\\frac{3}{(x+y+z)^2}$" - ], - "Output Program": [ - "from sympy.vector import *\nfrom sympy import *\n\nC = CoordSys3D('C')\nx, y, z = C.x, C.y, C.z\nf = log(x+y+z)\nprint(laplacian(f))\n" - ], - "split": "test" - }, - { - "Input": "Problem:\n\nFind the second derivative of the following function:\n\n$\\sqrt{6 x+7}+\\log (-7 x-1)$\n", - "Output Answer": [ - "$-\\frac{49}{(7 x+1)^2}-\\frac{9}{(6 x+7)^{3/2}}$" - ], - "Output Program": [ - "from sympy import *\n\nx = symbols('x')\nf = sqrt(6*x+7)+log(-7*x-1)\nprint(diff(f, x, 2))\n" - ], - "split": "test" - } - ] -} \ No newline at end of file