<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div style="direction: ltr;">
<div style="direction: ltr;">Hi,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">lets assume I have a function f(x,y) : R^n \times R^m -&gt; R and I only need the gradient with respect to x, but every time I need to change both variables x and y. (y could be some parameters like coefficients of a polynomial function
 etc.). There are basically two ways I know how to achieve this:</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">1. mark both x and y as independent variables, tape once and every time I need a gradient I compute the whole gradient df/d(x,y) at some (x0,y0) and just use df/dx (i.e. the first n values of the gradient df/d(x,y)). This way I
 can change both variables but I also compute the gradient df/dy that I don't need.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">2. mark only x as independent and tape the function with any y0 every time before computing the gradient df/dx.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Is there any way to tape once, and later compute the gradient df/dx at any (x0,y0) without retaping?</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Thomas</div>
</div>
</div>
</body>
</html>