# Self-Checking with perfect square trinomials/binomials

Not sure if this is possible, and may be too complicated for me to understand, but the students are being asked to write their own perfect square trinomial and then write it as a binomial squared. Is there any way to check that the trinomial they’ve written is a perfect square trinomial and then that the binomial version is correct based on what their perfect square trinomial is?

The slide I am looking at is this:

TIA

Some complex corrections again , but here you go:

Amazing as usual! I wish I could do things like this on my own! Thank you so much for taking the time to help!!!

Quick question–if I type in a trinomial where both of the signs are positive, it gives me that both of the answers are correct. If I type in a trinomial where the linear term is negative and the constant is positive, the trinomial is marked as incorrect but the binomial squared is correct. I’m assuming that it has something to do with the attempts in the graph, but you know what happens when you assume… Any suggestions?

Finding a, b, and c weren’t to difficult. A little calculus made it much simpler.

For the corrections, you may have used evaluateAt in the CL to test a few values. I’m doing something similar, but using a list of values, X.

I take the difference of the target function evaluations and the student’s: `|f(X)-g(X)|`.
If that difference is 0 (or <=0.1 depending on the type of functions used), then I output 0 otherwise 1

`{|f(X)-g(X)=0:0,1}` is basically a when-otherwise. This creates a list of all 0’s and 1’s for each value in list X. If the total of all of these is 0, then f(x) was equivalent to g(x) for all the values used. `total({|f(X)-g(X)=0:0,1})`

I fixed it. Just needed to check absolute value of b’s vs sqrt ac.

Absolutely perfect. Thank you so much for your time! You never disappoint!!!

1 Like

This is very cool work and I was looking through your slide to see how you did this when I may have found a typo:

For Attempt #3 you are finding the constant (c) value by evaluating the derivative of the function at zero instead of evaluating the function at zero like you did with the first two attempts.

If this has already been fixed then disregard this message

1 Like

Good catch. It’s fixed now.