Update pset4.ipynb

This commit is contained in:
Steven G. Johnson 2023-04-06 16:33:32 -04:00 committed by GitHub
parent a98e7ea9f7
commit ea73008604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@
"$$\n",
"where $g(x) = x^T G x$, $b \\in \\mathbb{R}^m$ is some vector, and $G = G^T$ is some symmetric $m \\times m$ matrix.\n",
"\n",
"**(a)** What is $\\nabla f$? Explain how you can compute *all m* components of $\\nabla f$ by solving only *two* $m \\times m$ systems followed by $\\Theta(m)$ additional work in *total*.\n",
"**(a)** What is $\\nabla f$? Explain how you can compute *all m* components of $\\nabla f$ by solving only *two* $m \\times m$ systems followed by $\\Theta(m)$ additional work in *total*. *Clarification* what I really want is for you to show that, if you are already computing $f(p)$, the *additional* cost to compute $\\nabla f$ is just 1 additional solve of the same size plus $\\Theta(m)$ work.",
"\n",
"**(b)** Implement your solution from (a) by filling in the function `∇f(p)` below, and check that it correctly predicts $df = f(p + dp) - f(p)$ (*approximately*) for a random small $dp$."
]