Substitution

Our substitution feature allows you to answer the question "What would this expression, such as \(3+A\), represent if we substituted a different value for \(A\)?" without ever changing the original value of \(A\).

 

Substitution within a Function

The substitution function, represented by the command ‘with,’ replaces a variable in an expression or function with a constant value, another variable, or a list.

Image of graphing calculator Graphs of two parabolas.  The first is modeled when b=1 and the second is modeled with b = -1.

Where would the parabola \(f\left(x\right)=ax^{2}+bx+c\) move if \(b\) was replaced with \(-1\)? Model \(f\left(x\right)\) after substituting \(b\) with \(-1\) to visualize the change.

Image of an L shape rotated around a point.

Where would the polygon be if it was rotated by \(90\) degrees instead of \(45\) degrees? Model the rotation with an angle of \(90\) degrees.

3D graph of a sphere with radius one centered at the origin and then with a center of (2,2,2).

What happens if the center point of the sphere is changed? Model this by substituting your sphere \(S\) with a center at \((2,2,2)\).

 

Substitution within the Same Expression Line

You can evaluate expressions by substituting variables with constant values in the same line. You can also substitute a variable with another expression, but if that expression depends on a free variable, it will need to be defined separately.

The first expression line shows the value of m divided by n plus m when m equals 10 and n equals 2.  The second shows the value of a divided by 10 when a equals 2 times b and b is defined in a third line as equal to -5.

 

Learn More

Please write in with any questions or feedback to support@desmos.com.