<?xml version="1.0" encoding="UTF-8"?>
<!-- AlgEquiv: absolute value of a product: a minimal reproduction for the STACK question type (moodle-qtype_stack). -->
<!-- Andrey Chesnokov, 2026. Licence: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). -->
<quiz>
<question type="stack">
  <name><text>AlgEquiv: absolute value of a product</text></name>
  <questiontext format="html"><text><![CDATA[<p>Write \(\sqrt{(x^2-1)^2}\) without a square root.</p><p>[[input:ans1]] [[validation:ans1]]</p>[[feedback:prt1]]]]></text></questiontext>
  <generalfeedback format="html"><text></text></generalfeedback>
  <defaultgrade>1</defaultgrade>
  <penalty>0.1</penalty>
  <hidden>0</hidden>
  <idnumber></idnumber>
  <stackversion><text>2026080600</text></stackversion>
  <questionvariables><text>ta: abs(x^2-1);</text></questionvariables>
  <specificfeedback format="html"><text></text></specificfeedback>
  <questionnote format="html"><text></text></questionnote>
  <questionsimplify>1</questionsimplify>
  <assumepositive>0</assumepositive>
  <assumereal>0</assumereal>
  <input>
    <name>ans1</name>
    <type>algebraic</type>
    <tans>ta</tans>
    <boxsize>20</boxsize>
    <strictsyntax>1</strictsyntax>
    <insertstars>0</insertstars>
    <syntaxhint></syntaxhint>
    <syntaxattribute>0</syntaxattribute>
    <forbidwords></forbidwords>
    <allowwords></allowwords>
    <forbidfloat>0</forbidfloat>
    <requirelowestterms>0</requirelowestterms>
    <checkanswertype>0</checkanswertype>
    <mustverify>1</mustverify>
    <showvalidation>1</showvalidation>
    <options></options>
  </input>
  <prt>
    <name>prt1</name>
    <value>1.0000000</value>
    <autosimplify>1</autosimplify>
    <feedbackstyle>1</feedbackstyle>
    <feedbackvariables><text></text></feedbackvariables>
    <node>
      <name>0</name>
      <answertest>AlgEquiv</answertest>
      <sans>ans1</sans>
      <tans>ta</tans>
      <testoptions></testoptions>
      <quiet>0</quiet>
      <truescoremode>=</truescoremode>
      <truescore>1</truescore>
      <truepenalty></truepenalty>
      <truenextnode>-1</truenextnode>
      <trueanswernote>prt1-1-T</trueanswernote>
      <truefeedback format="html"><text></text></truefeedback>
      <falsescoremode>=</falsescoremode>
      <falsescore>0</falsescore>
      <falsepenalty></falsepenalty>
      <falsenextnode>-1</falsenextnode>
      <falseanswernote>prt1-1-F</falseanswernote>
      <falsefeedback format="html"><text></text></falsefeedback>
    </node>
  </prt>
  <qtest>
    <testcase>1</testcase>
    <description></description>
    <testinput>
      <name>ans1</name>
      <value>abs(x^2-1)</value>
    </testinput>
    <expected>
      <name>prt1</name>
      <expectedscore>1</expectedscore>
      <expectedpenalty>0</expectedpenalty>
      <expectedanswernote>prt1-1-T</expectedanswernote>
    </expected>
  </qtest>
  <qtest>
    <testcase>2</testcase>
    <description>The same expression with the inside factored.</description>
    <testinput>
      <name>ans1</name>
      <value>abs((x-1)*(x+1))</value>
    </testinput>
    <expected>
      <name>prt1</name>
      <expectedscore>1</expectedscore>
      <expectedpenalty>0</expectedpenalty>
      <expectedanswernote>prt1-1-T</expectedanswernote>
    </expected>
  </qtest>
  <qtest>
    <testcase>3</testcase>
    <description></description>
    <testinput>
      <name>ans1</name>
      <value>abs(x-1)*abs(x+1)</value>
    </testinput>
    <expected>
      <name>prt1</name>
      <expectedscore>1</expectedscore>
      <expectedpenalty>0</expectedpenalty>
      <expectedanswernote>prt1-1-T</expectedanswernote>
    </expected>
  </qtest>
</question>
</quiz>
