# Math Help - Function

1. ## Function

I could really use some help with this function. It's probly really easy but I don't know what I'm doing wrong.

If f(x)=xsquared+3x, find f(2-a).

I did it like this.

f(x)=xsquared+3x
f(2-a)=(2-a)squared+3(2-a)
f(2-a)=4-asquared+6-3a
f(2-a)=-asquared-3a+10

But my teacher told us that it was.

-asquared-7a+10

If you could help me I would really appreciate it. Thanks!

2. Originally Posted by nick_c
I could really use some help with this function. It's probly really easy but I don't know what I'm doing wrong.

If f(x)=xsquared+3x, find f(2-a).

I did it like this.

f(x)=xsquared+3x
f(2-a)=(2-a)squared+3(2-a)
f(2-a)=4-asquared+6-3a
f(2-a)=-asquared-3a+10

But my teacher told us that it was.

-asquared-7a+10

If you could help me I would really appreciate it. Thanks!
Note that $\left(2-a\right)^2\neq 2^2-a^2$!!!

It turns out that $\left(x-y\right)^2=x^2-2xy+y^2$. In your case, $x=2$ and $y=a$

Can you try to take it from here?