diff --git "a/all/deepmind_mathematics_calculus.json" "b/all/deepmind_mathematics_calculus.json" deleted file mode 100644--- "a/all/deepmind_mathematics_calculus.json" +++ /dev/null @@ -1,2705 +0,0 @@ -{ - "Source": [ - "mathematics" - ], - "Categories": [ - { - "Math complexity": 4, - "Language complexity": 7, - "Domain knowledge complexity": 3 - } - ], - "Instances": [ - { - "Input": "What is the second derivative of 24864*h**3 + 124041*h wrt h?", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef j(h):\n\treturn 24864*h**3 + 124041*h\nh = symbols(\"h\")\nsolution = diff(24864*h**3 + 124041*h, h, 2)\nprint(solution)" - ], - "Output Answer": [ - "149184*h" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 10*a*m**5 + 18*a - 39447*m**3 + 14305*m**2 wrt m.", - "Output Program": [ - "from sympy import *\nm, a = symbols(\"m a\")\ndef u(m, a):\n\treturn 10*a*m**5 + 18*a - 39447*m**3 + 14305*m**2\nm = symbols(\"m\")\nsolution = diff(10*a*m**5 + 18*a - 39447*m**3 + 14305*m**2, m, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*(100*a*m**2 - 39447)" - ], - "split": "train" - }, - { - "Input": "Suppose -18 = 4*y - 2, 4*y + 22 = 2*b. Let n(q) be the second derivative of 0 - 1/3*q**4 + 7*q + b*q**2 - 5/3*q**3. Let n(w) = 0. Calculate w.", - "Output Program": [ - "from sympy import *\nb, y = symbols(\"b y\")\nb = solve([Eq(-18, 4*y - 2), Eq(4*y + 22, 2*b)])[b]\nq = symbols(\"q\")\ndef i(q):\n\treturn 0 - 1/3*q**4 + 7*q + b*q**2 - 5/3*q**3\ndef n(val):\n\treturn diff(0 - 1/3*q**4 + 7*q + b*q**2 - 5/3*q**3, q, 2).subs(q, val)\nw = symbols(\"w\")\nw = solve(n(w))\nprint(w)" - ], - "Output Answer": [ - "[-3.00000000000000, 0.500000000000000]" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -1698*a**3 - 472*a**2 wrt a.", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef q(a):\n\treturn -1698*a**3 - 472*a**2\na = symbols(\"a\")\nsolution = diff(-1698*a**3 - 472*a**2, a, 3)\nprint(solution)" - ], - "Output Answer": [ - "-10188" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of n**3*u**2 + 1539*n**3*u + 2*n**2*u**2 - 35816*n*u**2 + 13*n wrt u.", - "Output Program": [ - "from sympy import *\nu, n = symbols(\"u n\")\ndef x(u, n):\n\treturn n**3*u**2 + 1539*n**3*u + 2*n**2*u**2 - 35816*n*u**2 + 13*n\nu = symbols(\"u\")\nsolution = diff(n**3*u**2 + 1539*n**3*u + 2*n**2*u**2 - 35816*n*u**2 + 13*n, u, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*n*(n**2 + 2*n - 35816)" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -6*n*q**3*y - 3*n*q*y + 5*q**3*y - q**2*y - 33*q*y wrt q.", - "Output Program": [ - "from sympy import *\nn, y, q = symbols(\"n y q\")\ndef f(n, y, q):\n\treturn -6*n*q**3*y - 3*n*q*y + 5*q**3*y - q**2*y - 33*q*y\nq = symbols(\"q\")\nsolution = diff(-6*n*q**3*y - 3*n*q*y + 5*q**3*y - q**2*y - 33*q*y, q, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*y*(-18*n*q + 15*q - 1)" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of -31330*q**6 + 45798*q**2 wrt q?", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef h(q):\n\treturn -31330*q**6 + 45798*q**2\nq = symbols(\"q\")\nsolution = diff(-31330*q**6 + 45798*q**2, q, 3)\nprint(solution)" - ], - "Output Answer": [ - "-3759600*q**3" - ], - "split": "train" - }, - { - "Input": "Let i(u) be the first derivative of -u**3/3 - 5*u**2/2 + 16*u + 3. Let b be i(-7). Solve -10 = b*z - 0*z for z.", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef o(u):\n\treturn -u**3/3 - 5*u**2/2 + 16*u + 3\ndef i(val):\n\treturn diff(-u**3/3 - 5*u**2/2 + 16*u + 3, u, 1).subs(u, val)\nb = i(-7)\nz = symbols(\"z\")\nz = solve([Eq(-10, b*z - 0*z)])[z]\nprint(z)" - ], - "Output Answer": [ - "-5" - ], - "split": "train" - }, - { - "Input": "Suppose 2*k + 2*k - 4 = -w, 0 = 2*k - 3*w - 16. Let y be (-11)/(-4) - 2/(-8). Find the third derivative of 0 + k*h**6 + 7 - y*h**2 - 7 wrt h.", - "Output Program": [ - "from sympy import *\ny = (-11)/(-4) - 2/(-8)\nk, w = symbols(\"k w\")\nk = solve([Eq(2*k + 2*k - 4, -w), Eq(0, 2*k - 3*w - 16)])[k]\nh = symbols(\"h\")\ndef i(h):\n\treturn 0 + k*h**6 + 7 - y*h**2 - 7\nh = symbols(\"h\")\nsolution = diff(0 + k*h**6 + 7 - y*h**2 - 7, h, 3)\nprint(solution)" - ], - "Output Answer": [ - "240*h**3" - ], - "split": "train" - }, - { - "Input": "What is the derivative of -18464921*y**3 - 5221497?", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef l(y):\n\treturn -18464921*y**3 - 5221497\ny = symbols(\"y\")\nsolution = diff(-18464921*y**3 - 5221497, y, 1)\nprint(solution)" - ], - "Output Answer": [ - "-55394763*y**2" - ], - "split": "train" - }, - { - "Input": "Let c(r) be the third derivative of 1/24*r**4 - 1/60*r**5 + 0 + 0*r**3 + 0*r - 3*r**2 - 1/120*r**6. Let s(o) = o**2 + 6*o + 3. Let i be s(-5). Calculate c(i).", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef l(r):\n\treturn 1/24*r**4 - 1/60*r**5 + 0 + 0*r**3 + 0*r - 3*r**2 - 1/120*r**6\ndef c(val):\n\treturn diff(1/24*r**4 - 1/60*r**5 + 0 + 0*r**3 + 0*r - 3*r**2 - 1/120*r**6, r, 3).subs(r, val)\no = symbols(\"o\")\ndef s(o):\n\treturn o**2 + 6*o + 3\ni = s(-5)\nprint(c(i))" - ], - "Output Answer": [ - "2.00000000000000" - ], - "split": "train" - }, - { - "Input": "Let a(j) be the first derivative of 2/9*j**3 + 185 - 20*j + 1/3*j**2. Factor a(v).", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef u(j):\n\treturn 2/9*j**3 + 185 - 20*j + 1/3*j**2\ndef a(val):\n\treturn diff(2/9*j**3 + 185 - 20*j + 1/3*j**2, j, 1).subs(j, val)\nv = symbols(\"v\")\neq = factor(a(v))\nprint(eq)" - ], - "Output Answer": [ - "20.0*(0.166666666666667*v + 1.0)*(0.2*v - 1.0)" - ], - "split": "train" - }, - { - "Input": "Differentiate 2*f*i**2*p + 164*f*i**2 + 2*f*i - 47*i**2*p wrt p.", - "Output Program": [ - "from sympy import *\np, i, f = symbols(\"p i f\")\ndef b(p, i, f):\n\treturn 2*f*i**2*p + 164*f*i**2 + 2*f*i - 47*i**2*p\np = symbols(\"p\")\nsolution = diff(2*f*i**2*p + 164*f*i**2 + 2*f*i - 47*i**2*p, p, 1)\nprint(solution)" - ], - "Output Answer": [ - "2*f*i**2 - 47*i**2" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of 12729*q**3 - 3*q + 768 wrt q.", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef x(q):\n\treturn 12729*q**3 - 3*q + 768\nq = symbols(\"q\")\nsolution = diff(12729*q**3 - 3*q + 768, q, 2)\nprint(solution)" - ], - "Output Answer": [ - "76374*q" - ], - "split": "train" - }, - { - "Input": "Let l(b) be the second derivative of b**4/12 + 7*b**3/6 + 7*b**2 - 7*b. Let r be l(-5). Solve -y + 6 = -r*g + 8*g, 3*y - 5 = g for y.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef v(b):\n\treturn b**4/12 + 7*b**3/6 + 7*b**2 - 7*b\ndef l(val):\n\treturn diff(b**4/12 + 7*b**3/6 + 7*b**2 - 7*b, b, 2).subs(b, val)\nr = l(-5)\ny, g = symbols(\"y g\")\ny = solve([Eq(-y + 6, -r*g + 8*g), Eq(3*y - 5, g)])[y]\nprint(y)" - ], - "Output Answer": [ - "2" - ], - "split": "train" - }, - { - "Input": "Let m(d) = 2*d - 36. Let s be m(22). Suppose -4*h = 2*z - 58, 0*h = h - 4*z + s. What is the second derivative of 5*w**4 + h*w - 11*w - 3*w**4 wrt w?", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef m(d):\n\treturn 2*d - 36\ns = m(22)\nh, z = symbols(\"h z\")\nh = solve([Eq(-4*h, 2*z - 58), Eq(0*h, h - 4*z + s)])[h]\nw = symbols(\"w\")\ndef c(w):\n\treturn 5*w**4 + h*w - 11*w - 3*w**4\nw = symbols(\"w\")\nsolution = diff(5*w**4 + h*w - 11*w - 3*w**4, w, 2)\nprint(solution)" - ], - "Output Answer": [ - "24*w**2" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of -l**3*m + 39*l**2*m*u + 37308*l**2*u + 2*l*m + 3*m*u - 22127*m + 9*u wrt l?", - "Output Program": [ - "from sympy import *\nu, m, l = symbols(\"u m l\")\ndef s(u, m, l):\n\treturn -l**3*m + 39*l**2*m*u + 37308*l**2*u + 2*l*m + 3*m*u - 22127*m + 9*u\nl = symbols(\"l\")\nsolution = diff(-l**3*m + 39*l**2*m*u + 37308*l**2*u + 2*l*m + 3*m*u - 22127*m + 9*u, l, 2)\nprint(solution)" - ], - "Output Answer": [ - "6*(-l*m + 13*m*u + 12436*u)" - ], - "split": "train" - }, - { - "Input": "Let x(p) be the second derivative of p**6/255 + p**5/34 + p**4/34 - 5*p**3/51 - 4*p**2/17 - 12*p. Determine q, given that x(q) = 0.", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef g(p):\n\treturn p**6/255 + p**5/34 + p**4/34 - 5*p**3/51 - 4*p**2/17 - 12*p\ndef x(val):\n\treturn diff(p**6/255 + p**5/34 + p**4/34 - 5*p**3/51 - 4*p**2/17 - 12*p, p, 2).subs(p, val)\nq = symbols(\"q\")\nq = solve(x(q))\nprint(q)" - ], - "Output Answer": [ - "[-4, -1, 1]" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -60*h**2*m**2 + 83820*h**2*m + 3*h**2 + 248*h*m**2 - 4*h*m + 4*h + 8*m**2 + 5*m + 3 wrt h.", - "Output Program": [ - "from sympy import *\nh, m = symbols(\"h m\")\ndef g(h, m):\n\treturn -60*h**2*m**2 + 83820*h**2*m + 3*h**2 + 248*h*m**2 - 4*h*m + 4*h + 8*m**2 + 5*m + 3\nh = symbols(\"h\")\nsolution = diff(-60*h**2*m**2 + 83820*h**2*m + 3*h**2 + 248*h*m**2 - 4*h*m + 4*h + 8*m**2 + 5*m + 3, h, 2)\nprint(solution)" - ], - "Output Answer": [ - "6*(-20*m**2 + 27940*m + 1)" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -128*s**3*y**3 - s**3 - 12*s**2 + 2*y - 5 wrt y.", - "Output Program": [ - "from sympy import *\ns, y = symbols(\"s y\")\ndef v(s, y):\n\treturn -128*s**3*y**3 - s**3 - 12*s**2 + 2*y - 5\ny = symbols(\"y\")\nsolution = diff(-128*s**3*y**3 - s**3 - 12*s**2 + 2*y - 5, y, 2)\nprint(solution)" - ], - "Output Answer": [ - "-768*s**3*y" - ], - "split": "train" - }, - { - "Input": "Suppose -2*z = -5*t - 28 - 1, 3*t - 4*z + 9 = 0. Let b(f) be the second derivative of -f**4/12 - 7*f**3/6 - 2*f. What is b(t)?", - "Output Program": [ - "from sympy import *\nf = symbols(\"f\")\ndef h(f):\n\treturn -f**4/12 - 7*f**3/6 - 2*f\ndef b(val):\n\treturn diff(-f**4/12 - 7*f**3/6 - 2*f, f, 2).subs(f, val)\nt, z = symbols(\"t z\")\nt = solve([Eq(-2*z, -5*t - 28 - 1), Eq(3*t - 4*z + 9, 0)])[t]\nprint(b(t))" - ], - "Output Answer": [ - "0" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -4*i*l**3 - 45*i*l**2 + i - l**3 wrt l.", - "Output Program": [ - "from sympy import *\nl, i = symbols(\"l i\")\ndef j(l, i):\n\treturn -4*i*l**3 - 45*i*l**2 + i - l**3\nl = symbols(\"l\")\nsolution = diff(-4*i*l**3 - 45*i*l**2 + i - l**3, l, 3)\nprint(solution)" - ], - "Output Answer": [ - "-6*(4*i + 1)" - ], - "split": "train" - }, - { - "Input": "Let i(l) be the first derivative of l**3/3 - 4*l**2 + 10*l - 4. Let r be i(7). Solve r*h - h = 0 for h.", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef v(l):\n\treturn l**3/3 - 4*l**2 + 10*l - 4\ndef i(val):\n\treturn diff(l**3/3 - 4*l**2 + 10*l - 4, l, 1).subs(l, val)\nr = i(7)\nh = symbols(\"h\")\nh = solve([Eq(r*h - h, 0)])[h]\nprint(h)" - ], - "Output Answer": [ - "0" - ], - "split": "train" - }, - { - "Input": "Let v(y) be the first derivative of y**4 + 2*y**3/3 - y**2/2 + 186*y - 322. Find the second derivative of v(n) wrt n.", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef a(y):\n\treturn y**4 + 2*y**3/3 - y**2/2 + 186*y - 322\ndef v(val):\n\treturn diff(y**4 + 2*y**3/3 - y**2/2 + 186*y - 322, y, 1).subs(y, val)\nn = symbols(\"n\")\nsolution = diff(v(n), n, 2)\nprint(solution)" - ], - "Output Answer": [ - "4*(6*n + 1)" - ], - "split": "train" - }, - { - "Input": "Let b(w) = -w**3 + w**2 + w - 1. Let c(s) = 13*s**4 - s**3 - 7*s**2 + s - 1. Let h(g) = b(g) - c(g). What is the third derivative of h(u) wrt u?", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef b(w):\n\treturn -w**3 + w**2 + w - 1\ns = symbols(\"s\")\ndef c(s):\n\treturn 13*s**4 - s**3 - 7*s**2 + s - 1\ndef h(g):\n\treturn b(g) - c(g)\nu = symbols(\"u\")\nsolution = diff(h(u), u, 3)\nprint(solution)" - ], - "Output Answer": [ - "-312*u" - ], - "split": "train" - }, - { - "Input": "Find the first derivative of 8951 - 9826*d wrt d.", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef r(d):\n\treturn 8951 - 9826*d\nd = symbols(\"d\")\nsolution = diff(8951 - 9826*d, d, 1)\nprint(solution)" - ], - "Output Answer": [ - "-9826" - ], - "split": "train" - }, - { - "Input": "Differentiate 24*h**2*k**2 + 54*h**2*k + 2*h**2 + 8584*h + 6*k**2 + 4 wrt k.", - "Output Program": [ - "from sympy import *\nk, h = symbols(\"k h\")\ndef r(k, h):\n\treturn 24*h**2*k**2 + 54*h**2*k + 2*h**2 + 8584*h + 6*k**2 + 4\nk = symbols(\"k\")\nsolution = diff(24*h**2*k**2 + 54*h**2*k + 2*h**2 + 8584*h + 6*k**2 + 4, k, 1)\nprint(solution)" - ], - "Output Answer": [ - "48*h**2*k + 54*h**2 + 12*k" - ], - "split": "train" - }, - { - "Input": "Differentiate 474528 - 64017*x**3 with respect to x.", - "Output Program": [ - "from sympy import *\nx = symbols(\"x\")\ndef y(x):\n\treturn 474528 - 64017*x**3\nx = symbols(\"x\")\nsolution = diff(474528 - 64017*x**3, x, 1)\nprint(solution)" - ], - "Output Answer": [ - "-192051*x**2" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 5*u**2 + 10*u**2 - 6*u**3 - 6*u**2 wrt u.", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef x(u):\n\treturn 5*u**2 + 10*u**2 - 6*u**3 - 6*u**2\nu = symbols(\"u\")\nsolution = diff(5*u**2 + 10*u**2 - 6*u**3 - 6*u**2, u, 3)\nprint(solution)" - ], - "Output Answer": [ - "-36" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -9*c**3 + 7*c**2*m + c*m + 3*c - m wrt c.", - "Output Program": [ - "from sympy import *\nm, c = symbols(\"m c\")\ndef o(m, c):\n\treturn -9*c**3 + 7*c**2*m + c*m + 3*c - m\nc = symbols(\"c\")\nsolution = diff(-9*c**3 + 7*c**2*m + c*m + 3*c - m, c, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(-27*c + 7*m)" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of -6*h**3*o**3 - 483*h**3*o - h**3 + 307*h**2*o**3 - 7*h*o**3 - 40*o**2 + 36*o wrt o?", - "Output Program": [ - "from sympy import *\nh, o = symbols(\"h o\")\ndef x(h, o):\n\treturn -6*h**3*o**3 - 483*h**3*o - h**3 + 307*h**2*o**3 - 7*h*o**3 - 40*o**2 + 36*o\no = symbols(\"o\")\nsolution = diff(-6*h**3*o**3 - 483*h**3*o - h**3 + 307*h**2*o**3 - 7*h*o**3 - 40*o**2 + 36*o, o, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*h*(-6*h**2 + 307*h - 7)" - ], - "split": "train" - }, - { - "Input": "Let l(v) be the second derivative of 7*v**4/18 - 44*v**3/9 + v - 34. Factor l(d).", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef t(v):\n\treturn 7*v**4/18 - 44*v**3/9 + v - 34\ndef l(val):\n\treturn diff(7*v**4/18 - 44*v**3/9 + v - 34, v, 2).subs(v, val)\nd = symbols(\"d\")\neq = factor(l(d))\nprint(eq)" - ], - "Output Answer": [ - "2*d*(7*d - 44)/3" - ], - "split": "train" - }, - { - "Input": "Suppose 0 = -46*b - 80*b + 26*b + 200. Let l(z) be the first derivative of 18*z + 0*z**3 - 13/4*z**4 - 1 + 0*z**b. Differentiate l(a) with respect to a.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\nb = solve([Eq(0, -46*b - 80*b + 26*b + 200)])[b]\nz = symbols(\"z\")\ndef j(z):\n\treturn 18*z + 0*z**3 - 13/4*z**4 - 1 + 0*z**b\ndef l(val):\n\treturn diff(18*z + 0*z**3 - 13/4*z**4 - 1 + 0*z**b, z, 1).subs(z, val)\na = symbols(\"a\")\nsolution = diff(l(a), a, 1)\nprint(solution)" - ], - "Output Answer": [ - "-39.0*a**2" - ], - "split": "train" - }, - { - "Input": "Let h = 16 + 8. Suppose 2*m = 3*x - h, 0*x + 3*m + 15 = x. What is the derivative of x - 3 - d**4 + 0*d**4 + 0*d**4 wrt d?", - "Output Program": [ - "from sympy import *\nh = 16 + 8\nx, m = symbols(\"x m\")\nx = solve([Eq(2*m, 3*x - h), Eq(0*x + 3*m + 15, x)])[x]\nd = symbols(\"d\")\ndef f(d):\n\treturn x - 3 - d**4 + 0*d**4 + 0*d**4\nd = symbols(\"d\")\nsolution = diff(x - 3 - d**4 + 0*d**4 + 0*d**4, d, 1)\nprint(solution)" - ], - "Output Answer": [ - "-4*d**3" - ], - "split": "train" - }, - { - "Input": "Differentiate -4*i*j*v + 38*i*v + 10*i - j*v - 29*j - v - 18 with respect to i.", - "Output Program": [ - "from sympy import *\nv, j, i = symbols(\"v j i\")\ndef a(v, j, i):\n\treturn -4*i*j*v + 38*i*v + 10*i - j*v - 29*j - v - 18\ni = symbols(\"i\")\nsolution = diff(-4*i*j*v + 38*i*v + 10*i - j*v - 29*j - v - 18, i, 1)\nprint(solution)" - ], - "Output Answer": [ - "-4*j*v + 38*v + 10" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of -14*b**5*y**2 + 38*b**2*y**2 + 121*b*y**2 + 5*b wrt b?", - "Output Program": [ - "from sympy import *\nb, y = symbols(\"b y\")\ndef r(b, y):\n\treturn -14*b**5*y**2 + 38*b**2*y**2 + 121*b*y**2 + 5*b\nb = symbols(\"b\")\nsolution = diff(-14*b**5*y**2 + 38*b**2*y**2 + 121*b*y**2 + 5*b, b, 2)\nprint(solution)" - ], - "Output Answer": [ - "4*y**2*(19 - 70*b**3)" - ], - "split": "train" - }, - { - "Input": "Suppose 0 = 4*u - 3 - 9. Let y(a) = a**3 + 6*a**2 + 8*a + 2. Let o be y(-3). What is the third derivative of 2*h**2 + h**5 - u*h**o + 3*h**5 + h**2 wrt h?", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef y(a):\n\treturn a**3 + 6*a**2 + 8*a + 2\no = y(-3)\nu = symbols(\"u\")\nu = solve([Eq(0, 4*u - 3 - 9)])[u]\nh = symbols(\"h\")\ndef q(h):\n\treturn 2*h**2 + h**5 - u*h**o + 3*h**5 + h**2\nh = symbols(\"h\")\nsolution = diff(2*h**2 + h**5 - u*h**o + 3*h**5 + h**2, h, 3)\nprint(solution)" - ], - "Output Answer": [ - "60*h**2" - ], - "split": "train" - }, - { - "Input": "Let z(u) be the first derivative of 5*u**6/6 - 8*u**5 - 465*u**4/4 - 920*u**3/3 + 110*u**2 + 1200*u - 3464. Find o such that z(o) = 0.", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef i(u):\n\treturn 5*u**6/6 - 8*u**5 - 465*u**4/4 - 920*u**3/3 + 110*u**2 + 1200*u - 3464\ndef z(val):\n\treturn diff(5*u**6/6 - 8*u**5 - 465*u**4/4 - 920*u**3/3 + 110*u**2 + 1200*u - 3464, u, 1).subs(u, val)\no = symbols(\"o\")\no = solve(z(o))\nprint(o)" - ], - "Output Answer": [ - "[-4, -2, 1, 15]" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of 2455*w**4 - 3073*w.", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef o(w):\n\treturn 2455*w**4 - 3073*w\nw = symbols(\"w\")\nsolution = diff(2455*w**4 - 3073*w, w, 2)\nprint(solution)" - ], - "Output Answer": [ - "29460*w**2" - ], - "split": "train" - }, - { - "Input": "Differentiate -108*t**3 - 5849926*t**2 - 1531764915.", - "Output Program": [ - "from sympy import *\nt = symbols(\"t\")\ndef r(t):\n\treturn -108*t**3 - 5849926*t**2 - 1531764915\nt = symbols(\"t\")\nsolution = diff(-108*t**3 - 5849926*t**2 - 1531764915, t, 1)\nprint(solution)" - ], - "Output Answer": [ - "-324*t**2 - 11699852*t" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -308*b**3 - b + 82 wrt b.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef r(b):\n\treturn -308*b**3 - b + 82\nb = symbols(\"b\")\nsolution = diff(-308*b**3 - b + 82, b, 2)\nprint(solution)" - ], - "Output Answer": [ - "-1848*b" - ], - "split": "train" - }, - { - "Input": "Let c(y) = -182*y**3 - 8*y + 73. Let b(u) = 121*u**3 + 5*u - 49. Let j(n) = 8*b(n) + 5*c(n). What is the first derivative of j(l) wrt l?", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef b(u):\n\treturn 121*u**3 + 5*u - 49\ny = symbols(\"y\")\ndef c(y):\n\treturn -182*y**3 - 8*y + 73\ndef j(n):\n\treturn 8*b(n) + 5*c(n)\nl = symbols(\"l\")\nsolution = diff(j(l), l, 1)\nprint(solution)" - ], - "Output Answer": [ - "174*l**2" - ], - "split": "train" - }, - { - "Input": "Let u(n) = 5*n**2 + 7*n + 22. Let t(c) be the third derivative of c**5/15 + c**4/3 + 7*c**3/2 + 213*c**2. Let p(b) = 4*t(b) - 3*u(b). What is p(-8)?", - "Output Program": [ - "from sympy import *\nn = symbols(\"n\")\ndef u(n):\n\treturn 5*n**2 + 7*n + 22\nc = symbols(\"c\")\ndef w(c):\n\treturn c**5/15 + c**4/3 + 7*c**3/2 + 213*c**2\ndef t(val):\n\treturn diff(c**5/15 + c**4/3 + 7*c**3/2 + 213*c**2, c, 3).subs(c, val)\ndef p(b):\n\treturn 4*t(b) - 3*u(b)\nprint(p(-8))" - ], - "Output Answer": [ - "-6" - ], - "split": "train" - }, - { - "Input": "What is the first derivative of t**3*x + 995*t**3 - 604*t**2*x + 155*t wrt x?", - "Output Program": [ - "from sympy import *\nx, t = symbols(\"x t\")\ndef h(x, t):\n\treturn t**3*x + 995*t**3 - 604*t**2*x + 155*t\nx = symbols(\"x\")\nsolution = diff(t**3*x + 995*t**3 - 604*t**2*x + 155*t, x, 1)\nprint(solution)" - ], - "Output Answer": [ - "t**3 - 604*t**2" - ], - "split": "train" - }, - { - "Input": "Find the first derivative of -7*b*s**2*u**2 - 2*b*s**2 - 15*b*u**3 + 3*b*u + 9*s*u**3 - 2*u wrt s.", - "Output Program": [ - "from sympy import *\nb, s, u = symbols(\"b s u\")\ndef v(b, s, u):\n\treturn -7*b*s**2*u**2 - 2*b*s**2 - 15*b*u**3 + 3*b*u + 9*s*u**3 - 2*u\ns = symbols(\"s\")\nsolution = diff(-7*b*s**2*u**2 - 2*b*s**2 - 15*b*u**3 + 3*b*u + 9*s*u**3 - 2*u, s, 1)\nprint(solution)" - ], - "Output Answer": [ - "-14*b*s*u**2 - 4*b*s + 9*u**3" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of -6*a**4 - 102*a**3*m**2 - 227*a*m - 8*m**2 wrt a?", - "Output Program": [ - "from sympy import *\nm, a = symbols(\"m a\")\ndef n(m, a):\n\treturn -6*a**4 - 102*a**3*m**2 - 227*a*m - 8*m**2\na = symbols(\"a\")\nsolution = diff(-6*a**4 - 102*a**3*m**2 - 227*a*m - 8*m**2, a, 2)\nprint(solution)" - ], - "Output Answer": [ - "-36*a*(2*a + 17*m**2)" - ], - "split": "train" - }, - { - "Input": "Let m(j) be the third derivative of -j**7/420 + j**6/120 + j**5/30 - j**4/24 - j**3/4 - 5*j**2. Suppose m(v) = 0. What is v?", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef c(j):\n\treturn -j**7/420 + j**6/120 + j**5/30 - j**4/24 - j**3/4 - 5*j**2\ndef m(val):\n\treturn diff(-j**7/420 + j**6/120 + j**5/30 - j**4/24 - j**3/4 - 5*j**2, j, 3).subs(j, val)\nv = symbols(\"v\")\nv = solve(m(v))\nprint(v)" - ], - "Output Answer": [ - "[-1, 1, 3]" - ], - "split": "train" - }, - { - "Input": "Suppose -7*k - 2*o = -4*k - 301, 2*o + 475 = 5*k. What is the second derivative of -42*m - 2*m**4 - 12*m**5 - m**5 + 58*m + k*m wrt m?", - "Output Program": [ - "from sympy import *\nk, o = symbols(\"k o\")\nk = solve([Eq(-7*k - 2*o, -4*k - 301), Eq(2*o + 475, 5*k)])[k]\nm = symbols(\"m\")\ndef u(m):\n\treturn -42*m - 2*m**4 - 12*m**5 - m**5 + 58*m + k*m\nm = symbols(\"m\")\nsolution = diff(-42*m - 2*m**4 - 12*m**5 - m**5 + 58*m + k*m, m, 2)\nprint(solution)" - ], - "Output Answer": [ - "-4*m**2*(65*m + 6)" - ], - "split": "train" - }, - { - "Input": "Suppose -4*r + 4*c - 16 = 0, 2*r + 2*r + 5*c = 20. Let q be -1*(0 + -2) + r. What is the second derivative of 20*j + 0*j**q + 4 + j**2 - 4 wrt j?", - "Output Program": [ - "from sympy import *\nr, c = symbols(\"r c\")\nr = solve([Eq(-4*r + 4*c - 16, 0), Eq(2*r + 2*r + 5*c, 20)])[r]\nq = -1*(0 + -2) + r\nj = symbols(\"j\")\ndef i(j):\n\treturn 20*j + 0*j**q + 4 + j**2 - 4\nj = symbols(\"j\")\nsolution = diff(20*j + 0*j**q + 4 + j**2 - 4, j, 2)\nprint(solution)" - ], - "Output Answer": [ - "2" - ], - "split": "train" - }, - { - "Input": "Suppose -2*g + n - 9 = -2*n, 2*g = 2*n - 10. Let j(o) be the first derivative of o**3/3 + 3*o**2/2 - 5*o + 3. Determine j(g).", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef q(o):\n\treturn o**3/3 + 3*o**2/2 - 5*o + 3\ndef j(val):\n\treturn diff(o**3/3 + 3*o**2/2 - 5*o + 3, o, 1).subs(o, val)\ng, n = symbols(\"g n\")\ng = solve([Eq(-2*g + n - 9, -2*n), Eq(2*g, 2*n - 10)])[g]\nprint(j(g))" - ], - "Output Answer": [ - "13" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 10*d**3*k**2 + 39016*d**3 + 2*d**2*k - 2*d**2 + 10142*d*k**2 - 2*d + 2 wrt d.", - "Output Program": [ - "from sympy import *\nd, k = symbols(\"d k\")\ndef s(d, k):\n\treturn 10*d**3*k**2 + 39016*d**3 + 2*d**2*k - 2*d**2 + 10142*d*k**2 - 2*d + 2\nd = symbols(\"d\")\nsolution = diff(10*d**3*k**2 + 39016*d**3 + 2*d**2*k - 2*d**2 + 10142*d*k**2 - 2*d + 2, d, 3)\nprint(solution)" - ], - "Output Answer": [ - "12*(5*k**2 + 19508)" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -566*l**3 + 158*l**2 wrt l.", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef z(l):\n\treturn -566*l**3 + 158*l**2\nl = symbols(\"l\")\nsolution = diff(-566*l**3 + 158*l**2, l, 3)\nprint(solution)" - ], - "Output Answer": [ - "-3396" - ], - "split": "train" - }, - { - "Input": "Let d(m) be the second derivative of 0*m**2 - 5/48*m**4 + 1/160*m**5 + 25/48*m**3 + 0 + 49*m. Let d(a) = 0. Calculate a.", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\ndef x(m):\n\treturn 0*m**2 - 5/48*m**4 + 1/160*m**5 + 25/48*m**3 + 0 + 49*m\ndef d(val):\n\treturn diff(0*m**2 - 5/48*m**4 + 1/160*m**5 + 25/48*m**3 + 0 + 49*m, m, 2).subs(m, val)\na = symbols(\"a\")\na = solve(d(a))\nprint(a)" - ], - "Output Answer": [ - "[0.0, 5.00000000000000]" - ], - "split": "train" - }, - { - "Input": "Let d = -260 + 262. Let u(s) be the second derivative of 5*s + 0 + 1/3*s**d + 1/15*s**5 + 7/18*s**4 - 11/18*s**3 - 8/45*s**6 + 1/18*s**7. Factor u(m).", - "Output Program": [ - "from sympy import *\nd = -260 + 262\ns = symbols(\"s\")\ndef t(s):\n\treturn 5*s + 0 + 1/3*s**d + 1/15*s**5 + 7/18*s**4 - 11/18*s**3 - 8/45*s**6 + 1/18*s**7\ndef u(val):\n\treturn diff(5*s + 0 + 1/3*s**d + 1/15*s**5 + 7/18*s**4 - 11/18*s**3 - 8/45*s**6 + 1/18*s**7, s, 2).subs(s, val)\nm = symbols(\"m\")\neq = factor(u(m))\nprint(eq)" - ], - "Output Answer": [ - "2.33333333333333*(1.0*m - 1.0)**3*(1.0*m - 0.285714285714286)*(1.0*m + 1.0)" - ], - "split": "train" - }, - { - "Input": "Let u(r) be the second derivative of -4*r**6/15 - r**4/12 - 7*r. Find the third derivative of u(l) wrt l.", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef p(r):\n\treturn -4*r**6/15 - r**4/12 - 7*r\ndef u(val):\n\treturn diff(-4*r**6/15 - r**4/12 - 7*r, r, 2).subs(r, val)\nl = symbols(\"l\")\nsolution = diff(u(l), l, 3)\nprint(solution)" - ], - "Output Answer": [ - "-192*l" - ], - "split": "train" - }, - { - "Input": "Let y(l) be the first derivative of -9*l**5/5 - l**2 + 13. Find the second derivative of y(w) wrt w.", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef k(l):\n\treturn -9*l**5/5 - l**2 + 13\ndef y(val):\n\treturn diff(-9*l**5/5 - l**2 + 13, l, 1).subs(l, val)\nw = symbols(\"w\")\nsolution = diff(y(w), w, 2)\nprint(solution)" - ], - "Output Answer": [ - "-108*w**2" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of h**3 + 4310906*h**2 - 291*h - 2349.", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef d(h):\n\treturn h**3 + 4310906*h**2 - 291*h - 2349\nh = symbols(\"h\")\nsolution = diff(h**3 + 4310906*h**2 - 291*h - 2349, h, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(3*h + 4310906)" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -4092*a**3 + 1429*a**2 + 3*a + 2.", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef b(a):\n\treturn -4092*a**3 + 1429*a**2 + 3*a + 2\na = symbols(\"a\")\nsolution = diff(-4092*a**3 + 1429*a**2 + 3*a + 2, a, 3)\nprint(solution)" - ], - "Output Answer": [ - "-24552" - ], - "split": "train" - }, - { - "Input": "Differentiate -268*o**3 + 177*o**2 - 2*o - 220027.", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef s(o):\n\treturn -268*o**3 + 177*o**2 - 2*o - 220027\no = symbols(\"o\")\nsolution = diff(-268*o**3 + 177*o**2 - 2*o - 220027, o, 1)\nprint(solution)" - ], - "Output Answer": [ - "-804*o**2 + 354*o - 2" - ], - "split": "train" - }, - { - "Input": "Let m(r) be the third derivative of 5*r**4/12 - 185*r**3/6 - 209*r**2. Is 10 a factor of m(55)?", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef j(r):\n\treturn 5*r**4/12 - 185*r**3/6 - 209*r**2\ndef m(val):\n\treturn diff(5*r**4/12 - 185*r**3/6 - 209*r**2, r, 3).subs(r, val)\nz = m(55)\nprint(365 % 10 == 0)" - ], - "Output Answer": [ - "False" - ], - "split": "train" - }, - { - "Input": "Let i(x) be the third derivative of -5*x**6/24 + 35*x**4/24 + 8*x**2. What is the second derivative of i(y) wrt y?", - "Output Program": [ - "from sympy import *\nx = symbols(\"x\")\ndef q(x):\n\treturn -5*x**6/24 + 35*x**4/24 + 8*x**2\ndef i(val):\n\treturn diff(-5*x**6/24 + 35*x**4/24 + 8*x**2, x, 3).subs(x, val)\ny = symbols(\"y\")\nsolution = diff(i(y), y, 2)\nprint(solution)" - ], - "Output Answer": [ - "-150*y" - ], - "split": "train" - }, - { - "Input": "Let p(r) be the second derivative of 1/30*r**6 + 0*r**3 + 0*r**5 + r**2 - r + 0*r**4 + 0. What is the first derivative of p(v) wrt v?", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef x(r):\n\treturn 1/30*r**6 + 0*r**3 + 0*r**5 + r**2 - r + 0*r**4 + 0\ndef p(val):\n\treturn diff(1/30*r**6 + 0*r**3 + 0*r**5 + r**2 - r + 0*r**4 + 0, r, 2).subs(r, val)\nv = symbols(\"v\")\nsolution = diff(p(v), v, 1)\nprint(solution)" - ], - "Output Answer": [ - "4.0*v**3" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -139286*l**3 + 4*l**2 + 7*l + 1326.", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef a(l):\n\treturn -139286*l**3 + 4*l**2 + 7*l + 1326\nl = symbols(\"l\")\nsolution = diff(-139286*l**3 + 4*l**2 + 7*l + 1326, l, 3)\nprint(solution)" - ], - "Output Answer": [ - "-835716" - ], - "split": "train" - }, - { - "Input": "Differentiate -p**4*t - 79*p**3 + 7*p*t - 26861*t - 3 wrt p.", - "Output Program": [ - "from sympy import *\np, t = symbols(\"p t\")\ndef f(p, t):\n\treturn -p**4*t - 79*p**3 + 7*p*t - 26861*t - 3\np = symbols(\"p\")\nsolution = diff(-p**4*t - 79*p**3 + 7*p*t - 26861*t - 3, p, 1)\nprint(solution)" - ], - "Output Answer": [ - "-4*p**3*t - 237*p**2 + 7*t" - ], - "split": "train" - }, - { - "Input": "What is the derivative of 269724*k**3 + 659265?", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef b(k):\n\treturn 269724*k**3 + 659265\nk = symbols(\"k\")\nsolution = diff(269724*k**3 + 659265, k, 1)\nprint(solution)" - ], - "Output Answer": [ - "809172*k**2" - ], - "split": "train" - }, - { - "Input": "Suppose 46 = 5*o - 14. Let p be (2/(-2))/((-4)/o). What is the third derivative of 9*u**3 + p*u**2 + 0*u**4 - 9*u**3 - 4*u**4 wrt u?", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\no = solve([Eq(46, 5*o - 14)])[o]\np = (2/(-2))/((-4)/o)\nu = symbols(\"u\")\ndef w(u):\n\treturn 9*u**3 + p*u**2 + 0*u**4 - 9*u**3 - 4*u**4\nu = symbols(\"u\")\nsolution = diff(9*u**3 + p*u**2 + 0*u**4 - 9*u**3 - 4*u**4, u, 3)\nprint(solution)" - ], - "Output Answer": [ - "-96*u" - ], - "split": "train" - }, - { - "Input": "Let x(t) be the first derivative of 56 - 5/2*t**2 + 1/3*t**3 + 4*t. Factor x(a).", - "Output Program": [ - "from sympy import *\nt = symbols(\"t\")\ndef m(t):\n\treturn 56 - 5/2*t**2 + 1/3*t**3 + 4*t\ndef x(val):\n\treturn diff(56 - 5/2*t**2 + 1/3*t**3 + 4*t, t, 1).subs(t, val)\na = symbols(\"a\")\neq = factor(x(a))\nprint(eq)" - ], - "Output Answer": [ - "4.0*(0.25*a - 1.0)*(1.0*a - 1.0)" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -840116177*b**3 - 821802931*b**2 wrt b.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef i(b):\n\treturn -840116177*b**3 - 821802931*b**2\nb = symbols(\"b\")\nsolution = diff(-840116177*b**3 - 821802931*b**2, b, 3)\nprint(solution)" - ], - "Output Answer": [ - "-5040697062" - ], - "split": "train" - }, - { - "Input": "Find the first derivative of -2*b**3*q*s - 3*b**3*q + 13*b**3*s**2 - 318*b**2*q + 61*b*q*s + b*q wrt s.", - "Output Program": [ - "from sympy import *\nb, q, s = symbols(\"b q s\")\ndef u(b, q, s):\n\treturn -2*b**3*q*s - 3*b**3*q + 13*b**3*s**2 - 318*b**2*q + 61*b*q*s + b*q\ns = symbols(\"s\")\nsolution = diff(-2*b**3*q*s - 3*b**3*q + 13*b**3*s**2 - 318*b**2*q + 61*b*q*s + b*q, s, 1)\nprint(solution)" - ], - "Output Answer": [ - "-2*b**3*q + 26*b**3*s + 61*b*q" - ], - "split": "train" - }, - { - "Input": "Let a(m) be the first derivative of -m**5/25 + m**4/5 - m**3/3 + m**2/5 + 39. Factor a(y).", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\ndef s(m):\n\treturn -m**5/25 + m**4/5 - m**3/3 + m**2/5 + 39\ndef a(val):\n\treturn diff(-m**5/25 + m**4/5 - m**3/3 + m**2/5 + 39, m, 1).subs(m, val)\ny = symbols(\"y\")\neq = factor(a(y))\nprint(eq)" - ], - "Output Answer": [ - "-y*(y - 2)*(y - 1)**2/5" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of -8*k**2*r**3 + 147*k**2*r - 15177*k*r**3 + 450*k*r**2 wrt r?", - "Output Program": [ - "from sympy import *\nr, k = symbols(\"r k\")\ndef g(r, k):\n\treturn -8*k**2*r**3 + 147*k**2*r - 15177*k*r**3 + 450*k*r**2\nr = symbols(\"r\")\nsolution = diff(-8*k**2*r**3 + 147*k**2*r - 15177*k*r**3 + 450*k*r**2, r, 3)\nprint(solution)" - ], - "Output Answer": [ - "-6*k*(8*k + 15177)" - ], - "split": "train" - }, - { - "Input": "Let s(r) be the second derivative of r**4/6 + 25*r**3/6 + 13*r**2/2 + 311*r. Give s(-12).", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef i(r):\n\treturn r**4/6 + 25*r**3/6 + 13*r**2/2 + 311*r\ndef s(val):\n\treturn diff(r**4/6 + 25*r**3/6 + 13*r**2/2 + 311*r, r, 2).subs(r, val)\nprint(s(-12))" - ], - "Output Answer": [ - "1" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 49*s**2 + 7*s**2 - 180*s**3 + 183*s**3 + 14*s**5 wrt s.", - "Output Program": [ - "from sympy import *\ns = symbols(\"s\")\ndef q(s):\n\treturn 49*s**2 + 7*s**2 - 180*s**3 + 183*s**3 + 14*s**5\ns = symbols(\"s\")\nsolution = diff(49*s**2 + 7*s**2 - 180*s**3 + 183*s**3 + 14*s**5, s, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*(140*s**2 + 3)" - ], - "split": "train" - }, - { - "Input": "Let l(h) be the third derivative of 22*h**5/15 + 11*h**4/24 - 3*h**3/2 + 6*h**2. Let v be l(4). Let w = 2284 - v. Is w a composite number?", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef f(h):\n\treturn 22*h**5/15 + 11*h**4/24 - 3*h**3/2 + 6*h**2\ndef l(val):\n\treturn diff(22*h**5/15 + 11*h**4/24 - 3*h**3/2 + 6*h**2, h, 3).subs(h, val)\nv = l(4)\nw = 2284 - v\nprint(not isprime(841))" - ], - "Output Answer": [ - "True" - ], - "split": "train" - }, - { - "Input": "Let z(i) be the third derivative of i**9/63 + 3*i**5/20 - 3*i**2. What is the third derivative of z(w) wrt w?", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef g(i):\n\treturn i**9/63 + 3*i**5/20 - 3*i**2\ndef z(val):\n\treturn diff(i**9/63 + 3*i**5/20 - 3*i**2, i, 3).subs(i, val)\nw = symbols(\"w\")\nsolution = diff(z(w), w, 3)\nprint(solution)" - ], - "Output Answer": [ - "960*w**3" - ], - "split": "train" - }, - { - "Input": "Let j(b) = -261*b**4 - 6*b**3 + 6*b - 197. Let v(s) = -2*s**4 - s**3 + s - 1. Let c(d) = j(d) - 6*v(d). Find the first derivative of c(a) wrt a.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef j(b):\n\treturn -261*b**4 - 6*b**3 + 6*b - 197\ns = symbols(\"s\")\ndef v(s):\n\treturn -2*s**4 - s**3 + s - 1\ndef c(d):\n\treturn j(d) - 6*v(d)\na = symbols(\"a\")\nsolution = diff(c(a), a, 1)\nprint(solution)" - ], - "Output Answer": [ - "-996*a**3" - ], - "split": "train" - }, - { - "Input": "What is the derivative of 409400484*s**4 - 238314658?", - "Output Program": [ - "from sympy import *\ns = symbols(\"s\")\ndef d(s):\n\treturn 409400484*s**4 - 238314658\ns = symbols(\"s\")\nsolution = diff(409400484*s**4 - 238314658, s, 1)\nprint(solution)" - ], - "Output Answer": [ - "1637601936*s**3" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -2*t**5 - 5*t**4 - 1708*t**2 - 721*t - 4217 wrt t.", - "Output Program": [ - "from sympy import *\nt = symbols(\"t\")\ndef d(t):\n\treturn -2*t**5 - 5*t**4 - 1708*t**2 - 721*t - 4217\nt = symbols(\"t\")\nsolution = diff(-2*t**5 - 5*t**4 - 1708*t**2 - 721*t - 4217, t, 2)\nprint(solution)" - ], - "Output Answer": [ - "-4*(10*t**3 + 15*t**2 + 854)" - ], - "split": "train" - }, - { - "Input": "What is the first derivative of c**3*n**3 + 340*c**3 - 140*c**2*n**3 wrt n?", - "Output Program": [ - "from sympy import *\nc, n = symbols(\"c n\")\ndef a(c, n):\n\treturn c**3*n**3 + 340*c**3 - 140*c**2*n**3\nn = symbols(\"n\")\nsolution = diff(c**3*n**3 + 340*c**3 - 140*c**2*n**3, n, 1)\nprint(solution)" - ], - "Output Answer": [ - "3*c**3*n**2 - 420*c**2*n**2" - ], - "split": "train" - }, - { - "Input": "Find the first derivative of 12*h**3 + 19602*h**2 - h + 747291 wrt h.", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef f(h):\n\treturn 12*h**3 + 19602*h**2 - h + 747291\nh = symbols(\"h\")\nsolution = diff(12*h**3 + 19602*h**2 - h + 747291, h, 1)\nprint(solution)" - ], - "Output Answer": [ - "36*h**2 + 39204*h - 1" - ], - "split": "train" - }, - { - "Input": "Let c(u) be the second derivative of -257*u**4/4 + 443*u**3/3 - 227*u. What is the second derivative of c(o) wrt o?", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef f(u):\n\treturn -257*u**4/4 + 443*u**3/3 - 227*u\ndef c(val):\n\treturn diff(-257*u**4/4 + 443*u**3/3 - 227*u, u, 2).subs(u, val)\no = symbols(\"o\")\nsolution = diff(c(o), o, 2)\nprint(solution)" - ], - "Output Answer": [ - "-1542" - ], - "split": "train" - }, - { - "Input": "Let b(n) be the first derivative of -n**5/45 + n**4/36 + n**3/9 - 5*n**2/18 + 2*n/9 + 478. Find j such that b(j) = 0.", - "Output Program": [ - "from sympy import *\nn = symbols(\"n\")\ndef z(n):\n\treturn -n**5/45 + n**4/36 + n**3/9 - 5*n**2/18 + 2*n/9 + 478\ndef b(val):\n\treturn diff(-n**5/45 + n**4/36 + n**3/9 - 5*n**2/18 + 2*n/9 + 478, n, 1).subs(n, val)\nj = symbols(\"j\")\nj = solve(b(j))\nprint(j)" - ], - "Output Answer": [ - "[-2, 1]" - ], - "split": "train" - }, - { - "Input": "Let j(k) be the second derivative of -k**4/6 - k**3/3 + 2*k**2 - 11*k. Let u = 5 - 2. Calculate j(u).", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef d(k):\n\treturn -k**4/6 - k**3/3 + 2*k**2 - 11*k\ndef j(val):\n\treturn diff(-k**4/6 - k**3/3 + 2*k**2 - 11*k, k, 2).subs(k, val)\nu = 5 - 2\nprint(j(u))" - ], - "Output Answer": [ - "-20" - ], - "split": "train" - }, - { - "Input": "Let b(a) be the third derivative of -a**6/10 + a**5/60 + a**4/24 - a**2. Let c be b(-1). Suppose -k - k = -c. Solve 5*y = -t + 2, -k = 3*y - 0*y - 3*t for y.", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef p(a):\n\treturn -a**6/10 + a**5/60 + a**4/24 - a**2\ndef b(val):\n\treturn diff(-a**6/10 + a**5/60 + a**4/24 - a**2, a, 3).subs(a, val)\nc = b(-1)\nk = symbols(\"k\")\nk = solve([Eq(-k - k, -c)])[k]\ny, t = symbols(\"y t\")\ny = solve([Eq(5*y, -t + 2), Eq(-k, 3*y - 0*y - 3*t)])[y]\nprint(y)" - ], - "Output Answer": [ - "0" - ], - "split": "train" - }, - { - "Input": "Suppose -5*d + 122 = 8*w - 4*w, -3*d = -3*w - 57. Let q(v) be the second derivative of -v**3/6 - 7*v. What is the remainder when d is divided by q(-8)?", - "Output Program": [ - "from sympy import *\nd, w = symbols(\"d w\")\nd = solve([Eq(-5*d + 122, 8*w - 4*w), Eq(-3*d, -3*w - 57)])[d]\nv = symbols(\"v\")\ndef a(v):\n\treturn -v**3/6 - 7*v\ndef q(val):\n\treturn diff(-v**3/6 - 7*v, v, 2).subs(v, val)\nm = q(-8)\nprint(d % m)" - ], - "Output Answer": [ - "6" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of -914*f**2*m**2*o**3 - 2*f**2*m*o**3 - f**2*m*o**2 - f**2*m + 2*f*m*o - 355*f*o - 2*m**2*o**3 wrt m?", - "Output Program": [ - "from sympy import *\no, f, m = symbols(\"o f m\")\ndef d(o, f, m):\n\treturn -914*f**2*m**2*o**3 - 2*f**2*m*o**3 - f**2*m*o**2 - f**2*m + 2*f*m*o - 355*f*o - 2*m**2*o**3\nm = symbols(\"m\")\nsolution = diff(-914*f**2*m**2*o**3 - 2*f**2*m*o**3 - f**2*m*o**2 - f**2*m + 2*f*m*o - 355*f*o - 2*m**2*o**3, m, 2)\nprint(solution)" - ], - "Output Answer": [ - "-4*o**3*(457*f**2 + 1)" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -419*d*k**3 + 2*d*k**2 + 152247*k**3 + 5249443 wrt k.", - "Output Program": [ - "from sympy import *\nd, k = symbols(\"d k\")\ndef r(d, k):\n\treturn -419*d*k**3 + 2*d*k**2 + 152247*k**3 + 5249443\nk = symbols(\"k\")\nsolution = diff(-419*d*k**3 + 2*d*k**2 + 152247*k**3 + 5249443, k, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*(152247 - 419*d)" - ], - "split": "train" - }, - { - "Input": "Suppose 0 = 2*r + 4*q - 152, q = -4*q. Let p = r + -54. What is the third derivative of -19*w**2 - w**2 + p*w**2 - 26*w**6 wrt w?", - "Output Program": [ - "from sympy import *\nr, q = symbols(\"r q\")\nr = solve([Eq(0, 2*r + 4*q - 152), Eq(q, -4*q)])[r]\np = r + -54\nw = symbols(\"w\")\ndef b(w):\n\treturn -19*w**2 - w**2 + p*w**2 - 26*w**6\nw = symbols(\"w\")\nsolution = diff(-19*w**2 - w**2 + p*w**2 - 26*w**6, w, 3)\nprint(solution)" - ], - "Output Answer": [ - "-3120*w**3" - ], - "split": "train" - }, - { - "Input": "Let q(k) = -4*k**3 - 2*k**2 + 2*k - 1. Let m(c) = -3169*c**3 + 8*c**2 + 36*c + 29. Let s(o) = -m(o) - 4*q(o). What is the second derivative of s(l) wrt l?", - "Output Program": [ - "from sympy import *\nc = symbols(\"c\")\ndef m(c):\n\treturn -3169*c**3 + 8*c**2 + 36*c + 29\nk = symbols(\"k\")\ndef q(k):\n\treturn -4*k**3 - 2*k**2 + 2*k - 1\ndef s(o):\n\treturn -m(o) - 4*q(o)\nl = symbols(\"l\")\nsolution = diff(s(l), l, 2)\nprint(solution)" - ], - "Output Answer": [ - "19110*l" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of 34799836*l**5 + 3*l + 8867830 wrt l?", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef k(l):\n\treturn 34799836*l**5 + 3*l + 8867830\nl = symbols(\"l\")\nsolution = diff(34799836*l**5 + 3*l + 8867830, l, 2)\nprint(solution)" - ], - "Output Answer": [ - "695996720*l**3" - ], - "split": "train" - }, - { - "Input": "Let u = -443/210 - -15/7. Let r(x) be the third derivative of 0 - u*x**5 - 2*x**2 + 1/12*x**4 + 0*x**3 + 0*x. Find c such that r(c) = 0.", - "Output Program": [ - "from sympy import *\nu = -443/210 - -15/7\nx = symbols(\"x\")\ndef g(x):\n\treturn 0 - u*x**5 - 2*x**2 + 1/12*x**4 + 0*x**3 + 0*x\ndef r(val):\n\treturn diff(0 - u*x**5 - 2*x**2 + 1/12*x**4 + 0*x**3 + 0*x, x, 3).subs(x, val)\nc = symbols(\"c\")\nc = solve(r(c))\nprint(c)" - ], - "Output Answer": [ - "[0.0, 1.00000000000000]" - ], - "split": "train" - }, - { - "Input": "Differentiate 40317*p**4 - 19405 wrt p.", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef v(p):\n\treturn 40317*p**4 - 19405\np = symbols(\"p\")\nsolution = diff(40317*p**4 - 19405, p, 1)\nprint(solution)" - ], - "Output Answer": [ - "161268*p**3" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 2107*l**5*x - 124*l**2 + 18*x wrt l.", - "Output Program": [ - "from sympy import *\nx, l = symbols(\"x l\")\ndef s(x, l):\n\treturn 2107*l**5*x - 124*l**2 + 18*x\nl = symbols(\"l\")\nsolution = diff(2107*l**5*x - 124*l**2 + 18*x, l, 3)\nprint(solution)" - ], - "Output Answer": [ - "126420*l**2*x" - ], - "split": "train" - }, - { - "Input": "Differentiate 1093*w**3 - 5*w + 11972 with respect to w.", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef u(w):\n\treturn 1093*w**3 - 5*w + 11972\nw = symbols(\"w\")\nsolution = diff(1093*w**3 - 5*w + 11972, w, 1)\nprint(solution)" - ], - "Output Answer": [ - "3279*w**2 - 5" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of -9566*o**5 - 87*o**4 - 2*o**3 + 13124450*o**2 wrt o?", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef f(o):\n\treturn -9566*o**5 - 87*o**4 - 2*o**3 + 13124450*o**2\no = symbols(\"o\")\nsolution = diff(-9566*o**5 - 87*o**4 - 2*o**3 + 13124450*o**2, o, 3)\nprint(solution)" - ], - "Output Answer": [ - "-12*(47830*o**2 + 174*o + 1)" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of 2*g**6 - 566383*g**5 + 1498455*g**2?", - "Output Program": [ - "from sympy import *\ng = symbols(\"g\")\ndef w(g):\n\treturn 2*g**6 - 566383*g**5 + 1498455*g**2\ng = symbols(\"g\")\nsolution = diff(2*g**6 - 566383*g**5 + 1498455*g**2, g, 3)\nprint(solution)" - ], - "Output Answer": [ - "60*g**2*(4*g - 566383)" - ], - "split": "train" - }, - { - "Input": "Let j(z) be the first derivative of 5/2*z**2 + 4 + 2*z. Find the first derivative of j(b) wrt b.", - "Output Program": [ - "from sympy import *\nz = symbols(\"z\")\ndef g(z):\n\treturn 5/2*z**2 + 4 + 2*z\ndef j(val):\n\treturn diff(5/2*z**2 + 4 + 2*z, z, 1).subs(z, val)\nb = symbols(\"b\")\nsolution = diff(j(b), b, 1)\nprint(solution)" - ], - "Output Answer": [ - "5.00000000000000" - ], - "split": "train" - }, - { - "Input": "Let u be 3/2*48/18. Let a(b) = -b**2 + 3*b + 6. Let s be a(u). Find the third derivative of l**s + 3*l**2 + 5*l**2 + 7*l**6 wrt l.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef a(b):\n\treturn -b**2 + 3*b + 6\nu = 3/2*48/18\ns = a(u)\nl = symbols(\"l\")\ndef r(l):\n\treturn l**s + 3*l**2 + 5*l**2 + 7*l**6\nl = symbols(\"l\")\nsolution = diff(l**s + 3*l**2 + 5*l**2 + 7*l**6, l, 3)\nprint(solution)" - ], - "Output Answer": [ - "840*l**3" - ], - "split": "train" - }, - { - "Input": "Suppose 0 = -3*f + 2 + 10. Suppose -f*s - s + 30 = 0. Let w(q) be the third derivative of -q**6/120 + q**5/12 + 7*q**4/24 - 2*q**3/3 - 6*q**2. Calculate w(s).", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef j(q):\n\treturn -q**6/120 + q**5/12 + 7*q**4/24 - 2*q**3/3 - 6*q**2\ndef w(val):\n\treturn diff(-q**6/120 + q**5/12 + 7*q**4/24 - 2*q**3/3 - 6*q**2, q, 3).subs(q, val)\nf = symbols(\"f\")\nf = solve([Eq(0, -3*f + 2 + 10)])[f]\ns = symbols(\"s\")\ns = solve([Eq(-f*s - s + 30, 0)])[s]\nprint(w(s))" - ], - "Output Answer": [ - "2" - ], - "split": "train" - }, - { - "Input": "Let c(a) be the second derivative of 1/20*a**5 + 7/6*a**4 + 0 + 49/6*a**3 + 0*a**2 - 36*a. Suppose c(m) = 0. Calculate m.", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef u(a):\n\treturn 1/20*a**5 + 7/6*a**4 + 0 + 49/6*a**3 + 0*a**2 - 36*a\ndef c(val):\n\treturn diff(1/20*a**5 + 7/6*a**4 + 0 + 49/6*a**3 + 0*a**2 - 36*a, a, 2).subs(a, val)\nm = symbols(\"m\")\nm = solve(c(m))\nprint(m)" - ], - "Output Answer": [ - "[-7.00000000000000, 0.0]" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of h*k**2*m - 3*h*k**2 + h*k*m - 33*h*k - 2*h*m + 562*k**2 - k*m - 4*m wrt k.", - "Output Program": [ - "from sympy import *\nm, k, h = symbols(\"m k h\")\ndef r(m, k, h):\n\treturn h*k**2*m - 3*h*k**2 + h*k*m - 33*h*k - 2*h*m + 562*k**2 - k*m - 4*m\nk = symbols(\"k\")\nsolution = diff(h*k**2*m - 3*h*k**2 + h*k*m - 33*h*k - 2*h*m + 562*k**2 - k*m - 4*m, k, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(h*m - 3*h + 562)" - ], - "split": "train" - }, - { - "Input": "Let c(p) = 2 - p. Let v(z) = 21 - 3*z. Let s(o) = -66*c(o) + 6*v(o). Differentiate s(a) wrt a.", - "Output Program": [ - "from sympy import *\nz = symbols(\"z\")\ndef v(z):\n\treturn 21 - 3*z\np = symbols(\"p\")\ndef c(p):\n\treturn 2 - p\ndef s(o):\n\treturn -66*c(o) + 6*v(o)\na = symbols(\"a\")\nsolution = diff(s(a), a, 1)\nprint(solution)" - ], - "Output Answer": [ - "48" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 32*v**6 - 22*v**4 - v**2 - 310*v + 1 wrt v.", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef k(v):\n\treturn 32*v**6 - 22*v**4 - v**2 - 310*v + 1\nv = symbols(\"v\")\nsolution = diff(32*v**6 - 22*v**4 - v**2 - 310*v + 1, v, 3)\nprint(solution)" - ], - "Output Answer": [ - "48*v*(80*v**2 - 11)" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of 13*k**3 + 2*k**2*o + 4*k**2 + k*o - k + 25*o wrt k?", - "Output Program": [ - "from sympy import *\nk, o = symbols(\"k o\")\ndef n(k, o):\n\treturn 13*k**3 + 2*k**2*o + 4*k**2 + k*o - k + 25*o\nk = symbols(\"k\")\nsolution = diff(13*k**3 + 2*k**2*o + 4*k**2 + k*o - k + 25*o, k, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(39*k + 2*o + 4)" - ], - "split": "train" - }, - { - "Input": "Let y be (-4 - 20/(-4))*0. Let b(s) be the second derivative of 0*s**2 + 1/21*s**4 + 1/147*s**7 + y*s**3 + 0*s**6 + 0 - 11*s - 3/70*s**5. Factor b(p).", - "Output Program": [ - "from sympy import *\ny = (-4 - 20/(-4))*0\ns = symbols(\"s\")\ndef o(s):\n\treturn 0*s**2 + 1/21*s**4 + 1/147*s**7 + y*s**3 + 0*s**6 + 0 - 11*s - 3/70*s**5\ndef b(val):\n\treturn diff(0*s**2 + 1/21*s**4 + 1/147*s**7 + y*s**3 + 0*s**6 + 0 - 11*s - 3/70*s**5, s, 2).subs(s, val)\np = symbols(\"p\")\neq = factor(b(p))\nprint(eq)" - ], - "Output Answer": [ - "0.571428571428571*p**2*(0.5*p + 1.0)*(1.0*p - 1.0)**2" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of 26*b**3*c**3 + 38*b**3*c**2*h + b**2*c**2*h - 2*b*c**3*h - b*h - 5*b + 2*c**2*h wrt b.", - "Output Program": [ - "from sympy import *\nc, h, b = symbols(\"c h b\")\ndef o(c, h, b):\n\treturn 26*b**3*c**3 + 38*b**3*c**2*h + b**2*c**2*h - 2*b*c**3*h - b*h - 5*b + 2*c**2*h\nb = symbols(\"b\")\nsolution = diff(26*b**3*c**3 + 38*b**3*c**2*h + b**2*c**2*h - 2*b*c**3*h - b*h - 5*b + 2*c**2*h, b, 3)\nprint(solution)" - ], - "Output Answer": [ - "12*c**2*(13*c + 19*h)" - ], - "split": "train" - }, - { - "Input": "Suppose 5*d = -5*o + 70, 4*d - 54 = -o - 4*o. What is the second derivative of 28*t**4 + d*t - 9*t + 24*t wrt t?", - "Output Program": [ - "from sympy import *\nd, o = symbols(\"d o\")\nd = solve([Eq(5*d, -5*o + 70), Eq(4*d - 54, -o - 4*o)])[d]\nt = symbols(\"t\")\ndef r(t):\n\treturn 28*t**4 + d*t - 9*t + 24*t\nt = symbols(\"t\")\nsolution = diff(28*t**4 + d*t - 9*t + 24*t, t, 2)\nprint(solution)" - ], - "Output Answer": [ - "336*t**2" - ], - "split": "train" - }, - { - "Input": "Let q be 10*(36/8 + (-8)/2). Find the second derivative of -47*n + 20*n**q + 2*n**2 - 119*n + 271*n wrt n.", - "Output Program": [ - "from sympy import *\nq = 10*(36/8 + (-8)/2)\nn = symbols(\"n\")\ndef v(n):\n\treturn -47*n + 20*n**q + 2*n**2 - 119*n + 271*n\nn = symbols(\"n\")\nsolution = diff(-47*n + 20*n**q + 2*n**2 - 119*n + 271*n, n, 2)\nprint(solution)" - ], - "Output Answer": [ - "400.0*n**3.0 + 4" - ], - "split": "train" - }, - { - "Input": "Suppose 7*n + 16 = 15*n. Find the second derivative of -7*g**5 - 6*g + 0*g**4 + 6*g**4 + 34*g - n*g**4 wrt g.", - "Output Program": [ - "from sympy import *\nn = symbols(\"n\")\nn = solve([Eq(7*n + 16, 15*n)])[n]\ng = symbols(\"g\")\ndef h(g):\n\treturn -7*g**5 - 6*g + 0*g**4 + 6*g**4 + 34*g - n*g**4\ng = symbols(\"g\")\nsolution = diff(-7*g**5 - 6*g + 0*g**4 + 6*g**4 + 34*g - n*g**4, g, 2)\nprint(solution)" - ], - "Output Answer": [ - "4*g**2*(12 - 35*g)" - ], - "split": "train" - }, - { - "Input": "Differentiate 8251480*a*u + 2*a + 292895473*u with respect to a.", - "Output Program": [ - "from sympy import *\na, u = symbols(\"a u\")\ndef q(a, u):\n\treturn 8251480*a*u + 2*a + 292895473*u\na = symbols(\"a\")\nsolution = diff(8251480*a*u + 2*a + 292895473*u, a, 1)\nprint(solution)" - ], - "Output Answer": [ - "8251480*u + 2" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -18*p**3 + 34*p**2 + 16*p**2 - 26*p**2 wrt p.", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef y(p):\n\treturn -18*p**3 + 34*p**2 + 16*p**2 - 26*p**2\np = symbols(\"p\")\nsolution = diff(-18*p**3 + 34*p**2 + 16*p**2 - 26*p**2, p, 3)\nprint(solution)" - ], - "Output Answer": [ - "-108" - ], - "split": "train" - }, - { - "Input": "Suppose 3*v - 36 = -0. Differentiate 3*y + 19*y + v*y + 25 with respect to y.", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\nv = solve([Eq(3*v - 36, -0)])[v]\ny = symbols(\"y\")\ndef b(y):\n\treturn 3*y + 19*y + v*y + 25\ny = symbols(\"y\")\nsolution = diff(3*y + 19*y + v*y + 25, y, 1)\nprint(solution)" - ], - "Output Answer": [ - "34" - ], - "split": "train" - }, - { - "Input": "Suppose 9*p + 81 = 4*p + c, -3*p - 5*c = 43. Let i = p + 20. Find the first derivative of r**2 - i - r**2 - 2 - 3*r**3 wrt r.", - "Output Program": [ - "from sympy import *\np, c = symbols(\"p c\")\np = solve([Eq(9*p + 81, 4*p + c), Eq(-3*p - 5*c, 43)])[p]\ni = p + 20\nr = symbols(\"r\")\ndef g(r):\n\treturn r**2 - i - r**2 - 2 - 3*r**3\nr = symbols(\"r\")\nsolution = diff(r**2 - i - r**2 - 2 - 3*r**3, r, 1)\nprint(solution)" - ], - "Output Answer": [ - "-9*r**2" - ], - "split": "train" - }, - { - "Input": "Find the third derivative of -s**2*z**4 + 2*s**2 - 56*s*z**2 + 14*z**6 wrt z.", - "Output Program": [ - "from sympy import *\ns, z = symbols(\"s z\")\ndef v(s, z):\n\treturn -s**2*z**4 + 2*s**2 - 56*s*z**2 + 14*z**6\nz = symbols(\"z\")\nsolution = diff(-s**2*z**4 + 2*s**2 - 56*s*z**2 + 14*z**6, z, 3)\nprint(solution)" - ], - "Output Answer": [ - "24*z*(-s**2 + 70*z**2)" - ], - "split": "train" - }, - { - "Input": "Let g(y) = 9*y**4 + 25*y**2 + 6. Let s(d) = 1 - d**4. Let x(t) = -g(t) + 6*s(t). What is the third derivative of x(f) wrt f?", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef g(y):\n\treturn 9*y**4 + 25*y**2 + 6\nd = symbols(\"d\")\ndef s(d):\n\treturn 1 - d**4\ndef x(t):\n\treturn -g(t) + 6*s(t)\nf = symbols(\"f\")\nsolution = diff(x(f), f, 3)\nprint(solution)" - ], - "Output Answer": [ - "-360*f" - ], - "split": "train" - }, - { - "Input": "Let o(q) = -4344*q**5 + 5*q**3 - 8447*q**2. Let m(a) = -2173*a**5 + 3*a**3 - 4222*a**2. Let l(f) = -5*m(f) + 3*o(f). What is the third derivative of l(n) wrt n?", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef o(q):\n\treturn -4344*q**5 + 5*q**3 - 8447*q**2\na = symbols(\"a\")\ndef m(a):\n\treturn -2173*a**5 + 3*a**3 - 4222*a**2\ndef l(f):\n\treturn -5*m(f) + 3*o(f)\nn = symbols(\"n\")\nsolution = diff(l(n), n, 3)\nprint(solution)" - ], - "Output Answer": [ - "-130020*n**2" - ], - "split": "train" - }, - { - "Input": "What is the derivative of 13*p**3*x + 167*p**3 - 3*p**2*x**2 - x**2 wrt x?", - "Output Program": [ - "from sympy import *\nx, p = symbols(\"x p\")\ndef i(x, p):\n\treturn 13*p**3*x + 167*p**3 - 3*p**2*x**2 - x**2\nx = symbols(\"x\")\nsolution = diff(13*p**3*x + 167*p**3 - 3*p**2*x**2 - x**2, x, 1)\nprint(solution)" - ], - "Output Answer": [ - "13*p**3 - 6*p**2*x - 2*x" - ], - "split": "train" - }, - { - "Input": "Let k(b) be the second derivative of b**5/20 + 17*b**4/12 + 8*b**3/3 - 29*b**2/2 + 5*b. Let d be k(-16). What is the tens digit of (d/4)/((-3)/12)?", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef i(b):\n\treturn b**5/20 + 17*b**4/12 + 8*b**3/3 - 29*b**2/2 + 5*b\ndef k(val):\n\treturn diff(b**5/20 + 17*b**4/12 + 8*b**3/3 - 29*b**2/2 + 5*b, b, 2).subs(b, val)\nd = k(-16)\nr = (d/4)/((-3)/12)\ndigit = int(str(int(29))[0])\nprint(digit)" - ], - "Output Answer": [ - "2" - ], - "split": "train" - }, - { - "Input": "Let b(l) = 2*l**3 + 2*l - 1. Let i be 4 - 1 - (-4 + 3). Let c(o) = o + 2 + 1 - i + o**3. Let y(v) = -b(v) + c(v). Find the second derivative of y(h) wrt h.", - "Output Program": [ - "from sympy import *\ni = 4 - 1 - (-4 + 3)\no = symbols(\"o\")\ndef c(o):\n\treturn o + 2 + 1 - i + o**3\nl = symbols(\"l\")\ndef b(l):\n\treturn 2*l**3 + 2*l - 1\ndef y(v):\n\treturn -b(v) + c(v)\nh = symbols(\"h\")\nsolution = diff(y(h), h, 2)\nprint(solution)" - ], - "Output Answer": [ - "-6*h" - ], - "split": "train" - }, - { - "Input": "What is the second derivative of -24593*j**2 + 3 + 48939*j**2 - 27671*j**2 - 37*j wrt j?", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef l(j):\n\treturn -24593*j**2 + 3 + 48939*j**2 - 27671*j**2 - 37*j\nj = symbols(\"j\")\nsolution = diff(-24593*j**2 + 3 + 48939*j**2 - 27671*j**2 - 37*j, j, 2)\nprint(solution)" - ], - "Output Answer": [ - "-6650" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of b*w**4 - 126*b*w**2 - b*w - 4937*w**5 + 2*w**2 + w wrt w?", - "Output Program": [ - "from sympy import *\nb, w = symbols(\"b w\")\ndef y(b, w):\n\treturn b*w**4 - 126*b*w**2 - b*w - 4937*w**5 + 2*w**2 + w\nw = symbols(\"w\")\nsolution = diff(b*w**4 - 126*b*w**2 - b*w - 4937*w**5 + 2*w**2 + w, w, 3)\nprint(solution)" - ], - "Output Answer": [ - "12*w*(2*b - 24685*w)" - ], - "split": "train" - }, - { - "Input": "Let o(p) = p**3 + 10*p**2 + 2. Let y be o(-10). Find the second derivative of -l**5 - 2*l + 0*l - y*l**5 wrt l.", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef o(p):\n\treturn p**3 + 10*p**2 + 2\ny = o(-10)\nl = symbols(\"l\")\ndef m(l):\n\treturn -l**5 - 2*l + 0*l - y*l**5\nl = symbols(\"l\")\nsolution = diff(-l**5 - 2*l + 0*l - y*l**5, l, 2)\nprint(solution)" - ], - "Output Answer": [ - "-60*l**3" - ], - "split": "train" - }, - { - "Input": "Let o(k) be the third derivative of 1/24*k**4 + 1/210*k**7 - 1/18*k**3 - 1/1008*k**8 + 0*k + 0 - 2*k**2 - 1/180*k**6 - 1/90*k**5. Factor o(l).", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef m(k):\n\treturn 1/24*k**4 + 1/210*k**7 - 1/18*k**3 - 1/1008*k**8 + 0*k + 0 - 2*k**2 - 1/180*k**6 - 1/90*k**5\ndef o(val):\n\treturn diff(1/24*k**4 + 1/210*k**7 - 1/18*k**3 - 1/1008*k**8 + 0*k + 0 - 2*k**2 - 1/180*k**6 - 1/90*k**5, k, 3).subs(k, val)\nl = symbols(\"l\")\neq = factor(o(l))\nprint(eq)" - ], - "Output Answer": [ - "-0.333333333333333*(1.0*l - 1.0)**4*(1.0*l + 1.0)" - ], - "split": "train" - }, - { - "Input": "Find the first derivative of 1893*v**3 + 1551.", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef z(v):\n\treturn 1893*v**3 + 1551\nv = symbols(\"v\")\nsolution = diff(1893*v**3 + 1551, v, 1)\nprint(solution)" - ], - "Output Answer": [ - "5679*v**2" - ], - "split": "train" - }, - { - "Input": "Let c(v) be the third derivative of v**4/6 + v**3/6 + v**2. Give c(5).", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef k(v):\n\treturn v**4/6 + v**3/6 + v**2\ndef c(val):\n\treturn diff(v**4/6 + v**3/6 + v**2, v, 3).subs(v, val)\nprint(c(5))" - ], - "Output Answer": [ - "21" - ], - "split": "train" - }, - { - "Input": "Suppose 40*k - 36*k = 32. Find the third derivative of k*g + 4*g**2 - 18*g + 10*g - 2*g**4 wrt g.", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\nk = solve([Eq(40*k - 36*k, 32)])[k]\ng = symbols(\"g\")\ndef s(g):\n\treturn k*g + 4*g**2 - 18*g + 10*g - 2*g**4\ng = symbols(\"g\")\nsolution = diff(k*g + 4*g**2 - 18*g + 10*g - 2*g**4, g, 3)\nprint(solution)" - ], - "Output Answer": [ - "-48*g" - ], - "split": "train" - }, - { - "Input": "Let p(u) be the third derivative of -2*u**2 + 1/24*u**4 + 4/3*u**3 + 0*u + 0. Determine p(-6).", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef y(u):\n\treturn -2*u**2 + 1/24*u**4 + 4/3*u**3 + 0*u + 0\ndef p(val):\n\treturn diff(-2*u**2 + 1/24*u**4 + 4/3*u**3 + 0*u + 0, u, 3).subs(u, val)\nprint(p(-6))" - ], - "Output Answer": [ - "2.00000000000000" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of -5*w - 4*w + 15*w**4 + 9*w - 4*w**2 wrt w?", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef m(w):\n\treturn -5*w - 4*w + 15*w**4 + 9*w - 4*w**2\nw = symbols(\"w\")\nsolution = diff(-5*w - 4*w + 15*w**4 + 9*w - 4*w**2, w, 3)\nprint(solution)" - ], - "Output Answer": [ - "360*w" - ], - "split": "train" - }, - { - "Input": "Let b(c) = -2*c - 4. Let q(r) be the second derivative of -r**3/6 - r**2 + 2*r. Let p(h) = 6*b(h) - 11*q(h). Find the first derivative of p(w) wrt w.", - "Output Program": [ - "from sympy import *\nc = symbols(\"c\")\ndef b(c):\n\treturn -2*c - 4\nr = symbols(\"r\")\ndef o(r):\n\treturn -r**3/6 - r**2 + 2*r\ndef q(val):\n\treturn diff(-r**3/6 - r**2 + 2*r, r, 2).subs(r, val)\ndef p(h):\n\treturn 6*b(h) - 11*q(h)\nw = symbols(\"w\")\nsolution = diff(p(w), w, 1)\nprint(solution)" - ], - "Output Answer": [ - "-1" - ], - "split": "train" - }, - { - "Input": "Suppose u - 15 = 11. Differentiate u - 15 + 8*l + 5*l - 22 with respect to l.", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\nu = solve([Eq(u - 15, 11)])[u]\nl = symbols(\"l\")\ndef q(l):\n\treturn u - 15 + 8*l + 5*l - 22\nl = symbols(\"l\")\nsolution = diff(u - 15 + 8*l + 5*l - 22, l, 1)\nprint(solution)" - ], - "Output Answer": [ - "13" - ], - "split": "train" - }, - { - "Input": "Find the second derivative of -12*b**2 - 3*b**5 + 12*b**2 + 42*b - 11*b wrt b.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef w(b):\n\treturn -12*b**2 - 3*b**5 + 12*b**2 + 42*b - 11*b\nb = symbols(\"b\")\nsolution = diff(-12*b**2 - 3*b**5 + 12*b**2 + 42*b - 11*b, b, 2)\nprint(solution)" - ], - "Output Answer": [ - "-60*b**3" - ], - "split": "train" - }, - { - "Input": "Let c be 1 + (-2 - -1) - 0. Let h(j) be the first derivative of -j**4/4 + j + 92. Give h(c).", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef x(j):\n\treturn -j**4/4 + j + 92\ndef h(val):\n\treturn diff(-j**4/4 + j + 92, j, 1).subs(j, val)\nc = 1 + (-2 - -1) - 0\nprint(h(c))" - ], - "Output Answer": [ - "1" - ], - "split": "train" - }, - { - "Input": "What is the third derivative of -348*b**4*j**3 + b**4*j + b**2*j**3 + 854*b**2*j**2 wrt b?", - "Output Program": [ - "from sympy import *\nj, b = symbols(\"j b\")\ndef p(j, b):\n\treturn -348*b**4*j**3 + b**4*j + b**2*j**3 + 854*b**2*j**2\nb = symbols(\"b\")\nsolution = diff(-348*b**4*j**3 + b**4*j + b**2*j**3 + 854*b**2*j**2, b, 3)\nprint(solution)" - ], - "Output Answer": [ - "24*b*j*(1 - 348*j**2)" - ], - "split": "train" - }, - { - "Input": "Let y(k) be the second derivative of k**5/20 - 5*k**4/12 - 7*k**3/3 - 5*k**2 + 3*k + 63. Determine y(7).", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef n(k):\n\treturn k**5/20 - 5*k**4/12 - 7*k**3/3 - 5*k**2 + 3*k + 63\ndef y(val):\n\treturn diff(k**5/20 - 5*k**4/12 - 7*k**3/3 - 5*k**2 + 3*k + 63, k, 2).subs(k, val)\nprint(y(7))" - ], - "Output Answer": [ - "-10" - ], - "split": "train" - }, - { - "Input": "Let o(u) be the first derivative of 26*u**3/3 + 35*u + 26. What is the first derivative of o(f) wrt f?", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef a(u):\n\treturn 26*u**3/3 + 35*u + 26\ndef o(val):\n\treturn diff(26*u**3/3 + 35*u + 26, u, 1).subs(u, val)\nf = symbols(\"f\")\nsolution = diff(o(f), f, 1)\nprint(solution)" - ], - "Output Answer": [ - "52*f" - ], - "split": "dev" - }, - { - "Input": "Find the third derivative of -267185*a**4 + 3*a**2 - 270*a - 28 wrt a.", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef f(a):\n\treturn -267185*a**4 + 3*a**2 - 270*a - 28\na = symbols(\"a\")\nsolution = diff(-267185*a**4 + 3*a**2 - 270*a - 28, a, 3)\nprint(solution)" - ], - "Output Answer": [ - "-6412440*a" - ], - "split": "dev" - }, - { - "Input": "Let s be (2 - 5)/(6/(-4)). Let i(t) be the first derivative of -s - t + t**4 - 14*t**3 + 14*t**3. Differentiate i(j) with respect to j.", - "Output Program": [ - "from sympy import *\ns = (2 - 5)/(6/(-4))\nt = symbols(\"t\")\ndef u(t):\n\treturn -s - t + t**4 - 14*t**3 + 14*t**3\ndef i(val):\n\treturn diff(-s - t + t**4 - 14*t**3 + 14*t**3, t, 1).subs(t, val)\nj = symbols(\"j\")\nsolution = diff(i(j), j, 1)\nprint(solution)" - ], - "Output Answer": [ - "12*j**2" - ], - "split": "dev" - }, - { - "Input": "Let t(q) be the third derivative of -q**5/20 + q**4/12 + q**3/6 + 9*q**2. What is t(-1)?", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef p(q):\n\treturn -q**5/20 + q**4/12 + q**3/6 + 9*q**2\ndef t(val):\n\treturn diff(-q**5/20 + q**4/12 + q**3/6 + 9*q**2, q, 3).subs(q, val)\nprint(t(-1))" - ], - "Output Answer": [ - "-4" - ], - "split": "dev" - }, - { - "Input": "What is the third derivative of -155*c**2*p**5 - 23*c**2 + c*p**2 wrt p?", - "Output Program": [ - "from sympy import *\np, c = symbols(\"p c\")\ndef u(p, c):\n\treturn -155*c**2*p**5 - 23*c**2 + c*p**2\np = symbols(\"p\")\nsolution = diff(-155*c**2*p**5 - 23*c**2 + c*p**2, p, 3)\nprint(solution)" - ], - "Output Answer": [ - "-9300*c**2*p**2" - ], - "split": "dev" - }, - { - "Input": "Suppose c + 2 = 4*f, 2*c - 5*c + 9 = 3*f. Find the third derivative of -4*z**c - 15*z**2 - 23*z**4 + 11*z**2 wrt z.", - "Output Program": [ - "from sympy import *\nc, f = symbols(\"c f\")\nc = solve([Eq(c + 2, 4*f), Eq(2*c - 5*c + 9, 3*f)])[c]\nz = symbols(\"z\")\ndef s(z):\n\treturn -4*z**c - 15*z**2 - 23*z**4 + 11*z**2\nz = symbols(\"z\")\nsolution = diff(-4*z**c - 15*z**2 - 23*z**4 + 11*z**2, z, 3)\nprint(solution)" - ], - "Output Answer": [ - "-552*z" - ], - "split": "dev" - }, - { - "Input": "Find the third derivative of 19735*h*j**3*x**2 - 3*h*j**2*x**3 - 2*h*j*x**3 + j**3*x**3 + j**3*x - 14*j**2*x**3 + 10*j**2*x**2 wrt j.", - "Output Program": [ - "from sympy import *\nj, x, h = symbols(\"j x h\")\ndef i(j, x, h):\n\treturn 19735*h*j**3*x**2 - 3*h*j**2*x**3 - 2*h*j*x**3 + j**3*x**3 + j**3*x - 14*j**2*x**3 + 10*j**2*x**2\nj = symbols(\"j\")\nsolution = diff(19735*h*j**3*x**2 - 3*h*j**2*x**3 - 2*h*j*x**3 + j**3*x**3 + j**3*x - 14*j**2*x**3 + 10*j**2*x**2, j, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*x*(19735*h*x + x**2 + 1)" - ], - "split": "dev" - }, - { - "Input": "Let r be -3 - 0 - (4 + -9). Let j(a) be the second derivative of 0 + 1/3*a**3 + 0*a**r - 2*a + 1/20*a**5 - 1/4*a**4. Let j(o) = 0. Calculate o.", - "Output Program": [ - "from sympy import *\nr = -3 - 0 - (4 + -9)\na = symbols(\"a\")\ndef g(a):\n\treturn 0 + 1/3*a**3 + 0*a**r - 2*a + 1/20*a**5 - 1/4*a**4\ndef j(val):\n\treturn diff(0 + 1/3*a**3 + 0*a**r - 2*a + 1/20*a**5 - 1/4*a**4, a, 2).subs(a, val)\no = symbols(\"o\")\no = solve(j(o))\nprint(o)" - ], - "Output Answer": [ - "[0.0, 1.00000000000000, 2.00000000000000]" - ], - "split": "dev" - }, - { - "Input": "What is the third derivative of -1243756*y**3 + 88968*y**2 + 5 wrt y?", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef m(y):\n\treturn -1243756*y**3 + 88968*y**2 + 5\ny = symbols(\"y\")\nsolution = diff(-1243756*y**3 + 88968*y**2 + 5, y, 3)\nprint(solution)" - ], - "Output Answer": [ - "-7462536" - ], - "split": "dev" - }, - { - "Input": "Let n(t) be the first derivative of 2*t**5/5 + 35*t**4/2 - 405*t**3 + 440. What is the third derivative of n(i) wrt i?", - "Output Program": [ - "from sympy import *\nt = symbols(\"t\")\ndef y(t):\n\treturn 2*t**5/5 + 35*t**4/2 - 405*t**3 + 440\ndef n(val):\n\treturn diff(2*t**5/5 + 35*t**4/2 - 405*t**3 + 440, t, 1).subs(t, val)\ni = symbols(\"i\")\nsolution = diff(n(i), i, 3)\nprint(solution)" - ], - "Output Answer": [ - "12*(4*i + 35)" - ], - "split": "dev" - }, - { - "Input": "Find the second derivative of -49667443*c**3 + 196929996*c.", - "Output Program": [ - "from sympy import *\nc = symbols(\"c\")\ndef x(c):\n\treturn -49667443*c**3 + 196929996*c\nc = symbols(\"c\")\nsolution = diff(-49667443*c**3 + 196929996*c, c, 2)\nprint(solution)" - ], - "Output Answer": [ - "-298004658*c" - ], - "split": "dev" - }, - { - "Input": "Let k(z) be the first derivative of -2*z**3/3 + 42*z**2 - 882*z - 120. Let k(f) = 0. What is f?", - "Output Program": [ - "from sympy import *\nz = symbols(\"z\")\ndef a(z):\n\treturn -2*z**3/3 + 42*z**2 - 882*z - 120\ndef k(val):\n\treturn diff(-2*z**3/3 + 42*z**2 - 882*z - 120, z, 1).subs(z, val)\nf = symbols(\"f\")\nf = solve(k(f))\nprint(f)" - ], - "Output Answer": [ - "[21]" - ], - "split": "dev" - }, - { - "Input": "Let o(u) be the second derivative of 1/96*u**4 + 169/16*u**2 + 0 - 31*u - 13/24*u**3. Factor o(l).", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef h(u):\n\treturn 1/96*u**4 + 169/16*u**2 + 0 - 31*u - 13/24*u**3\ndef o(val):\n\treturn diff(1/96*u**4 + 169/16*u**2 + 0 - 31*u - 13/24*u**3, u, 2).subs(u, val)\nl = symbols(\"l\")\neq = factor(o(l))\nprint(eq)" - ], - "Output Answer": [ - "21.125*(0.0769230769230769*l - 1.0)**2" - ], - "split": "dev" - }, - { - "Input": "Differentiate -6967582*o**4 - 5*o**2 - 35463058 wrt o.", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef i(o):\n\treturn -6967582*o**4 - 5*o**2 - 35463058\no = symbols(\"o\")\nsolution = diff(-6967582*o**4 - 5*o**2 - 35463058, o, 1)\nprint(solution)" - ], - "Output Answer": [ - "-27870328*o**3 - 10*o" - ], - "split": "dev" - }, - { - "Input": "Let q(f) be the third derivative of 13*f**5/60 + 7*f**4/24 + 31*f**3/6 - 36*f**2. Is q(12) a composite number?", - "Output Program": [ - "from sympy import *\nf = symbols(\"f\")\ndef y(f):\n\treturn 13*f**5/60 + 7*f**4/24 + 31*f**3/6 - 36*f**2\ndef q(val):\n\treturn diff(13*f**5/60 + 7*f**4/24 + 31*f**3/6 - 36*f**2, f, 3).subs(f, val)\nx = q(12)\nprint(not isprime(1987))" - ], - "Output Answer": [ - "False" - ], - "split": "dev" - }, - { - "Input": "Let j(x) be the third derivative of x**6/60 + x**5/12 + 7*x**2. What is the third derivative of j(n) wrt n?", - "Output Program": [ - "from sympy import *\nx = symbols(\"x\")\ndef z(x):\n\treturn x**6/60 + x**5/12 + 7*x**2\ndef j(val):\n\treturn diff(x**6/60 + x**5/12 + 7*x**2, x, 3).subs(x, val)\nn = symbols(\"n\")\nsolution = diff(j(n), n, 3)\nprint(solution)" - ], - "Output Answer": [ - "12" - ], - "split": "dev" - }, - { - "Input": "Let x(k) be the first derivative of 15*k + 0*k**3 - 10 + 5/4*k**4 + 0*k**2. Differentiate x(w) wrt w.", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef n(k):\n\treturn 15*k + 0*k**3 - 10 + 5/4*k**4 + 0*k**2\ndef x(val):\n\treturn diff(15*k + 0*k**3 - 10 + 5/4*k**4 + 0*k**2, k, 1).subs(k, val)\nw = symbols(\"w\")\nsolution = diff(x(w), w, 1)\nprint(solution)" - ], - "Output Answer": [ - "15.0*w**2" - ], - "split": "dev" - }, - { - "Input": "Let q(p) = p**2 - 6*p + 1. Let l be q(6). Suppose -x + l = -1. Differentiate -2*y**4 + 0*y**x + 1 + 0*y**2 + 2 with respect to y.", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef q(p):\n\treturn p**2 - 6*p + 1\nl = q(6)\nx = symbols(\"x\")\nx = solve([Eq(-x + l, -1)])[x]\ny = symbols(\"y\")\ndef a(y):\n\treturn -2*y**4 + 0*y**x + 1 + 0*y**2 + 2\ny = symbols(\"y\")\nsolution = diff(-2*y**4 + 0*y**x + 1 + 0*y**2 + 2, y, 1)\nprint(solution)" - ], - "Output Answer": [ - "-8*y**3" - ], - "split": "dev" - }, - { - "Input": "Suppose -3*w + 101 = 2*a, -25*a + 23*a + 104 = 2*w. Find the third derivative of a - 1065*j**6 + 1096*j**6 - 2*j**2 + 0*j**2 wrt j.", - "Output Program": [ - "from sympy import *\na, w = symbols(\"a w\")\na = solve([Eq(-3*w + 101, 2*a), Eq(-25*a + 23*a + 104, 2*w)])[a]\nj = symbols(\"j\")\ndef g(j):\n\treturn a - 1065*j**6 + 1096*j**6 - 2*j**2 + 0*j**2\nj = symbols(\"j\")\nsolution = diff(a - 1065*j**6 + 1096*j**6 - 2*j**2 + 0*j**2, j, 3)\nprint(solution)" - ], - "Output Answer": [ - "3720*j**3" - ], - "split": "dev" - }, - { - "Input": "Differentiate -77312*b**4 - 74184.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef o(b):\n\treturn -77312*b**4 - 74184\nb = symbols(\"b\")\nsolution = diff(-77312*b**4 - 74184, b, 1)\nprint(solution)" - ], - "Output Answer": [ - "-309248*b**3" - ], - "split": "dev" - }, - { - "Input": "Let f = -2 + 5. Let p(w) be the first derivative of w**3/3 - w**2 + w + 24. Let k be p(f). Let o(h) = -h**3 + 3*h**2 + 3*h - 3. Determine o(k).", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef o(h):\n\treturn -h**3 + 3*h**2 + 3*h - 3\nw = symbols(\"w\")\ndef y(w):\n\treturn w**3/3 - w**2 + w + 24\ndef p(val):\n\treturn diff(w**3/3 - w**2 + w + 24, w, 1).subs(w, val)\nf = -2 + 5\nk = p(f)\nprint(o(k))" - ], - "Output Answer": [ - "-7" - ], - "split": "dev" - }, - { - "Input": "Let n(y) be the first derivative of -y**3/3 + 2*y**2 - 2*y + 41. Give n(2).", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef r(y):\n\treturn -y**3/3 + 2*y**2 - 2*y + 41\ndef n(val):\n\treturn diff(-y**3/3 + 2*y**2 - 2*y + 41, y, 1).subs(y, val)\nprint(n(2))" - ], - "Output Answer": [ - "2" - ], - "split": "dev" - }, - { - "Input": "Let n(v) be the third derivative of -v**6/120 + 47*v**5/60 + 3*v**4/4 + 4697*v**3/6 + 4259*v**2. What is the derivative of n(j) wrt j?", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef d(v):\n\treturn -v**6/120 + 47*v**5/60 + 3*v**4/4 + 4697*v**3/6 + 4259*v**2\ndef n(val):\n\treturn diff(-v**6/120 + 47*v**5/60 + 3*v**4/4 + 4697*v**3/6 + 4259*v**2, v, 3).subs(v, val)\nj = symbols(\"j\")\nsolution = diff(n(j), j, 1)\nprint(solution)" - ], - "Output Answer": [ - "-3*j**2 + 94*j + 18" - ], - "split": "dev" - }, - { - "Input": "Let g(j) be the second derivative of 3*j**8/56 + 157*j**6/30 + 151*j**4/6 + 147*j + 3. What is the third derivative of g(w) wrt w?", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef n(j):\n\treturn 3*j**8/56 + 157*j**6/30 + 151*j**4/6 + 147*j + 3\ndef g(val):\n\treturn diff(3*j**8/56 + 157*j**6/30 + 151*j**4/6 + 147*j + 3, j, 2).subs(j, val)\nw = symbols(\"w\")\nsolution = diff(g(w), w, 3)\nprint(solution)" - ], - "Output Answer": [ - "12*w*(30*w**2 + 314)" - ], - "split": "dev" - }, - { - "Input": "Let j(b) be the second derivative of b**5/20 + 7*b**4/12 + b**2 - 2*b. Let y = -27 + 28. Calculate the remainder when j(-7) is divided by y.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef u(b):\n\treturn b**5/20 + 7*b**4/12 + b**2 - 2*b\ndef j(val):\n\treturn diff(b**5/20 + 7*b**4/12 + b**2 - 2*b, b, 2).subs(b, val)\np = j(-7)\ny = -27 + 28\nprint(p % y)" - ], - "Output Answer": [ - "0" - ], - "split": "dev" - }, - { - "Input": "What is the third derivative of -218*f**2 + 118*f**2 + 401*f + 80*f**3 + 102*f**2 + 219*f wrt f?", - "Output Program": [ - "from sympy import *\nf = symbols(\"f\")\ndef k(f):\n\treturn -218*f**2 + 118*f**2 + 401*f + 80*f**3 + 102*f**2 + 219*f\nf = symbols(\"f\")\nsolution = diff(-218*f**2 + 118*f**2 + 401*f + 80*f**3 + 102*f**2 + 219*f, f, 3)\nprint(solution)" - ], - "Output Answer": [ - "480" - ], - "split": "dev" - }, - { - "Input": "Find the second derivative of 634777*c**3*u**3 + c**2*u**3 + 2*c*u**2 - 3*c + u**3 + 1273*u**2 + 46*u wrt c.", - "Output Program": [ - "from sympy import *\nu, c = symbols(\"u c\")\ndef s(u, c):\n\treturn 634777*c**3*u**3 + c**2*u**3 + 2*c*u**2 - 3*c + u**3 + 1273*u**2 + 46*u\nc = symbols(\"c\")\nsolution = diff(634777*c**3*u**3 + c**2*u**3 + 2*c*u**2 - 3*c + u**3 + 1273*u**2 + 46*u, c, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*u**3*(1904331*c + 1)" - ], - "split": "dev" - }, - { - "Input": "Find the second derivative of -l**2*r**2 - 2*l**2*r + 50989*l**2 + 788*l*r**3 + 2*l wrt r.", - "Output Program": [ - "from sympy import *\nr, l = symbols(\"r l\")\ndef d(r, l):\n\treturn -l**2*r**2 - 2*l**2*r + 50989*l**2 + 788*l*r**3 + 2*l\nr = symbols(\"r\")\nsolution = diff(-l**2*r**2 - 2*l**2*r + 50989*l**2 + 788*l*r**3 + 2*l, r, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*l*(-l + 2364*r)" - ], - "split": "dev" - }, - { - "Input": "Let s(k) be the first derivative of -3*k**5/20 + 105*k**4/16 - 99*k**3 + 486*k**2 + 1296*k + 1362. Factor s(l).", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef v(k):\n\treturn -3*k**5/20 + 105*k**4/16 - 99*k**3 + 486*k**2 + 1296*k + 1362\ndef s(val):\n\treturn diff(-3*k**5/20 + 105*k**4/16 - 99*k**3 + 486*k**2 + 1296*k + 1362, k, 1).subs(k, val)\nl = symbols(\"l\")\neq = factor(s(l))\nprint(eq)" - ], - "Output Answer": [ - "-3*(l - 12)**3*(l + 1)/4" - ], - "split": "dev" - }, - { - "Input": "Let f(t) be the third derivative of t**7/140 + 3*t**6/80 - 3*t**5/40 - 11*t**4/16 - 3*t**3/2 + 37*t**2. Solve f(h) = 0.", - "Output Program": [ - "from sympy import *\nt = symbols(\"t\")\ndef r(t):\n\treturn t**7/140 + 3*t**6/80 - 3*t**5/40 - 11*t**4/16 - 3*t**3/2 + 37*t**2\ndef f(val):\n\treturn diff(t**7/140 + 3*t**6/80 - 3*t**5/40 - 11*t**4/16 - 3*t**3/2 + 37*t**2, t, 3).subs(t, val)\nh = symbols(\"h\")\nh = solve(f(h))\nprint(h)" - ], - "Output Answer": [ - "[-3, -1, 2]" - ], - "split": "dev" - }, - { - "Input": "Let b(d) be the third derivative of d**5/300 + d**4/40 + d**3/15 + 634*d**2. Solve b(k) = 0 for k.", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef w(d):\n\treturn d**5/300 + d**4/40 + d**3/15 + 634*d**2\ndef b(val):\n\treturn diff(d**5/300 + d**4/40 + d**3/15 + 634*d**2, d, 3).subs(d, val)\nk = symbols(\"k\")\nk = solve(b(k))\nprint(k)" - ], - "Output Answer": [ - "[-2, -1]" - ], - "split": "dev" - }, - { - "Input": "Find the third derivative of 408*d**2*r**4 + 2*d**2 - 170*d*r**4 + 2*d*r**2 - 1732*d*r + d - 7 wrt r.", - "Output Program": [ - "from sympy import *\nr, d = symbols(\"r d\")\ndef m(r, d):\n\treturn 408*d**2*r**4 + 2*d**2 - 170*d*r**4 + 2*d*r**2 - 1732*d*r + d - 7\nr = symbols(\"r\")\nsolution = diff(408*d**2*r**4 + 2*d**2 - 170*d*r**4 + 2*d*r**2 - 1732*d*r + d - 7, r, 3)\nprint(solution)" - ], - "Output Answer": [ - "816*d*r*(12*d - 5)" - ], - "split": "dev" - }, - { - "Input": "What is the third derivative of 1109*r**3 + 5558*r**2 + 4*r wrt r?", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef w(r):\n\treturn 1109*r**3 + 5558*r**2 + 4*r\nr = symbols(\"r\")\nsolution = diff(1109*r**3 + 5558*r**2 + 4*r, r, 3)\nprint(solution)" - ], - "Output Answer": [ - "6654" - ], - "split": "dev" - }, - { - "Input": "Let b(m) = -m**3 - 12*m**2 + 6*m - 59. Let l be b(-13). What is the third derivative of 80*w**6 + 201*w**2 + 150*w**6 - l*w**6 wrt w?", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\ndef b(m):\n\treturn -m**3 - 12*m**2 + 6*m - 59\nl = b(-13)\nw = symbols(\"w\")\ndef u(w):\n\treturn 80*w**6 + 201*w**2 + 150*w**6 - l*w**6\nw = symbols(\"w\")\nsolution = diff(80*w**6 + 201*w**2 + 150*w**6 - l*w**6, w, 3)\nprint(solution)" - ], - "Output Answer": [ - "23760*w**3" - ], - "split": "dev" - }, - { - "Input": "What is the derivative of 15*q*x + 3*q + 320*x wrt q?", - "Output Program": [ - "from sympy import *\nq, x = symbols(\"q x\")\ndef h(q, x):\n\treturn 15*q*x + 3*q + 320*x\nq = symbols(\"q\")\nsolution = diff(15*q*x + 3*q + 320*x, q, 1)\nprint(solution)" - ], - "Output Answer": [ - "15*x + 3" - ], - "split": "dev" - }, - { - "Input": "Let c(i) be the first derivative of 0*i**3 - 15/2*i**2 + 0*i - 11/2*i**4 - 18. Find the second derivative of c(v) wrt v.", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef a(i):\n\treturn 0*i**3 - 15/2*i**2 + 0*i - 11/2*i**4 - 18\ndef c(val):\n\treturn diff(0*i**3 - 15/2*i**2 + 0*i - 11/2*i**4 - 18, i, 1).subs(i, val)\nv = symbols(\"v\")\nsolution = diff(c(v), v, 2)\nprint(solution)" - ], - "Output Answer": [ - "-132.0*v" - ], - "split": "dev" - }, - { - "Input": "Let w be (0 - (-6)/5)/((-9)/(-30)). Find the first derivative of 31 + 10*q**4 + 28*q**4 - 3*q**w wrt q.", - "Output Program": [ - "from sympy import *\nw = (0 - (-6)/5)/((-9)/(-30))\nq = symbols(\"q\")\ndef j(q):\n\treturn 31 + 10*q**4 + 28*q**4 - 3*q**w\nq = symbols(\"q\")\nsolution = diff(31 + 10*q**4 + 28*q**4 - 3*q**w, q, 1)\nprint(solution)" - ], - "Output Answer": [ - "152*q**3 - 12.0*q**3.0" - ], - "split": "dev" - }, - { - "Input": "Suppose -4*d - 95 - 17 = 0. Let c be (-4)/d - 188/(-7). Differentiate 3*o**3 - 12*o**3 + c - 28 with respect to o.", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\nd = solve([Eq(-4*d - 95 - 17, 0)])[d]\nc = (-4)/d - 188/(-7)\no = symbols(\"o\")\ndef s(o):\n\treturn 3*o**3 - 12*o**3 + c - 28\no = symbols(\"o\")\nsolution = diff(3*o**3 - 12*o**3 + c - 28, o, 1)\nprint(solution)" - ], - "Output Answer": [ - "-27*o**2" - ], - "split": "dev" - }, - { - "Input": "What is the third derivative of 735*s**4 - s**3 - 378*s**2?", - "Output Program": [ - "from sympy import *\ns = symbols(\"s\")\ndef q(s):\n\treturn 735*s**4 - s**3 - 378*s**2\ns = symbols(\"s\")\nsolution = diff(735*s**4 - s**3 - 378*s**2, s, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*(2940*s - 1)" - ], - "split": "dev" - }, - { - "Input": "Let q(m) be the second derivative of m**5/20 - m**4/4 - m**3/3 + m**2/2 + 23*m + 1. Suppose 6*d - 2*d = 8. Give q(d).", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\ndef k(m):\n\treturn m**5/20 - m**4/4 - m**3/3 + m**2/2 + 23*m + 1\ndef q(val):\n\treturn diff(m**5/20 - m**4/4 - m**3/3 + m**2/2 + 23*m + 1, m, 2).subs(m, val)\nd = symbols(\"d\")\nd = solve([Eq(6*d - 2*d, 8)])[d]\nprint(q(d))" - ], - "Output Answer": [ - "-7" - ], - "split": "dev" - }, - { - "Input": "Let s(w) = 51*w**4 - 21*w**3 - 21*w**2 + 81. Let g(z) = 10*z**4 - 4*z**3 - 4*z**2 + 16. Let j(d) = -21*g(d) + 4*s(d). Differentiate j(o) wrt o.", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef s(w):\n\treturn 51*w**4 - 21*w**3 - 21*w**2 + 81\nz = symbols(\"z\")\ndef g(z):\n\treturn 10*z**4 - 4*z**3 - 4*z**2 + 16\ndef j(d):\n\treturn -21*g(d) + 4*s(d)\no = symbols(\"o\")\nsolution = diff(j(o), o, 1)\nprint(solution)" - ], - "Output Answer": [ - "-24*o**3" - ], - "split": "dev" - }, - { - "Input": "Differentiate 157*x - 327 with respect to x.", - "Output Program": [ - "from sympy import *\nx = symbols(\"x\")\ndef v(x):\n\treturn 157*x - 327\nx = symbols(\"x\")\nsolution = diff(157*x - 327, x, 1)\nprint(solution)" - ], - "Output Answer": [ - "157" - ], - "split": "dev" - }, - { - "Input": "Let c = 23 + -67. Let u be (3*1)/((-33)/c). What is the second derivative of u*t - 5*t**2 + 0 + 0 - 7*t wrt t?", - "Output Program": [ - "from sympy import *\nc = 23 + -67\nu = (3*1)/((-33)/c)\nt = symbols(\"t\")\ndef n(t):\n\treturn u*t - 5*t**2 + 0 + 0 - 7*t\nt = symbols(\"t\")\nsolution = diff(u*t - 5*t**2 + 0 + 0 - 7*t, t, 2)\nprint(solution)" - ], - "Output Answer": [ - "-10" - ], - "split": "dev" - }, - { - "Input": "Let l be -19 - -12 - 85/(-12). Let t(n) be the third derivative of -l*n**4 + 8*n**2 + 0*n + 0 - 1/20*n**5 - 1/3*n**3. What is t(-2)?", - "Output Program": [ - "from sympy import *\nl = -19 - -12 - 85/(-12)\nn = symbols(\"n\")\ndef z(n):\n\treturn -l*n**4 + 8*n**2 + 0*n + 0 - 1/20*n**5 - 1/3*n**3\ndef t(val):\n\treturn diff(-l*n**4 + 8*n**2 + 0*n + 0 - 1/20*n**5 - 1/3*n**3, n, 3).subs(n, val)\nprint(t(-2))" - ], - "Output Answer": [ - "-10.0000000000000" - ], - "split": "dev" - }, - { - "Input": "Suppose -1 = -i + 1. What is the second derivative of -u**3 + 0 + 6*u - i + 2 wrt u?", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ni = solve([Eq(-1, -i + 1)])[i]\nu = symbols(\"u\")\ndef p(u):\n\treturn -u**3 + 0 + 6*u - i + 2\nu = symbols(\"u\")\nsolution = diff(-u**3 + 0 + 6*u - i + 2, u, 2)\nprint(solution)" - ], - "Output Answer": [ - "-6*u" - ], - "split": "dev" - }, - { - "Input": "Find the second derivative of 36*f*o*u**2 - 8*f*o*u + 11201*f*o - f*u**2 - f*u + 1036*o*u**2 - 3*o*u + 12*u**2 wrt u.", - "Output Program": [ - "from sympy import *\no, f, u = symbols(\"o f u\")\ndef x(o, f, u):\n\treturn 36*f*o*u**2 - 8*f*o*u + 11201*f*o - f*u**2 - f*u + 1036*o*u**2 - 3*o*u + 12*u**2\nu = symbols(\"u\")\nsolution = diff(36*f*o*u**2 - 8*f*o*u + 11201*f*o - f*u**2 - f*u + 1036*o*u**2 - 3*o*u + 12*u**2, u, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(36*f*o - f + 1036*o + 12)" - ], - "split": "dev" - }, - { - "Input": "What is the first derivative of 7*b*j**3 + 2032*b + 236*j**3 + j**2 - 3 wrt j?", - "Output Program": [ - "from sympy import *\nb, j = symbols(\"b j\")\ndef f(b, j):\n\treturn 7*b*j**3 + 2032*b + 236*j**3 + j**2 - 3\nj = symbols(\"j\")\nsolution = diff(7*b*j**3 + 2032*b + 236*j**3 + j**2 - 3, j, 1)\nprint(solution)" - ], - "Output Answer": [ - "21*b*j**2 + 708*j**2 + 2*j" - ], - "split": "dev" - }, - { - "Input": "Find the second derivative of 57*w - 1328*w**2 - 290*w - 958*w wrt w.", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef c(w):\n\treturn 57*w - 1328*w**2 - 290*w - 958*w\nw = symbols(\"w\")\nsolution = diff(57*w - 1328*w**2 - 290*w - 958*w, w, 2)\nprint(solution)" - ], - "Output Answer": [ - "-2656" - ], - "split": "dev" - }, - { - "Input": "Find the third derivative of -5*g*i**4 - 48*g*i**3 - g*i**2 - 2*g*i - 1541*g + 21*i**4 - 5*i**3 - 111*i**2 wrt i.", - "Output Program": [ - "from sympy import *\ni, g = symbols(\"i g\")\ndef l(i, g):\n\treturn -5*g*i**4 - 48*g*i**3 - g*i**2 - 2*g*i - 1541*g + 21*i**4 - 5*i**3 - 111*i**2\ni = symbols(\"i\")\nsolution = diff(-5*g*i**4 - 48*g*i**3 - g*i**2 - 2*g*i - 1541*g + 21*i**4 - 5*i**3 - 111*i**2, i, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*(-20*g*i - 48*g + 84*i - 5)" - ], - "split": "dev" - }, - { - "Input": "Let r(p) be the first derivative of 1/3*p**3 + 6 + 8*p - 9/2*p**2. Let o be r(8). Is 1/3 less than or equal to o?", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef t(p):\n\treturn 1/3*p**3 + 6 + 8*p - 9/2*p**2\ndef r(val):\n\treturn diff(1/3*p**3 + 6 + 8*p - 9/2*p**2, p, 1).subs(p, val)\no = r(8)\nprint(1/3 <= o)" - ], - "Output Answer": [ - "False" - ], - "split": "dev" - }, - { - "Input": "Let j(d) be the third derivative of d**5/15 - d**4/8 - 17*d**3/6 - 4*d**2. Let f be 12/10*((-112)/(-12) + -6). Is j(f) a multiple of 7?", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef b(d):\n\treturn d**5/15 - d**4/8 - 17*d**3/6 - 4*d**2\ndef j(val):\n\treturn diff(d**5/15 - d**4/8 - 17*d**3/6 - 4*d**2, d, 3).subs(d, val)\nf = 12/10*((-112)/(-12) + -6)\nk = j(f)\nprint(35 % 7 == 0)" - ], - "Output Answer": [ - "True" - ], - "split": "dev" - }, - { - "Input": "Differentiate 2*k**4 + 89783*k - 10630.", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef a(k):\n\treturn 2*k**4 + 89783*k - 10630\nk = symbols(\"k\")\nsolution = diff(2*k**4 + 89783*k - 10630, k, 1)\nprint(solution)" - ], - "Output Answer": [ - "8*k**3 + 89783" - ], - "split": "dev" - }, - { - "Input": "Let h(o) be the third derivative of 2*o**2 + 0*o**5 - 1/60*o**6 + 0*o**3 + 0*o + 0 + 1/6*o**4. What is the second derivative of h(r) wrt r?", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef p(o):\n\treturn 2*o**2 + 0*o**5 - 1/60*o**6 + 0*o**3 + 0*o + 0 + 1/6*o**4\ndef h(val):\n\treturn diff(2*o**2 + 0*o**5 - 1/60*o**6 + 0*o**3 + 0*o + 0 + 1/6*o**4, o, 3).subs(o, val)\nr = symbols(\"r\")\nsolution = diff(h(r), r, 2)\nprint(solution)" - ], - "Output Answer": [ - "-12.0*r" - ], - "split": "dev" - }, - { - "Input": "Find the third derivative of 15093*b*g**3 + 622*b*g + g**3 - 2*g**2 wrt g.", - "Output Program": [ - "from sympy import *\ng, b = symbols(\"g b\")\ndef s(g, b):\n\treturn 15093*b*g**3 + 622*b*g + g**3 - 2*g**2\ng = symbols(\"g\")\nsolution = diff(15093*b*g**3 + 622*b*g + g**3 - 2*g**2, g, 3)\nprint(solution)" - ], - "Output Answer": [ - "6*(15093*b + 1)" - ], - "split": "dev" - }, - { - "Input": "Let c(o) be the second derivative of -5*o**4/6 - 51*o**2 - 4*o + 1. What is the first derivative of c(x) wrt x?", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef f(o):\n\treturn -5*o**4/6 - 51*o**2 - 4*o + 1\ndef c(val):\n\treturn diff(-5*o**4/6 - 51*o**2 - 4*o + 1, o, 2).subs(o, val)\nx = symbols(\"x\")\nsolution = diff(c(x), x, 1)\nprint(solution)" - ], - "Output Answer": [ - "-20*x" - ], - "split": "dev" - }, - { - "Input": "Let s = -183 - -116. Let p = s - -508. Find the third derivative of -441*i + p*i - 12*i**3 - 6*i**2 wrt i.", - "Output Program": [ - "from sympy import *\ns = -183 - -116\np = s - -508\ni = symbols(\"i\")\ndef d(i):\n\treturn -441*i + p*i - 12*i**3 - 6*i**2\ni = symbols(\"i\")\nsolution = diff(-441*i + p*i - 12*i**3 - 6*i**2, i, 3)\nprint(solution)" - ], - "Output Answer": [ - "-72" - ], - "split": "test" - }, - { - "Input": "Let r(b) be the first derivative of b**6/6 - b**4/2 + b**2/2 - 4. Find n such that r(n) = 0.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef y(b):\n\treturn b**6/6 - b**4/2 + b**2/2 - 4\ndef r(val):\n\treturn diff(b**6/6 - b**4/2 + b**2/2 - 4, b, 1).subs(b, val)\nn = symbols(\"n\")\nn = solve(r(n))\nprint(n)" - ], - "Output Answer": [ - "[-1, 0, 1]" - ], - "split": "test" - }, - { - "Input": "Let d(j) = -4*j**2 + 8*j. Let f(w) = -13*w**2 + 25*w. Suppose 5*z = z - 32. Let u(b) = z*d(b) + 3*f(b). What is the second derivative of u(a) wrt a?", - "Output Program": [ - "from sympy import *\nz = symbols(\"z\")\nz = solve([Eq(5*z, z - 32)])[z]\nj = symbols(\"j\")\ndef d(j):\n\treturn -4*j**2 + 8*j\nw = symbols(\"w\")\ndef f(w):\n\treturn -13*w**2 + 25*w\ndef u(b):\n\treturn z*d(b) + 3*f(b)\na = symbols(\"a\")\nsolution = diff(u(a), a, 2)\nprint(solution)" - ], - "Output Answer": [ - "-14" - ], - "split": "test" - }, - { - "Input": "What is the first derivative of 3858286 - 19632755*w**2?", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef q(w):\n\treturn 3858286 - 19632755*w**2\nw = symbols(\"w\")\nsolution = diff(3858286 - 19632755*w**2, w, 1)\nprint(solution)" - ], - "Output Answer": [ - "-39265510*w" - ], - "split": "test" - }, - { - "Input": "What is the first derivative of -b*o*q - 9*b*o + 100506*b + o*q + 715*o + q wrt o?", - "Output Program": [ - "from sympy import *\no, q, b = symbols(\"o q b\")\ndef u(o, q, b):\n\treturn -b*o*q - 9*b*o + 100506*b + o*q + 715*o + q\no = symbols(\"o\")\nsolution = diff(-b*o*q - 9*b*o + 100506*b + o*q + 715*o + q, o, 1)\nprint(solution)" - ], - "Output Answer": [ - "-b*q - 9*b + q + 715" - ], - "split": "test" - }, - { - "Input": "Suppose 0 = 2*a - 0*a - 160. Suppose -4*v + 4*n + n = -a, 27 = v - 3*n. What is the second derivative of v*y - 7*y - 4*y**2 - 9*y wrt y?", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\na = solve([Eq(0, 2*a - 0*a - 160)])[a]\nv, n = symbols(\"v n\")\nv = solve([Eq(-4*v + 4*n + n, -a), Eq(27, v - 3*n)])[v]\ny = symbols(\"y\")\ndef d(y):\n\treturn v*y - 7*y - 4*y**2 - 9*y\ny = symbols(\"y\")\nsolution = diff(v*y - 7*y - 4*y**2 - 9*y, y, 2)\nprint(solution)" - ], - "Output Answer": [ - "-8" - ], - "split": "test" - }, - { - "Input": "What is the first derivative of 504*r - 574 - 1196*r**3 - 504*r wrt r?", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef m(r):\n\treturn 504*r - 574 - 1196*r**3 - 504*r\nr = symbols(\"r\")\nsolution = diff(504*r - 574 - 1196*r**3 - 504*r, r, 1)\nprint(solution)" - ], - "Output Answer": [ - "-3588*r**2" - ], - "split": "test" - }, - { - "Input": "Let v(b) be the first derivative of 2*b**5 - b**4/4 - 40*b - 52. What is the derivative of v(q) wrt q?", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef h(b):\n\treturn 2*b**5 - b**4/4 - 40*b - 52\ndef v(val):\n\treturn diff(2*b**5 - b**4/4 - 40*b - 52, b, 1).subs(b, val)\nq = symbols(\"q\")\nsolution = diff(v(q), q, 1)\nprint(solution)" - ], - "Output Answer": [ - "40*q**3 - 3*q**2" - ], - "split": "test" - }, - { - "Input": "Let m(r) be the second derivative of r**6/15 - 11*r**4/4 + 353*r**3/2 + r**2/2 - 148*r. Find the second derivative of m(s) wrt s.", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef v(r):\n\treturn r**6/15 - 11*r**4/4 + 353*r**3/2 + r**2/2 - 148*r\ndef m(val):\n\treturn diff(r**6/15 - 11*r**4/4 + 353*r**3/2 + r**2/2 - 148*r, r, 2).subs(r, val)\ns = symbols(\"s\")\nsolution = diff(m(s), s, 2)\nprint(solution)" - ], - "Output Answer": [ - "6*(4*s**2 - 11)" - ], - "split": "test" - }, - { - "Input": "Find the second derivative of 17 + 17 - v**5 + 12*v - 34 wrt v.", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef t(v):\n\treturn 17 + 17 - v**5 + 12*v - 34\nv = symbols(\"v\")\nsolution = diff(17 + 17 - v**5 + 12*v - 34, v, 2)\nprint(solution)" - ], - "Output Answer": [ - "-20*v**3" - ], - "split": "test" - }, - { - "Input": "Let c(l) be the second derivative of l**5/20 + l**4/6 + l**3/6 - l**2/2 + 190*l. Calculate c(-4).", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef j(l):\n\treturn l**5/20 + l**4/6 + l**3/6 - l**2/2 + 190*l\ndef c(val):\n\treturn diff(l**5/20 + l**4/6 + l**3/6 - l**2/2 + 190*l, l, 2).subs(l, val)\nprint(c(-4))" - ], - "Output Answer": [ - "-37" - ], - "split": "test" - }, - { - "Input": "Let i(y) be the second derivative of y**6/30 - 3*y**5/20 - 5*y**4/4 - 17*y**3/6 - 3*y**2 + 2*y + 39. Factor i(m).", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef p(y):\n\treturn y**6/30 - 3*y**5/20 - 5*y**4/4 - 17*y**3/6 - 3*y**2 + 2*y + 39\ndef i(val):\n\treturn diff(y**6/30 - 3*y**5/20 - 5*y**4/4 - 17*y**3/6 - 3*y**2 + 2*y + 39, y, 2).subs(y, val)\nm = symbols(\"m\")\neq = factor(i(m))\nprint(eq)" - ], - "Output Answer": [ - "(m - 6)*(m + 1)**3" - ], - "split": "test" - }, - { - "Input": "Let p(b) be the third derivative of 4*b**7/245 - b**6/60 - 31*b**5/210 - 2*b**4/21 + 4*b**3/21 - 6*b**2. Let p(g) = 0. What is g?", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef l(b):\n\treturn 4*b**7/245 - b**6/60 - 31*b**5/210 - 2*b**4/21 + 4*b**3/21 - 6*b**2\ndef p(val):\n\treturn diff(4*b**7/245 - b**6/60 - 31*b**5/210 - 2*b**4/21 + 4*b**3/21 - 6*b**2, b, 3).subs(b, val)\ng = symbols(\"g\")\ng = solve(p(g))\nprint(g)" - ], - "Output Answer": [ - "[-1, -2/3, 1/4, 2]" - ], - "split": "test" - }, - { - "Input": "Let s = 5548 + -5545. Let v(n) be the first derivative of 0*n - 36/5*n**5 - 5/3*n**6 + 1 + 16/3*n**s + 0*n**2 - 6*n**4. Find b, given that v(b) = 0.", - "Output Program": [ - "from sympy import *\ns = 5548 + -5545\nn = symbols(\"n\")\ndef t(n):\n\treturn 0*n - 36/5*n**5 - 5/3*n**6 + 1 + 16/3*n**s + 0*n**2 - 6*n**4\ndef v(val):\n\treturn diff(0*n - 36/5*n**5 - 5/3*n**6 + 1 + 16/3*n**s + 0*n**2 - 6*n**4, n, 1).subs(n, val)\nb = symbols(\"b\")\nb = solve(v(b))\nprint(b)" - ], - "Output Answer": [ - "[-2.00000000000000, 0.0, 0.400000000000000]" - ], - "split": "test" - }, - { - "Input": "Find the third derivative of -33*d**3*l**2 - d**3 + 2*d**2*l**2 - 3*l**2 + 49*l wrt d.", - "Output Program": [ - "from sympy import *\nl, d = symbols(\"l d\")\ndef q(l, d):\n\treturn -33*d**3*l**2 - d**3 + 2*d**2*l**2 - 3*l**2 + 49*l\nd = symbols(\"d\")\nsolution = diff(-33*d**3*l**2 - d**3 + 2*d**2*l**2 - 3*l**2 + 49*l, d, 3)\nprint(solution)" - ], - "Output Answer": [ - "-6*(33*l**2 + 1)" - ], - "split": "test" - }, - { - "Input": "Let v(g) be the second derivative of -g**4/6 + g**3/2 + g**2 - 18*g - 3. Suppose 0 = 2*a - 11 + 5. Calculate v(a).", - "Output Program": [ - "from sympy import *\ng = symbols(\"g\")\ndef l(g):\n\treturn -g**4/6 + g**3/2 + g**2 - 18*g - 3\ndef v(val):\n\treturn diff(-g**4/6 + g**3/2 + g**2 - 18*g - 3, g, 2).subs(g, val)\na = symbols(\"a\")\na = solve([Eq(0, 2*a - 11 + 5)])[a]\nprint(v(a))" - ], - "Output Answer": [ - "-7" - ], - "split": "test" - }, - { - "Input": "Let g(d) be the first derivative of 0*d + 5 + 0*d**2 + 3/4*d**4 - 5/3*d**3. Find the third derivative of g(q) wrt q.", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef b(d):\n\treturn 0*d + 5 + 0*d**2 + 3/4*d**4 - 5/3*d**3\ndef g(val):\n\treturn diff(0*d + 5 + 0*d**2 + 3/4*d**4 - 5/3*d**3, d, 1).subs(d, val)\nq = symbols(\"q\")\nsolution = diff(g(q), q, 3)\nprint(solution)" - ], - "Output Answer": [ - "18.0000000000000" - ], - "split": "test" - }, - { - "Input": "What is the second derivative of -7*k**2*r**2 + 182*k**2*r*t - 5*k**2*r - k*r*t + 9998*r**3*t + 3*r**3 - 37*r*t + 2*r wrt r?", - "Output Program": [ - "from sympy import *\nk, r, t = symbols(\"k r t\")\ndef w(k, r, t):\n\treturn -7*k**2*r**2 + 182*k**2*r*t - 5*k**2*r - k*r*t + 9998*r**3*t + 3*r**3 - 37*r*t + 2*r\nr = symbols(\"r\")\nsolution = diff(-7*k**2*r**2 + 182*k**2*r*t - 5*k**2*r - k*r*t + 9998*r**3*t + 3*r**3 - 37*r*t + 2*r, r, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(-7*k**2 + 29994*r*t + 9*r)" - ], - "split": "test" - }, - { - "Input": "Let x be 3*2*2/6. Find the third derivative of 21*s**2 - 16*s**2 - x*s**4 - 14*s**2 wrt s.", - "Output Program": [ - "from sympy import *\nx = 3*2*2/6\ns = symbols(\"s\")\ndef r(s):\n\treturn 21*s**2 - 16*s**2 - x*s**4 - 14*s**2\ns = symbols(\"s\")\nsolution = diff(21*s**2 - 16*s**2 - x*s**4 - 14*s**2, s, 3)\nprint(solution)" - ], - "Output Answer": [ - "-48.0*s" - ], - "split": "test" - }, - { - "Input": "Suppose w + 0 - 2 = 0. Find the second derivative of -3*j + 8*j**w + 3*j**3 - 8*j**2 wrt j.", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\nw = solve([Eq(w + 0 - 2, 0)])[w]\nj = symbols(\"j\")\ndef m(j):\n\treturn -3*j + 8*j**w + 3*j**3 - 8*j**2\nj = symbols(\"j\")\nsolution = diff(-3*j + 8*j**w + 3*j**3 - 8*j**2, j, 2)\nprint(solution)" - ], - "Output Answer": [ - "18*j" - ], - "split": "test" - }, - { - "Input": "Let o(g) = -g**3 - 4*g**2 + 4*g. Let w be o(-5). Let b = -9 + w. Let k(d) be the first derivative of d**4/4 + d**3 - 5*d**2/2 - 2*d + 1. Calculate k(b).", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef v(d):\n\treturn d**4/4 + d**3 - 5*d**2/2 - 2*d + 1\ndef k(val):\n\treturn diff(d**4/4 + d**3 - 5*d**2/2 - 2*d + 1, d, 1).subs(d, val)\ng = symbols(\"g\")\ndef o(g):\n\treturn -g**3 - 4*g**2 + 4*g\nw = o(-5)\nb = -9 + w\nprint(k(b))" - ], - "Output Answer": [ - "2" - ], - "split": "test" - }, - { - "Input": "Let n(m) = m**6 + m**4 - m**2 + m - 1. Let z(k) = -k**6 - 3*k**4 + k**2 - 49*k + 3. Let u(l) = -3*n(l) - z(l). What is the third derivative of u(s) wrt s?", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef z(k):\n\treturn -k**6 - 3*k**4 + k**2 - 49*k + 3\nm = symbols(\"m\")\ndef n(m):\n\treturn m**6 + m**4 - m**2 + m - 1\ndef u(l):\n\treturn -3*n(l) - z(l)\ns = symbols(\"s\")\nsolution = diff(u(s), s, 3)\nprint(solution)" - ], - "Output Answer": [ - "-240*s**3" - ], - "split": "test" - }, - { - "Input": "Let a be 4/22 - 20*(-18)/(-165). Let d(i) = -1. Let p(h) be the second derivative of h**3/6 + 9*h. Let x(q) = 2*d(q) - 2*p(q). Calculate x(a).", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef d(i):\n\treturn -1\nh = symbols(\"h\")\ndef o(h):\n\treturn h**3/6 + 9*h\ndef p(val):\n\treturn diff(h**3/6 + 9*h, h, 2).subs(h, val)\ndef x(q):\n\treturn 2*d(q) - 2*p(q)\na = 4/22 - 20*(-18)/(-165)\nprint(x(a))" - ], - "Output Answer": [ - "2.00000000000000" - ], - "split": "test" - }, - { - "Input": "What is the third derivative of -11*j**4 + 8514*j**3 - 2813577*j**2 wrt j?", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef x(j):\n\treturn -11*j**4 + 8514*j**3 - 2813577*j**2\nj = symbols(\"j\")\nsolution = diff(-11*j**4 + 8514*j**3 - 2813577*j**2, j, 3)\nprint(solution)" - ], - "Output Answer": [ - "132*(387 - 2*j)" - ], - "split": "test" - }, - { - "Input": "What is the derivative of 25*m**2*r**3 - 2*m**2 - 65*m*r**3 + 3*r**3 + 3272*r**2 + 16*r wrt m?", - "Output Program": [ - "from sympy import *\nr, m = symbols(\"r m\")\ndef l(r, m):\n\treturn 25*m**2*r**3 - 2*m**2 - 65*m*r**3 + 3*r**3 + 3272*r**2 + 16*r\nm = symbols(\"m\")\nsolution = diff(25*m**2*r**3 - 2*m**2 - 65*m*r**3 + 3*r**3 + 3272*r**2 + 16*r, m, 1)\nprint(solution)" - ], - "Output Answer": [ - "50*m*r**3 - 4*m - 65*r**3" - ], - "split": "test" - }, - { - "Input": "Let k(w) = 23*w - 30. Let u(m) = -3 - 59 + 89*m - 32*m - 13. Let c(g) = -12*k(g) + 5*u(g). Find the first derivative of c(p) wrt p.", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\ndef u(m):\n\treturn -3 - 59 + 89*m - 32*m - 13\nw = symbols(\"w\")\ndef k(w):\n\treturn 23*w - 30\ndef c(g):\n\treturn -12*k(g) + 5*u(g)\np = symbols(\"p\")\nsolution = diff(c(p), p, 1)\nprint(solution)" - ], - "Output Answer": [ - "9" - ], - "split": "test" - }, - { - "Input": "Let k(x) be the second derivative of x**7/14 - x**6 + 27*x**5/5 - 29*x**4/2 + 43*x**3/2 - 18*x**2 - 2*x + 9. What is i in k(i) = 0?", - "Output Program": [ - "from sympy import *\nx = symbols(\"x\")\ndef o(x):\n\treturn x**7/14 - x**6 + 27*x**5/5 - 29*x**4/2 + 43*x**3/2 - 18*x**2 - 2*x + 9\ndef k(val):\n\treturn diff(x**7/14 - x**6 + 27*x**5/5 - 29*x**4/2 + 43*x**3/2 - 18*x**2 - 2*x + 9, x, 2).subs(x, val)\ni = symbols(\"i\")\ni = solve(k(i))\nprint(i)" - ], - "Output Answer": [ - "[1, 3, 4]" - ], - "split": "test" - }, - { - "Input": "What is the second derivative of 32*h**4 + 6*h**2 - 66*h - 2 wrt h?", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef k(h):\n\treturn 32*h**4 + 6*h**2 - 66*h - 2\nh = symbols(\"h\")\nsolution = diff(32*h**4 + 6*h**2 - 66*h - 2, h, 2)\nprint(solution)" - ], - "Output Answer": [ - "12*(32*h**2 + 1)" - ], - "split": "test" - }, - { - "Input": "Let w(i) be the first derivative of -3*i**5/20 - 15*i**4/8 - 9*i**3 - 81*i**2/4 - 81*i/4 + 6789. Factor w(u).", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef a(i):\n\treturn -3*i**5/20 - 15*i**4/8 - 9*i**3 - 81*i**2/4 - 81*i/4 + 6789\ndef w(val):\n\treturn diff(-3*i**5/20 - 15*i**4/8 - 9*i**3 - 81*i**2/4 - 81*i/4 + 6789, i, 1).subs(i, val)\nu = symbols(\"u\")\neq = factor(w(u))\nprint(eq)" - ], - "Output Answer": [ - "-3*(u + 1)*(u + 3)**3/4" - ], - "split": "test" - }, - { - "Input": "Find the third derivative of 38820607*h**3 + 135020597*h**2.", - "Output Program": [ - "from sympy import *\nh = symbols(\"h\")\ndef s(h):\n\treturn 38820607*h**3 + 135020597*h**2\nh = symbols(\"h\")\nsolution = diff(38820607*h**3 + 135020597*h**2, h, 3)\nprint(solution)" - ], - "Output Answer": [ - "232923642" - ], - "split": "test" - }, - { - "Input": "Differentiate 1523 - 649 - 158 - 3*g + 1635 + 779 - 90*g**2 with respect to g.", - "Output Program": [ - "from sympy import *\ng = symbols(\"g\")\ndef m(g):\n\treturn 1523 - 649 - 158 - 3*g + 1635 + 779 - 90*g**2\ng = symbols(\"g\")\nsolution = diff(1523 - 649 - 158 - 3*g + 1635 + 779 - 90*g**2, g, 1)\nprint(solution)" - ], - "Output Answer": [ - "-180*g - 3" - ], - "split": "test" - }, - { - "Input": "Let t(v) be the third derivative of -v**4/24 + 3*v**2. Let u(q) = 2*q - 2. Let k(z) = -3*t(z) - u(z). Find the first derivative of k(l) wrt l.", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef u(q):\n\treturn 2*q - 2\nv = symbols(\"v\")\ndef y(v):\n\treturn -v**4/24 + 3*v**2\ndef t(val):\n\treturn diff(-v**4/24 + 3*v**2, v, 3).subs(v, val)\ndef k(z):\n\treturn -3*t(z) - u(z)\nl = symbols(\"l\")\nsolution = diff(k(l), l, 1)\nprint(solution)" - ], - "Output Answer": [ - "1" - ], - "split": "test" - }, - { - "Input": "Let d(f) = 36 - 2*f. Let o be d(18). Let b(n) be the second derivative of -n**2 - 6*n + o - 1/6*n**3. Determine b(5).", - "Output Program": [ - "from sympy import *\nf = symbols(\"f\")\ndef d(f):\n\treturn 36 - 2*f\no = d(18)\nn = symbols(\"n\")\ndef y(n):\n\treturn -n**2 - 6*n + o - 1/6*n**3\ndef b(val):\n\treturn diff(-n**2 - 6*n + o - 1/6*n**3, n, 2).subs(n, val)\nprint(b(5))" - ], - "Output Answer": [ - "-7.00000000000000" - ], - "split": "test" - }, - { - "Input": "Let c(h) = 1 - h. Let d(n) be the third derivative of -n**5/10 - 2*n**4/3 + n**3 - 19*n**2. Let p(o) = 6*c(o) - d(o). Find the second derivative of p(f) wrt f.", - "Output Program": [ - "from sympy import *\nn = symbols(\"n\")\ndef i(n):\n\treturn -n**5/10 - 2*n**4/3 + n**3 - 19*n**2\ndef d(val):\n\treturn diff(-n**5/10 - 2*n**4/3 + n**3 - 19*n**2, n, 3).subs(n, val)\nh = symbols(\"h\")\ndef c(h):\n\treturn 1 - h\ndef p(o):\n\treturn 6*c(o) - d(o)\nf = symbols(\"f\")\nsolution = diff(p(f), f, 2)\nprint(solution)" - ], - "Output Answer": [ - "12" - ], - "split": "test" - }, - { - "Input": "Let h be 2*(-3 + (-14)/(-4)). Let m = 2 + h. What is the derivative of -1 + 1 + m*d**3 + 2 wrt d?", - "Output Program": [ - "from sympy import *\nh = 2*(-3 + (-14)/(-4))\nm = 2 + h\nd = symbols(\"d\")\ndef a(d):\n\treturn -1 + 1 + m*d**3 + 2\nd = symbols(\"d\")\nsolution = diff(-1 + 1 + m*d**3 + 2, d, 1)\nprint(solution)" - ], - "Output Answer": [ - "9.0*d**2" - ], - "split": "test" - }, - { - "Input": "What is the third derivative of 44*j**5*o**3 - 2*j**5 + 10*j**2*o**3 - 71*j**2*o - 2*j*o**2 + o wrt j?", - "Output Program": [ - "from sympy import *\nj, o = symbols(\"j o\")\ndef n(j, o):\n\treturn 44*j**5*o**3 - 2*j**5 + 10*j**2*o**3 - 71*j**2*o - 2*j*o**2 + o\nj = symbols(\"j\")\nsolution = diff(44*j**5*o**3 - 2*j**5 + 10*j**2*o**3 - 71*j**2*o - 2*j*o**2 + o, j, 3)\nprint(solution)" - ], - "Output Answer": [ - "120*j**2*(22*o**3 - 1)" - ], - "split": "test" - }, - { - "Input": "Let q(j) be the third derivative of 17*j**9/63 - 7*j**5/4 - j**4/12 + 128*j**2. Find the third derivative of q(z) wrt z.", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef l(j):\n\treturn 17*j**9/63 - 7*j**5/4 - j**4/12 + 128*j**2\ndef q(val):\n\treturn diff(17*j**9/63 - 7*j**5/4 - j**4/12 + 128*j**2, j, 3).subs(j, val)\nz = symbols(\"z\")\nsolution = diff(q(z), z, 3)\nprint(solution)" - ], - "Output Answer": [ - "16320*z**3" - ], - "split": "test" - }, - { - "Input": "Find the third derivative of 3762040*o**3 + 107953*o**2 + 6.", - "Output Program": [ - "from sympy import *\no = symbols(\"o\")\ndef q(o):\n\treturn 3762040*o**3 + 107953*o**2 + 6\no = symbols(\"o\")\nsolution = diff(3762040*o**3 + 107953*o**2 + 6, o, 3)\nprint(solution)" - ], - "Output Answer": [ - "22572240" - ], - "split": "test" - }, - { - "Input": "What is the third derivative of -4*w**4 - 175446*w**3 + 2936489*w**2 wrt w?", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef s(w):\n\treturn -4*w**4 - 175446*w**3 + 2936489*w**2\nw = symbols(\"w\")\nsolution = diff(-4*w**4 - 175446*w**3 + 2936489*w**2, w, 3)\nprint(solution)" - ], - "Output Answer": [ - "-12*(8*w + 87723)" - ], - "split": "test" - }, - { - "Input": "Let x(k) be the first derivative of 9*k**4/2 + 14*k**3/3 + 4. What is the third derivative of x(u) wrt u?", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef z(k):\n\treturn 9*k**4/2 + 14*k**3/3 + 4\ndef x(val):\n\treturn diff(9*k**4/2 + 14*k**3/3 + 4, k, 1).subs(k, val)\nu = symbols(\"u\")\nsolution = diff(x(u), u, 3)\nprint(solution)" - ], - "Output Answer": [ - "108" - ], - "split": "test" - }, - { - "Input": "Let w(c) be the first derivative of 0*c**4 + 6/5*c**5 + 0*c**2 + 6 - 8/3*c**3 + 0*c. Find the third derivative of w(f) wrt f.", - "Output Program": [ - "from sympy import *\nc = symbols(\"c\")\ndef j(c):\n\treturn 0*c**4 + 6/5*c**5 + 0*c**2 + 6 - 8/3*c**3 + 0*c\ndef w(val):\n\treturn diff(0*c**4 + 6/5*c**5 + 0*c**2 + 6 - 8/3*c**3 + 0*c, c, 1).subs(c, val)\nf = symbols(\"f\")\nsolution = diff(w(f), f, 3)\nprint(solution)" - ], - "Output Answer": [ - "144.0*f" - ], - "split": "test" - }, - { - "Input": "Let z(w) be the third derivative of -w**5/60 + 7*w**2. Determine z(-2).", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef d(w):\n\treturn -w**5/60 + 7*w**2\ndef z(val):\n\treturn diff(-w**5/60 + 7*w**2, w, 3).subs(w, val)\nprint(z(-2))" - ], - "Output Answer": [ - "-4" - ], - "split": "test" - }, - { - "Input": "Let k(j) be the second derivative of 1/6*j**3 + 1/36*j**4 + 5*j + 0*j**2 + 0. Let k(a) = 0. Calculate a.", - "Output Program": [ - "from sympy import *\nj = symbols(\"j\")\ndef r(j):\n\treturn 1/6*j**3 + 1/36*j**4 + 5*j + 0*j**2 + 0\ndef k(val):\n\treturn diff(1/6*j**3 + 1/36*j**4 + 5*j + 0*j**2 + 0, j, 2).subs(j, val)\na = symbols(\"a\")\na = solve(k(a))\nprint(a)" - ], - "Output Answer": [ - "[-3.00000000000000, 0.0]" - ], - "split": "test" - }, - { - "Input": "What is the first derivative of -27*y**3 + 3*y**3 + 9*y**3 + 84 + 7*y**3 + 19*y + 7*y**3 wrt y?", - "Output Program": [ - "from sympy import *\ny = symbols(\"y\")\ndef u(y):\n\treturn -27*y**3 + 3*y**3 + 9*y**3 + 84 + 7*y**3 + 19*y + 7*y**3\ny = symbols(\"y\")\nsolution = diff(-27*y**3 + 3*y**3 + 9*y**3 + 84 + 7*y**3 + 19*y + 7*y**3, y, 1)\nprint(solution)" - ], - "Output Answer": [ - "19 - 3*y**2" - ], - "split": "test" - }, - { - "Input": "Suppose c = -6*c - 4*c. Let d(t) be the first derivative of t**3/3 - t**2/2 + 3*t + 4. Let y be d(c). Solve -2*k + 3*w = 2, -3*k - y*w = -0*k - 12 for k.", - "Output Program": [ - "from sympy import *\nt = symbols(\"t\")\ndef u(t):\n\treturn t**3/3 - t**2/2 + 3*t + 4\ndef d(val):\n\treturn diff(t**3/3 - t**2/2 + 3*t + 4, t, 1).subs(t, val)\nc = symbols(\"c\")\nc = solve([Eq(c, -6*c - 4*c)])[c]\ny = d(c)\nk, w = symbols(\"k w\")\nk = solve([Eq(-2*k + 3*w, 2), Eq(-3*k - y*w, -0*k - 12)])[k]\nprint(k)" - ], - "Output Answer": [ - "2" - ], - "split": "test" - }, - { - "Input": "Find the third derivative of -3*q**5 - 7*q**4*z - q**3 - 12*q**2 + z + 6 wrt q.", - "Output Program": [ - "from sympy import *\nz, q = symbols(\"z q\")\ndef s(z, q):\n\treturn -3*q**5 - 7*q**4*z - q**3 - 12*q**2 + z + 6\nq = symbols(\"q\")\nsolution = diff(-3*q**5 - 7*q**4*z - q**3 - 12*q**2 + z + 6, q, 3)\nprint(solution)" - ], - "Output Answer": [ - "-6*(30*q**2 + 28*q*z + 1)" - ], - "split": "test" - }, - { - "Input": "Let a(r) be the third derivative of 2/15*r**6 + 0*r + 8/105*r**7 - 8*r**2 - 2/3*r**3 - 2/3*r**4 + 0 - 1/5*r**5. Factor a(y).", - "Output Program": [ - "from sympy import *\nr = symbols(\"r\")\ndef m(r):\n\treturn 2/15*r**6 + 0*r + 8/105*r**7 - 8*r**2 - 2/3*r**3 - 2/3*r**4 + 0 - 1/5*r**5\ndef a(val):\n\treturn diff(2/15*r**6 + 0*r + 8/105*r**7 - 8*r**2 - 2/3*r**3 - 2/3*r**4 + 0 - 1/5*r**5, r, 3).subs(r, val)\ny = symbols(\"y\")\neq = factor(a(y))\nprint(eq)" - ], - "Output Answer": [ - "16.0*(1.0*y - 1.0)*(1.0*y + 0.5)**2*(1.0*y + 1.0)" - ], - "split": "test" - }, - { - "Input": "Differentiate -66295*p*y**2 + 29*p - 3*y**2 - 254979*y + 3 with respect to p.", - "Output Program": [ - "from sympy import *\ny, p = symbols(\"y p\")\ndef a(y, p):\n\treturn -66295*p*y**2 + 29*p - 3*y**2 - 254979*y + 3\np = symbols(\"p\")\nsolution = diff(-66295*p*y**2 + 29*p - 3*y**2 - 254979*y + 3, p, 1)\nprint(solution)" - ], - "Output Answer": [ - "29 - 66295*y**2" - ], - "split": "test" - }, - { - "Input": "Suppose 0 = 2*a + 2*a + 32. Let s(b) = 26*b - 26. Let f(l) = 17 - 17*l. Let g(o) = a*f(o) - 5*s(o). What is the first derivative of g(c) wrt c?", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\na = solve([Eq(0, 2*a + 2*a + 32)])[a]\nb = symbols(\"b\")\ndef s(b):\n\treturn 26*b - 26\nl = symbols(\"l\")\ndef f(l):\n\treturn 17 - 17*l\ndef g(o):\n\treturn a*f(o) - 5*s(o)\nc = symbols(\"c\")\nsolution = diff(g(c), c, 1)\nprint(solution)" - ], - "Output Answer": [ - "6" - ], - "split": "test" - }, - { - "Input": "Let d = -13784 + 13790. Let h(i) be the second derivative of 2*i**4 - 2/5*i**d + 0*i**2 + 0*i**3 + 0*i**5 + 0 - 32*i. Find the third derivative of h(s) wrt s.", - "Output Program": [ - "from sympy import *\nd = -13784 + 13790\ni = symbols(\"i\")\ndef n(i):\n\treturn 2*i**4 - 2/5*i**d + 0*i**2 + 0*i**3 + 0*i**5 + 0 - 32*i\ndef h(val):\n\treturn diff(2*i**4 - 2/5*i**d + 0*i**2 + 0*i**3 + 0*i**5 + 0 - 32*i, i, 2).subs(i, val)\ns = symbols(\"s\")\nsolution = diff(h(s), s, 3)\nprint(solution)" - ], - "Output Answer": [ - "-288.0*s" - ], - "split": "test" - }, - { - "Input": "Let c(d) = d + 1. Let z(k) = 6*k**4 - 7*k**2 + 5*k + 5. Let s(j) = 5*c(j) - z(j). What is the third derivative of s(i) wrt i?", - "Output Program": [ - "from sympy import *\nd = symbols(\"d\")\ndef c(d):\n\treturn d + 1\nk = symbols(\"k\")\ndef z(k):\n\treturn 6*k**4 - 7*k**2 + 5*k + 5\ndef s(j):\n\treturn 5*c(j) - z(j)\ni = symbols(\"i\")\nsolution = diff(s(i), i, 3)\nprint(solution)" - ], - "Output Answer": [ - "-144*i" - ], - "split": "test" - }, - { - "Input": "Let o(z) = -z**3 + 2*z**2 - z - 1. Let h(i) = 19*i**3 - 3*i**2 + i - 32. Let u(y) = h(y) + o(y). What is the third derivative of u(x) wrt x?", - "Output Program": [ - "from sympy import *\nz = symbols(\"z\")\ndef o(z):\n\treturn -z**3 + 2*z**2 - z - 1\ni = symbols(\"i\")\ndef h(i):\n\treturn 19*i**3 - 3*i**2 + i - 32\ndef u(y):\n\treturn h(y) + o(y)\nx = symbols(\"x\")\nsolution = diff(u(x), x, 3)\nprint(solution)" - ], - "Output Answer": [ - "108" - ], - "split": "test" - }, - { - "Input": "Let d(z) be the second derivative of z**4/12 + 7*z**3/6 - 3*z**2/2 - 70*z - 2. Let s = 0 - 6. Determine d(s).", - "Output Program": [ - "from sympy import *\nz = symbols(\"z\")\ndef h(z):\n\treturn z**4/12 + 7*z**3/6 - 3*z**2/2 - 70*z - 2\ndef d(val):\n\treturn diff(z**4/12 + 7*z**3/6 - 3*z**2/2 - 70*z - 2, z, 2).subs(z, val)\ns = 0 - 6\nprint(d(s))" - ], - "Output Answer": [ - "-9" - ], - "split": "test" - }, - { - "Input": "Let l(x) be the second derivative of 11*x**6/10 - 9*x**4/4 + 41*x. Find the third derivative of l(r) wrt r.", - "Output Program": [ - "from sympy import *\nx = symbols(\"x\")\ndef a(x):\n\treturn 11*x**6/10 - 9*x**4/4 + 41*x\ndef l(val):\n\treturn diff(11*x**6/10 - 9*x**4/4 + 41*x, x, 2).subs(x, val)\nr = symbols(\"r\")\nsolution = diff(l(r), r, 3)\nprint(solution)" - ], - "Output Answer": [ - "792*r" - ], - "split": "test" - }, - { - "Input": "Let x(v) be the second derivative of -v**4/3 + 5*v**3/6 - 3*v**2/2 - 118*v + 2. Give x(2).", - "Output Program": [ - "from sympy import *\nv = symbols(\"v\")\ndef a(v):\n\treturn -v**4/3 + 5*v**3/6 - 3*v**2/2 - 118*v + 2\ndef x(val):\n\treturn diff(-v**4/3 + 5*v**3/6 - 3*v**2/2 - 118*v + 2, v, 2).subs(v, val)\nprint(x(2))" - ], - "Output Answer": [ - "-9" - ], - "split": "test" - }, - { - "Input": "Suppose 11 = 3*s - 10. Let v be -2 + (s - 4) + 2. Differentiate -5*b**4 - 2 - b**3 + 6*b**v - 5*b**3 with respect to b.", - "Output Program": [ - "from sympy import *\ns = symbols(\"s\")\ns = solve([Eq(11, 3*s - 10)])[s]\nv = -2 + (s - 4) + 2\nb = symbols(\"b\")\ndef a(b):\n\treturn -5*b**4 - 2 - b**3 + 6*b**v - 5*b**3\nb = symbols(\"b\")\nsolution = diff(-5*b**4 - 2 - b**3 + 6*b**v - 5*b**3, b, 1)\nprint(solution)" - ], - "Output Answer": [ - "-20*b**3" - ], - "split": "test" - }, - { - "Input": "Suppose 0 = -4*k - k + 15. Differentiate -1 + 0*z + k*z + 0 - 1 wrt z.", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\nk = solve([Eq(0, -4*k - k + 15)])[k]\nz = symbols(\"z\")\ndef h(z):\n\treturn -1 + 0*z + k*z + 0 - 1\nz = symbols(\"z\")\nsolution = diff(-1 + 0*z + k*z + 0 - 1, z, 1)\nprint(solution)" - ], - "Output Answer": [ - "3" - ], - "split": "test" - }, - { - "Input": "Find the second derivative of 2*a**5 + 1450*a**2 + a + 2362 wrt a.", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef v(a):\n\treturn 2*a**5 + 1450*a**2 + a + 2362\na = symbols(\"a\")\nsolution = diff(2*a**5 + 1450*a**2 + a + 2362, a, 2)\nprint(solution)" - ], - "Output Answer": [ - "20*(2*a**3 + 145)" - ], - "split": "test" - }, - { - "Input": "Find the second derivative of -382501*k**3 - 260*k - 355 wrt k.", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef m(k):\n\treturn -382501*k**3 - 260*k - 355\nk = symbols(\"k\")\nsolution = diff(-382501*k**3 - 260*k - 355, k, 2)\nprint(solution)" - ], - "Output Answer": [ - "-2295006*k" - ], - "split": "test" - }, - { - "Input": "Let t(q) be the first derivative of q**6/24 - q**5/5 - q**4/16 + q**3/3 - 619. Factor t(c).", - "Output Program": [ - "from sympy import *\nq = symbols(\"q\")\ndef w(q):\n\treturn q**6/24 - q**5/5 - q**4/16 + q**3/3 - 619\ndef t(val):\n\treturn diff(q**6/24 - q**5/5 - q**4/16 + q**3/3 - 619, q, 1).subs(q, val)\nc = symbols(\"c\")\neq = factor(t(c))\nprint(eq)" - ], - "Output Answer": [ - "c**2*(c - 4)*(c - 1)*(c + 1)/4" - ], - "split": "test" - }, - { - "Input": "What is the derivative of 11404838 - 15678082*s wrt s?", - "Output Program": [ - "from sympy import *\ns = symbols(\"s\")\ndef n(s):\n\treturn 11404838 - 15678082*s\ns = symbols(\"s\")\nsolution = diff(11404838 - 15678082*s, s, 1)\nprint(solution)" - ], - "Output Answer": [ - "-15678082" - ], - "split": "test" - }, - { - "Input": "Let x(k) be the first derivative of -k**4/4 + 10*k**3/3 + 25*k**2/2 + 7*k - 3. What is the tens digit of x(11)?", - "Output Program": [ - "from sympy import *\nk = symbols(\"k\")\ndef l(k):\n\treturn -k**4/4 + 10*k**3/3 + 25*k**2/2 + 7*k - 3\ndef x(val):\n\treturn diff(-k**4/4 + 10*k**3/3 + 25*k**2/2 + 7*k - 3, k, 1).subs(k, val)\no = x(11)\ndigit = int(str(int(161))[1])\nprint(digit)" - ], - "Output Answer": [ - "6" - ], - "split": "test" - }, - { - "Input": "Suppose -5*m = -8*m + 6. Let w(r) be the first derivative of 0*r + 1/2*r**4 + 0*r**2 + m + 1/3*r**3. Find the third derivative of w(y) wrt y.", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\nm = solve([Eq(-5*m, -8*m + 6)])[m]\nr = symbols(\"r\")\ndef d(r):\n\treturn 0*r + 1/2*r**4 + 0*r**2 + m + 1/3*r**3\ndef w(val):\n\treturn diff(0*r + 1/2*r**4 + 0*r**2 + m + 1/3*r**3, r, 1).subs(r, val)\ny = symbols(\"y\")\nsolution = diff(w(y), y, 3)\nprint(solution)" - ], - "Output Answer": [ - "12.0000000000000" - ], - "split": "test" - }, - { - "Input": "Let s(a) be the first derivative of 1/2*a**2 - 37 - 16*a. What is s(8)?", - "Output Program": [ - "from sympy import *\na = symbols(\"a\")\ndef x(a):\n\treturn 1/2*a**2 - 37 - 16*a\ndef s(val):\n\treturn diff(1/2*a**2 - 37 - 16*a, a, 1).subs(a, val)\nprint(s(8))" - ], - "Output Answer": [ - "-8.00000000000000" - ], - "split": "test" - }, - { - "Input": "Let u(j) = -j**3 - j**2 + j - 1. Let h(b) = 12*b**6 - 2*b**3 + 9*b**2 + 2*b - 2. Let s(w) = h(w) - 2*u(w). Find the third derivative of s(a) wrt a.", - "Output Program": [ - "from sympy import *\nb = symbols(\"b\")\ndef h(b):\n\treturn 12*b**6 - 2*b**3 + 9*b**2 + 2*b - 2\nj = symbols(\"j\")\ndef u(j):\n\treturn -j**3 - j**2 + j - 1\ndef s(w):\n\treturn h(w) - 2*u(w)\na = symbols(\"a\")\nsolution = diff(s(a), a, 3)\nprint(solution)" - ], - "Output Answer": [ - "1440*a**3" - ], - "split": "test" - }, - { - "Input": "Let k(q) = 501*q + 229. Let t(c) = -1251*c - 573. Let o be 15/6 + (-15)/(-6). Let v(z) = o*t(z) + 12*k(z). Differentiate v(a) with respect to a.", - "Output Program": [ - "from sympy import *\no = 15/6 + (-15)/(-6)\nc = symbols(\"c\")\ndef t(c):\n\treturn -1251*c - 573\nq = symbols(\"q\")\ndef k(q):\n\treturn 501*q + 229\ndef v(z):\n\treturn o*t(z) + 12*k(z)\na = symbols(\"a\")\nsolution = diff(v(a), a, 1)\nprint(solution)" - ], - "Output Answer": [ - "-243.000000000000" - ], - "split": "test" - }, - { - "Input": "Let g(w) be the third derivative of -1021*w**8/336 - 100*w**4/3 + 134*w**2 + 3*w + 2. Find the second derivative of g(q) wrt q.", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef p(w):\n\treturn -1021*w**8/336 - 100*w**4/3 + 134*w**2 + 3*w + 2\ndef g(val):\n\treturn diff(-1021*w**8/336 - 100*w**4/3 + 134*w**2 + 3*w + 2, w, 3).subs(w, val)\nq = symbols(\"q\")\nsolution = diff(g(q), q, 2)\nprint(solution)" - ], - "Output Answer": [ - "-20420*q**3" - ], - "split": "test" - }, - { - "Input": "Let f be (2 + (-33)/3)/(-1). Let o(m) be the second derivative of -1/6*m**3 + 2*m + 5 + 9/2*m**2. Determine o(f).", - "Output Program": [ - "from sympy import *\nm = symbols(\"m\")\ndef i(m):\n\treturn -1/6*m**3 + 2*m + 5 + 9/2*m**2\ndef o(val):\n\treturn diff(-1/6*m**3 + 2*m + 5 + 9/2*m**2, m, 2).subs(m, val)\nf = (2 + (-33)/3)/(-1)\nprint(o(f))" - ], - "Output Answer": [ - "0" - ], - "split": "test" - }, - { - "Input": "Let m(i) be the second derivative of -25/3*i**4 - 7/6*i**6 - 9/2*i**5 - 9 - 20/3*i**3 - 4*i + 0*i**2 - 5/42*i**7. Find p such that m(p) = 0.", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef l(i):\n\treturn -25/3*i**4 - 7/6*i**6 - 9/2*i**5 - 9 - 20/3*i**3 - 4*i + 0*i**2 - 5/42*i**7\ndef m(val):\n\treturn diff(-25/3*i**4 - 7/6*i**6 - 9/2*i**5 - 9 - 20/3*i**3 - 4*i + 0*i**2 - 5/42*i**7, i, 2).subs(i, val)\np = symbols(\"p\")\np = solve(m(p))\nprint(p)" - ], - "Output Answer": [ - "[-2.00000000000000, -1.00000000000000, 0.0]" - ], - "split": "test" - }, - { - "Input": "Find the second derivative of -2494*p**2 - 4497*p wrt p.", - "Output Program": [ - "from sympy import *\np = symbols(\"p\")\ndef z(p):\n\treturn -2494*p**2 - 4497*p\np = symbols(\"p\")\nsolution = diff(-2494*p**2 - 4497*p, p, 2)\nprint(solution)" - ], - "Output Answer": [ - "-4988" - ], - "split": "test" - }, - { - "Input": "Suppose -6*f = -5*w - 12, 8*f - 6*f + 2*w = 4. Let y(t) be the first derivative of f - 5/3*t**3 + 0*t + 5/2*t**2. Suppose y(u) = 0. Calculate u.", - "Output Program": [ - "from sympy import *\nf, w = symbols(\"f w\")\nf = solve([Eq(-6*f, -5*w - 12), Eq(8*f - 6*f + 2*w, 4)])[f]\nt = symbols(\"t\")\ndef v(t):\n\treturn f - 5/3*t**3 + 0*t + 5/2*t**2\ndef y(val):\n\treturn diff(f - 5/3*t**3 + 0*t + 5/2*t**2, t, 1).subs(t, val)\nu = symbols(\"u\")\nu = solve(y(u))\nprint(u)" - ], - "Output Answer": [ - "[0.0, 1.00000000000000]" - ], - "split": "test" - }, - { - "Input": "Let p(u) = 4*u**4. Let t(r) = -1. Let o(w) = p(w) - 3*t(w). Find the first derivative of o(h) wrt h.", - "Output Program": [ - "from sympy import *\nu = symbols(\"u\")\ndef p(u):\n\treturn 4*u**4\nr = symbols(\"r\")\ndef t(r):\n\treturn -1\ndef o(w):\n\treturn p(w) - 3*t(w)\nh = symbols(\"h\")\nsolution = diff(o(h), h, 1)\nprint(solution)" - ], - "Output Answer": [ - "16*h**3" - ], - "split": "test" - }, - { - "Input": "Let m(i) be the third derivative of -i**6/20 - i**5/30 + i**4/18 + 21*i**2. Find c such that m(c) = 0.", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef b(i):\n\treturn -i**6/20 - i**5/30 + i**4/18 + 21*i**2\ndef m(val):\n\treturn diff(-i**6/20 - i**5/30 + i**4/18 + 21*i**2, i, 3).subs(i, val)\nc = symbols(\"c\")\nc = solve(m(c))\nprint(c)" - ], - "Output Answer": [ - "[-2/3, 0, 1/3]" - ], - "split": "test" - }, - { - "Input": "Let b(w) be the second derivative of 0 + 6*w**3 + 7/5*w**5 + 57*w + 2/15*w**6 + 5*w**4 + 0*w**2. Factor b(s).", - "Output Program": [ - "from sympy import *\nw = symbols(\"w\")\ndef f(w):\n\treturn 0 + 6*w**3 + 7/5*w**5 + 57*w + 2/15*w**6 + 5*w**4 + 0*w**2\ndef b(val):\n\treturn diff(0 + 6*w**3 + 7/5*w**5 + 57*w + 2/15*w**6 + 5*w**4 + 0*w**2, w, 2).subs(w, val)\ns = symbols(\"s\")\neq = factor(b(s))\nprint(eq)" - ], - "Output Answer": [ - "36.0*s*(0.333333333333333*s + 1.0)**2*(1.0*s + 1.0)" - ], - "split": "test" - }, - { - "Input": "What is the second derivative of 71*i**4 + 567*i**3 + 457*i**2 - 21*i - 1841246?", - "Output Program": [ - "from sympy import *\ni = symbols(\"i\")\ndef b(i):\n\treturn 71*i**4 + 567*i**3 + 457*i**2 - 21*i - 1841246\ni = symbols(\"i\")\nsolution = diff(71*i**4 + 567*i**3 + 457*i**2 - 21*i - 1841246, i, 2)\nprint(solution)" - ], - "Output Answer": [ - "2*(426*i**2 + 1701*i + 457)" - ], - "split": "test" - }, - { - "Input": "What is the derivative of 32*k**3*y**2 + 425*k**3 + 8*k*y**3 wrt y?", - "Output Program": [ - "from sympy import *\nk, y = symbols(\"k y\")\ndef p(k, y):\n\treturn 32*k**3*y**2 + 425*k**3 + 8*k*y**3\ny = symbols(\"y\")\nsolution = diff(32*k**3*y**2 + 425*k**3 + 8*k*y**3, y, 1)\nprint(solution)" - ], - "Output Answer": [ - "64*k**3*y + 24*k*y**2" - ], - "split": "test" - }, - { - "Input": "Differentiate -125082*q**3*t - 6*q**3 + q**2*t - 9*q**2 + 17*q wrt t.", - "Output Program": [ - "from sympy import *\nq, t = symbols(\"q t\")\ndef g(q, t):\n\treturn -125082*q**3*t - 6*q**3 + q**2*t - 9*q**2 + 17*q\nt = symbols(\"t\")\nsolution = diff(-125082*q**3*t - 6*q**3 + q**2*t - 9*q**2 + 17*q, t, 1)\nprint(solution)" - ], - "Output Answer": [ - "-125082*q**3 + q**2" - ], - "split": "test" - }, - { - "Input": "Differentiate -36*l**2 + 15*l - 1602 wrt l.", - "Output Program": [ - "from sympy import *\nl = symbols(\"l\")\ndef m(l):\n\treturn -36*l**2 + 15*l - 1602\nl = symbols(\"l\")\nsolution = diff(-36*l**2 + 15*l - 1602, l, 1)\nprint(solution)" - ], - "Output Answer": [ - "15 - 72*l" - ], - "split": "test" - }, - { - "Input": "Differentiate -a*u**3*y**2 - 20*a*u**2*y**2 + 15*a*u - 8*a + 2*u**3 with respect to y.", - "Output Program": [ - "from sympy import *\nu, y, a = symbols(\"u y a\")\ndef s(u, y, a):\n\treturn -a*u**3*y**2 - 20*a*u**2*y**2 + 15*a*u - 8*a + 2*u**3\ny = symbols(\"y\")\nsolution = diff(-a*u**3*y**2 - 20*a*u**2*y**2 + 15*a*u - 8*a + 2*u**3, y, 1)\nprint(solution)" - ], - "Output Answer": [ - "-2*a*u**3*y - 40*a*u**2*y" - ], - "split": "test" - }, - { - "Input": "Let y(s) be the second derivative of s**4/6 + s**3/6 + s**2/2 + 3*s - 26. Let d = -3 - -2. Determine y(d).", - "Output Program": [ - "from sympy import *\ns = symbols(\"s\")\ndef g(s):\n\treturn s**4/6 + s**3/6 + s**2/2 + 3*s - 26\ndef y(val):\n\treturn diff(s**4/6 + s**3/6 + s**2/2 + 3*s - 26, s, 2).subs(s, val)\nd = -3 - -2\nprint(y(d))" - ], - "Output Answer": [ - "2" - ], - "split": "test" - } - ], - "Metadata": [] -} \ No newline at end of file