Question 347518
{{{((x+1)-y)^2}}}
There's a short way and a long way to do this.<br>
The short way depends on<ul><li>Knowing the pattern: {{{(a-b)^2 = a^2 - 2ab + b^2}}} and...</li><li>Seeing how this pattern can be used on your expression</li></ul>
The key is understanding that in the pattern for {{{(a - b)^2}}}, the "a" and the "b" can be <i>any</i> expression. We just need two expressions being subtracted!<br>
In your expression, you have two expressions being subtracted: (x+1) and y. SO we can use the pattern replacing "a" with (x+1) and "b" with y:
{{{(x+1)^2 - 2(x+1)y +y^2}}}
(Note: If you cannot "see" how this was done, then perhaps the use of a temporary variable will help. Let q = (x+1). Substituting q for (x+1) in your expression we get {{{(q - y)^2}}}. It should be obvious how this fits the pattern for {{{(a - b)^2}}}: {{{q^2 - 2qy + y^2}}}. Now that we are finished using q to help us see how to use the pattern, we just replace the q with (x+1) giving: {{{(x+1)^2 - 2(x+1)y +y^2}}} (which is the same as the expression we got without using the temporary variable, q.)<br>
Now we can use the pattern for {{{a + b)^2}}} on the first part of the above:
{{{(x)^2 + 2(x)(1) + 1^2 - 2(x+1)y +y^2}}}
Continuing to simplify:
{{{x^2 + 2x + 1 - 2y(x+1) + y^2}}}
{{{x^2 + 2x + 1 - 2xy - 2y + y^2}}}
Last of all we put it in standard form:
{{{x^2 -2xy + y^2 + 2x - 2y + 1}}}<br>
The long way is to actually square your expression:
{{{(x+1-y)^2}}}
{{{(x+1-y)(x+1-y)}}}
To multiply polynomials we multiply each term of one polynomial by each term of the other polynomial. Since there are 3 terms in each of the polynomials there will be 3*3 or 9 multiplications:
{{{x*x + x*1 -x*y + 1*x + 1*1 - 1*y - y*x - y*1 -y*(-y)}}}
Now we simplify:
{{{x^2 + x - x*y + x + 1 - y - xy - y + y^2}}}
{{{x^2 + 2x - x*y +  1 - 2y - 2xy  +y^2}}}
And now standard form:
{{{x^2 -2xy + y^2 + 2x - 2y + 1}}}
The is the same as we got the short way.