Calculus
Gradient
Show the gradient as a 2D vector field, with a 3D surface available.
grad(x² + y²) is the vector (2x, 2y). It points away from the origin, and its length is the steepest slope of the paraboloid. grad(sin(x)cos(y)) is (cos(x)cos(y), −sin(x)sin(y)).
In two variables the default picture is a 2D vector field, with the surface available as another view. A three-variable gradient needs a fourth dimension for the graph of the function, so DGS draws sample arrows and says so.
Equation
grad(x^2+y^2)
How the calculus steps are organized
Calculus in the equation workflow returns the symbolic result and the steps. A derivative applies the relevant rule. An integral looks for an antiderivative, and a definite integral evaluates it on the bounds. A limit simplifies before it substitutes the point when substitution would divide by zero.
Multivariable operations stay symbolic and, when the expression has two variables, DGS can also show the surface. A partial derivative treats the other variables as constants. A tangent plane uses both partials at the chosen point. The page states the command that produces each of those results.
Reading the input
grad(x^2+y^2)— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Other versions of this example
These stay on this page so each version keeps the same explanation. Choose Try example to run a version in its Studio workflow, or copy it into the editable field below.
Gradient of x² + y²
Expected gradient (2*x, 2*y).
grad(x^2+y^2)
Gradient of sin(x) cos(y)
Expected gradient (cos(x)*cos(y), -sin(x)*sin(y)).
grad(sin(x)*cos(y))
Try a change
- Edit one number in the field, then use Solve Equation. The studio opens on the homepage with the edited text and runs it.
- Use Open in DGS Studio when you want the expression loaded but not run yet.
Solve Equation opens the original input in the equation workspace and displays its symbolic results, conditions, and solution steps.