qu.1.topic=1-elementary indefinite integrals@
qu.1.1.mode=Formula Mod C@
qu.1.1.comment=The answer is ${mathml("$answer")}.@
qu.1.1.editing=useHTML@
qu.1.1.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,9);
$n=range(1,4);
$m=range(2,5);
$k=range(4,9);
condition:gt($k-$m,1);
$pcoef=range(0,9);
$acoef=range(0,9);
$tcoef=range(0,9);
$tsgn=range(-1,1,2);
condition:gt($pcoef*$acoef+($pcoef+$acoef)*$tcoef,0);
$pnum=range(0,7);
$anum=range(0,1);
$tnum=range(0,2);
$pfnc=if(eq($pcoef,0),0,switch($pnum,$pcoef*$X^$m*($X^$n+$X^(-$k)),$pcoef*$X^$m*($X^$n+$X^(-$k)),$pcoef*$X^((2*$n+1)/"2"),$pcoef*$X^((2*$n+1)/"2"),$pcoef/($X^$m),$pcoef/($X^$m),$pcoef/sqrt($X),$pcoef*sqrt($X)));
$pans=switch($pnum,$pcoef*($X^($m+$n+1)/($m+$n+1)-$X^($m-$k+1)/($k-$m-1)),$pcoef*($X^($m+$n+1)/($m+$n+1)-$X^($m-$k+1)/($k-$m-1)),("2*$pcoef"/(2*$n+3))*$X^((2*$n+3)/"2"),("2*$pcoef"/(2*$n+3))*$X^((2*$n+3)/"2"),-("$pcoef"/($m-1))*$X^(1-$m),-("$pcoef"/($m-1))*$X^(1-$m),2*$pcoef*sqrt($X),("2*$pcoef"/3)*$X^(3/"2"));
$afnc=if(eq($acoef,0),0,switch($anum,$acoef/(1+$X^2),$acoef/sqrt(1-$X^2)));
$aans=switch($anum,$acoef*arctan($X),$acoef*arcsin($X));
$tfnc=$tcoef*switch($tnum,sin($a*$X),cos($a*$X),"e"^($a*$X));
$tans=($tcoef/"$a")*switch($tnum,cos($a*$X),sin($a*$X),"e"^($a*$X));
$function=if(eq($tsgn,1),switch(range(0,3),"$pfnc+$afnc+$tfnc","$afnc+$pfnc+$tfnc","$tfnc+$pfnc+$afnc","$tfnc+$afnc+$pfnc"),switch(range(0,3),"$pfnc+$afnc-$tfnc","$afnc+$pfnc-$tfnc","-$tfnc+$pfnc+$afnc","-$tfnc+$afnc+$pfnc"));
$anssgn=$tsgn*if(eq($tnum,0),-1,1);
$answer=if(eq($anssgn,1),"$pans+$aans+$tans","$pans+$aans-$tans");@
qu.1.1.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.1.1.answer=$answer@
qu.2.topic=2-elementary definite integrals@
qu.2.1.mode=Formula@
qu.2.1.comment=The answer is ${mathml("$answer")}.@
qu.2.1.editing=useHTML@
qu.2.1.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$n=range(2,4);
$a=range(1,3);
$b=range(2,7-$n);
condition:lt($a,$b);
$c=range(1,3);
$d=range(1,3);
$s=range(-1,1,2);
$G=if(eq($n,2),$c*$X+$s*($d/$X^2),$c*$X^($n-1)+$s*($d/$X^2));
$F=($c*$X^($n+1)+$s*$d)/$X^2;
$function=switch(range(0,3),$F,$F,$F,$G);
$from=$a;
$to=$b;
$num=$a*$b*$c*($b^$n-$a^$n)+$n*$s*$d*($b-$a);
$den=$n*$a*$b;
$answer=if(eq(gcd($num,$den),$den),$num/$den,$num/"$den");@
qu.2.1.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.2.1.answer=$answer@
qu.2.2.mode=Formula@
qu.2.2.comment=The answer is ${mathml("$answer")}.@
qu.2.2.editing=useHTML@
qu.2.2.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$n=range(2,4);
$a=range(1,3);
$b=range(2,7-$n);
condition:lt($a,$b);
$c=range(1,3);
$d=range(1,3);
$G=if(eq($n,2),$c*$X+$d/sqrt($X),$c*$X^($n-1)+$d/sqrt($X));
$F=($c*$X^$n+$d*sqrt($X))/$X;
$function=switch(range(0,3),$F,$F,$F,$G);
$from=$a;
$to=$b;
$f=-if(eq($a,1),1,0)+if(eq($b,4),2,0);
$num=$c*($b^$n-$a^$n)+2*$n*$d*$f;
$one=if(eq(gcd($num,$n),$n),$num/$n,"$num/$n");
$answer=switch($f+1,"$one"+2*$d*"sqrt($b)","$one"+2*$d*"sqrt($b)"-2*$d*"sqrt($a)","$one","$one"-2*$d*"sqrt($a)");@
qu.2.2.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.2.2.answer=$answer@
qu.2.3.mode=Formula@
qu.2.3.comment=The answer is ${mathml("$answer")}.@
qu.2.3.editing=useHTML@
qu.2.3.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$n=range(2,4);
$case=range(0,3);
$c=range(1,9);
condition:not(eq($c,$n));
$d=range(1,9);
$s=range(-1,1,2);
$two=switch(range(0,1),($d/$X),$d*$X^(-1));
$G=if(eq($n,2),$c*$X+$s*$two,$c*$X^($n-1)+$s*$two);
$F=($c*$X^$n+$s*$d)/$X;
$function=switch(range(0,3),$F,$F,$F,$G);
$from=switch($case,1,2,1,2);
$to=switch($case,"e","e",3,3);
$f=if(eq(gcd($c,$n),$n),$c/$n,"$c/$n");
$num=switch($case,$n*$s*$d-$c,$n*$s*$d-$c*2^$n,$c*(3^$n-1),$c*(3^$n-2^$n));
$k=if(eq(gcd($num,$n),$n),$num/$n,$num/"$n");
$answer=switch($case,"$k"+"$f"*"e"^$n,"$k"+"$f"*"e"^$n-$s*$d*ln("2"),"$k"+$s*$d*ln("3"),"$k"+$s*$d*ln("3")-$s*$d*ln("2"));@
qu.2.3.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.2.3.answer=$answer@
qu.2.4.mode=Formula@
qu.2.4.comment=The answer is ${mathml("$answer")}.@
qu.2.4.editing=useHTML@
qu.2.4.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,2);
$b=range(2,3);
$c=range(1,3);
$d=range(1,3);
$n=range(1,2);
$m=2*$n;
condition:lt($a,$b);
$function=if(eq($n,1),$c+$d*sqrt($X),$c*$X+$d*sqrt($X));
$from=$a^2;
$to=$b^2;
$num=6*$c*($b^$m-$a^$m)/$n+4*$d*($b^3-$a^3);
$answer=if(eq(gcd($num,6),6),$num/6,"$num/6");@
qu.2.4.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.2.4.answer=$answer@
qu.3.topic=3-indefinite substitution@
qu.3.1.mode=Formula Mod C@
qu.3.1.comment=The answer is ${mathml("$answer")}.@
qu.3.1.editing=useHTML@
qu.3.1.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,6);
$b=range(1,6);
condition:gt($a+$b,2);
$n=range(2,5);
$r=range(0,5);
$w=switch($r,$b*$X^$n,-$b*$X^$n,($X+$a)^$n,$b*sin($a*$X),$b*cos($a*$X),$b*sqrt($X));
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X+$a,($X+$a)^($n-1)),cos($a*$X),sin($a*$X),sqrt($X));
$wpcr=switch($r,"1"/($n*$b),-("1"/($n*$b)),"1"/$n,"1"/($a*$b),-("1"/($a*$b)),"2"/$b);
$function=if(lt($r,5),($wpf)*"e"^($w),("e"^($w))/$wpf);
$answer="$wpcr"*"e"^($w);@
qu.3.1.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.3.1.answer=$answer@
qu.3.2.mode=Formula Mod C@
qu.3.2.comment=The answer is ${mathml("$answer")}.@
qu.3.2.editing=useHTML@
qu.3.2.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,6);
$b=range(1,6);
condition:gt($a+$b,2);
$c=range(2,6);
$n=range(2,5);
$r=range(0,7);
$w=switch($r,$c*$X^$n,$a+$b*$X^$n,$b*$X^$n-$a,$a-$b*$X^$n,$c*"e"^$X,$a+$b*"e"^$X,$c*ln($X),$b*sqrt($X));
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),"e"^$X,"e"^$X,$X,sqrt($X));
$wpcr=switch($r,"1"/($n*$c),"1"/($n*$b),"1"/($n*$b),-("1"/($n*$b)),"1"/$c,"1"/$b,"1"/$c,"2"/$b);
$function=if(lt($r,6),"$wpf*cos($w)","cos($w)/$wpf");
$answer="$wpcr*sin($w)";@
qu.3.2.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.3.2.answer=$answer@
qu.3.3.mode=Formula Mod C@
qu.3.3.comment=The answer is ${mathml("$answer")}.@
qu.3.3.editing=useHTML@
qu.3.3.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,6);
$b=range(1,6);
condition:gt($a+$b,2);
$c=range(2,6);
$n=range(2,5);
$r=range(0,7);
$w=switch($r,$c*$X^$n,$a+$b*$X^$n,$b*$X^$n-$a,$a-$b*$X^$n,$c*"e"^$X,$a+$b*"e"^$X,$c*ln($X),$b*sqrt($X));
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),"e"^$X,"e"^$X,$X,sqrt($X));
$wpcnr=switch($r,-("1"/($n*$c)),-("1"/($n*$b)),-("1"/($n*$b)),"1"/($n*$b),-("1"/$c),-("1"/$b),-("1"/$c),-("2"/$b));
$function=if(lt($r,6),"$wpf*sin($w)","sin($w)/$wpf");
$answer="$wpcnr*cos($w)";@
qu.3.3.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.3.3.answer=$answer@
qu.3.4.mode=Formula Mod C@
qu.3.4.comment=The answer is ${mathml("$answer")}.@
qu.3.4.editing=useHTML@
qu.3.4.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,6);
$b=range(1,6);
condition:gt($a+$b,2);
$c=range(2,6);
$k=range(-1,1,2)*range(1,2);
$n=range(2,5);
$m=range(2,5);
$r=range(0,14);
$w=switch($r,$a+$b*$X^$n,$b*$X^$n-$a,$a-$b*$X^$n,$a+$b*"e"^($k*$X),$b*"e"^($k*$X)-$a,$a-$b*"e"^$X,sin($c*$X),cos($c*$X),$a+sin($X),$a-sin($X),$a-cos($X),$a+cos($X),ln($X),$a+ln($X),$a-ln($X));
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),"e"^($k*$X),"e"^($k*$X),"e"^$X,cos($c*$X),sin($c*$X),cos($X),cos($X),sin($X),sin($X),$X,$X,$X);
$wpc=switch($r,$n*$b,$n*$b,-$n*$b,$b*$k,$b*$k,-$b,$c,-$c,1,-1,1,-1,1,1,-1);
$function=if(lt($r,12),("$wpf")*("$w")^$m,(("$w")^$m)/$wpf);
$answer=("1"/(($wpc)*($m+1)))*("$w"^($m+1));@
qu.3.4.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.3.4.answer=$answer@
qu.3.5.mode=Formula Mod C@
qu.3.5.comment=The answer is ${mathml("$answer")}.@
qu.3.5.editing=useHTML@
qu.3.5.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,6);
$b=range(1,6);
condition:gt($a+$b,2);
$c=range(2,6);
$k=range(-1,1,2)*range(1,2);
$n=range(2,5);
$m=range(2,5);
$r=range(0,14);
$w=switch($r,$a+$b*$X^$n,$b*$X^$n-$a,$a-$b*$X^$n,$a+$b*"e"^($k*$X),$b*"e"^($k*$X)-$a,$a-$b*"e"^$X,sin($c*$X),cos($c*$X),$a+sin($X),$a-sin($X),$a-cos($X),$a+cos($X),ln($X),$a+ln($X),$a-ln($X));
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),"e"^($k*$X),"e"^($k*$X),"e"^$X,cos($c*$X),sin($c*$X),cos($X),cos($X),sin($X),sin($X),$X,$X,$X);
$wpc=switch($r,$n*$b,$n*$b,-$n*$b,$b*$k,$b*$k,-$b,$c,-$c,1,-1,1,-1,1,1,-1);
$function=if(lt($r,12),("$wpf")/sqrt("$w"),1/($wpf*sqrt("$w")));
$answer=("2"/($wpc))*sqrt("$w");@
qu.3.5.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.3.5.answer=$answer@
qu.3.6.mode=Formula Mod C@
qu.3.6.comment=The answer is ${mathml("$answer")}.@
qu.3.6.editing=useHTML@
qu.3.6.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,6);
$b=range(1,6);
condition:gt($a+$b,2);
$c=range(2,6);
$k=range(-1,1,2)*range(1,2);
$n=range(2,5);
$m=range(2,5);
$r=range(0,14);
$w=switch($r,$a+$b*$X^$n,$b*$X^$n-$a,$a-$b*$X^$n,$a+$b*"e"^($k*$X),$b*"e"^($k*$X)-$a,$a-$b*"e"^$X,sin($c*$X),cos($c*$X),$a+sin($X),$a-sin($X),$a-cos($X),$a+cos($X),ln($X),$a+ln($X),$a-ln($X));
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),"e"^($k*$X),"e"^($k*$X),"e"^$X,cos($c*$X),sin($c*$X),cos($X),cos($X),sin($X),sin($X),$X,$X,$X);
$wpc=switch($r,$n*$b,$n*$b,-$n*$b,$b*$k,$b*$k,-$b,$c,-$c,1,-1,1,-1,1,1,-1);
$function=if(lt($r,12),("$wpf")/("$w")^2,1/($wpf*("$w")^2));
$answer=if(gt($wpc,0),"-1"/($wpc*("$w")),"1"/(-$wpc*("$w")) );@
qu.3.6.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.3.6.answer=$answer@
qu.4.topic=4-definite substitution@
qu.4.1.mode=Formula@
qu.4.1.comment=The answer is ${mathml("$answer")}.@
qu.4.1.editing=useHTML@
qu.4.1.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,2);
$b=range(1,3);
condition:gt($a+$b,2);
$n=range(4,6);
$m=$n-1;
$r=range(0,2);
$w=switch($r,$a+$b*$X,$b*$X+$a,$b*$X-$a);
$function=($w)^$m;
$from=range(0,1);
$to=range(1,3)+$from;
condition:gt($to,1);
$num=if(eq($r,2),"($b*$to-$a)^$n"-($b*$from-$a)^$n,if(eq($from,0),"($b*$to+$a)^$n"-($b*$from+$a)^$n,"($b*$to+$a)^$n-($b*$from+$a)^$n"));
$answer="$num"/($b*$n);@
qu.4.1.question=Compute ${mathml($function)} ${mathml(d*$X)}.@
qu.4.1.answer=$answer@
qu.4.2.mode=Formula@
qu.4.2.comment=The answer is ${mathml("$answer")}.@
qu.4.2.editing=useHTML@
qu.4.2.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(2,5);
$b=range(1,5);
$n=range(2,5);
$r=range(0,2);
$t=range(2,4);
condition:not(gt($t+$n,6));
$s=switch($r,1,1,-1);
$q=switch($r,7,1,$t^$n);
condition:gt($s*$b*$q,$s*$a);
$w=switch($r,$a+$b*$X^$n,$b*$X^$n-$a,$a-$b*$X^$n);
$wpf=switch($r,if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)),if(eq($n,2),$X,$X^($n-1)));
$wpc=switch($r,$n*$b,$n*$b,-$n*$b);
$function=($wpf)/($w);
$from=switch($r,0,1,0);
$to=$t;
$wto=switch($r,$a+$b*$to^$n,$b*$to^$n-$a,$a-$b*$to^$n);
$wfrom=switch($r,$a,$b-$a,$a);
$answer=("1"/($wpc))*"ln($wto/$wfrom)";@
qu.4.2.question=Compute ${mathml($function)} ${mathml(d*$X)}.@
qu.4.2.answer=$answer@
qu.4.3.mode=Formula@
qu.4.3.comment=The answer is ${mathml("$answer")}.@
qu.4.3.editing=useHTML@
qu.4.3.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(2,5);
$b=range(1,6);
$r=range(0,2);
$t=range(1,3);
$s=switch($r,1,1,-1);
$p=switch($r,2,0,$t);
condition:gt($s*$b*e^$p,$s*$a);
$w=switch($r,$a+$b*"e"^$X,$b*"e"^$X-$a,$a-$b*"e"^$X);
$wpf="e"^$X;
$wpc=switch($r,$b,$b,-$b);
$function=("$wpf")/("$w");
$from=0;
$to=$t;
$wto=switch($r,$a+$b*"e"^$to,$b*"e"^$to-$a,$a-$b*"e"^$to);
$wfrom=switch($r,$a+$b,$b-$a,$a-$b);
$answer=if(eq($wfrom,1),("1"/($wpc))*"ln($wto)",("1"/($wpc))*"ln(($wto)/($wfrom))");@
qu.4.3.question=Compute ${mathml("$function")} ${mathml(d*$X)}.@
qu.4.3.answer=$answer@
qu.4.4.mode=Formula@
qu.4.4.comment=The answer is ${mathml("$answer")}.@
qu.4.4.editing=useHTML@
qu.4.4.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(2,5);
$c=range(2,5);
$r=range(0,4);
$rd=range(0,3);
condition:gt($r+$rd,0);
$w=switch($r,cos($c*$X),$a+sin($X),$a-sin($X),$a-cos($X),$a+cos($X));
$wpf=switch($r,sin($c*$X),cos($X),cos($X),sin($X),sin($X));
$wpc=switch($r,-$c,1,-1,1,-1);
$function=if(eq($r,0),tan($c*$X),($wpf)/($w));
$from=0;
$d=switch($rd,2,3,4,6);
$dento=if(eq($r,0),$c*$d,$d);
$sin=switch($rd,2,"sqrt(3)","sqrt(2)",1);
$cos=switch($rd,0,1,"sqrt(2)","sqrt(3)");
$wto=switch($r,"$cos",2*$a+"$sin",2*$a-"$sin",2*$a-"$cos",2*$a+"$cos");
$wfrom=switch($r,2,2*$a,2*$a,2*$a-2,2*$a+2);
$answer=if(eq($wfrom,1),("1"/($wpc))*"ln($wto)",("1"/($wpc))*"ln(($wto)/($wfrom))");@
qu.4.4.question=Compute ${mathml($function)} ${mathml(d*$X)}.@
qu.4.4.answer=$answer@
qu.4.5.mode=Formula@
qu.4.5.comment=The answer is ${mathml("$answer")}.@
qu.4.5.editing=useHTML@
qu.4.5.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(2,5);
$n=range(2,5);
$m=$n-1;
$r=range(0,1);
$function=switch($r,if(eq($m,1),$X/(1+$X^4),$X^$m/(1+$X^(2*$n))),1/(1+$a^2*$X^2));
$from=range(0,1);
$to=range(1,3)+$from;
condition:gt($to,1);
$answer=switch($r,switch($from,"(arctan($to^$n))"/$n,"(4*arctan($to^$n)-pi)"/(4*$n)),switch($from,"(arctan($a*$to))"/$a,"(arctan($a*$to)-arctan($a))"/$a));@
qu.4.5.question=Compute ${mathml($function)} ${mathml(d*$X)}.@
qu.4.5.answer=$answer@
qu.5.topic=5-integration by parts@
qu.5.1.mode=Formula Mod C@
qu.5.1.comment=The answer is ${mathml("$answer")}.@
qu.5.1.editing=useHTML@
qu.5.1.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,9);
$b=range(1,9);
$c=range(-9,9);
$d=range(-9,9);
condition:eq(($a-1)*$c*$d,0);
condition:not(eq(($a-1)*($c+$d)+$c*$d,0));
$function=($b*$X+$d)*cos($a*$X+$c);
$A=$a/gcd($a,$b);
$B=$b/gcd($a,$b);
$term=if(eq($A,1),$B*$X,($B*$X)/($A));
$answer=($term+("$d")/($a))*sin($a*$X+$c)+(("$b")/($a^2))*cos($a*$X+$c);@
qu.5.1.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.5.1.answer=$answer@
qu.5.2.mode=Formula Mod C@
qu.5.2.comment=The answer is ${mathml("$answer")}.@
qu.5.2.editing=useHTML@
qu.5.2.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,9);
$b=range(1,9);
$c=range(-9,9);
$d=range(-9,9);
condition:eq(($a-1)*$c*$d,0);
condition:not(eq(($a-1)*($c+$d)+$c*$d,0));
$function=($b*$X+$d)*sin($a*$X+$c);
$A=$a/gcd($a,$b);
$B=$b/gcd($a,$b);
$term=if(eq($A,1),$B*$X,($B*$X)/($A));
$answer=-($term+("$d")/($a))*cos($a*$X+$c)+(("$b")/($a^2))*sin($a*$X+$c);@
qu.5.2.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.5.2.answer=$answer@
qu.5.3.mode=Formula Mod C@
qu.5.3.comment=The answer is ${mathml("$answer")}.@
qu.5.3.editing=useHTML@
qu.5.3.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$b=range(1,9);
$d=range(-9,9);
$k=range(-9,9);
$q=$k*$d-$b;
condition:not(eq($q*$k*($k-1),0));
condition:gt(max($k,$q),0);
$function=($b*$X+$d)*"e"^($k*$X);
$a=abs($k);
$s=$k/$a;
$D=gcd($a,$b);
$A=$a/$D;
$B=$b/$D;
$xt=if(eq($A,1),$B*$X,($B*$X)/($A));
$answer=if(eq($s,1),($xt+"$q"/$k^2)*"e"^($k*$X),("$q"/$k^2-$xt)*"e"^($k*$X));@
qu.5.3.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.5.3.answer=$answer@
qu.5.4.mode=Formula Mod C@
qu.5.4.comment=The answer is ${mathml("$answer")}.@
qu.5.4.editing=useHTML@
qu.5.4.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$b=range(1,9);
$p=range(-9,9);
condition:not(eq($p,0));
$r=range(0,11);
$n=switch($r,2,4,6,8,10,12,-4,-6,3,5,1,-1);
$q=$n/2;
$case=switch($r,0,1,1,1,1,1,2,2,3,3,4,5);
$function=switch($case,($b*$X+$p)*ln($X),($b*$X^$q+$p)*ln($X),$b*(ln($X)/$X^(-$q)),$b*$X^("$n/2")*ln($X),$b*sqrt($X)*ln($X),$b*(ln($X)/sqrt($X)));
$c=if(lt($case,2),$p,0);
$answer=((("2*$b")/($n+2))*$X^(($n+2)/"2")+$c*$X)*ln($X)-((("4*$b")/($n+2)^2)*$X^(($n+2)/"2")+$c*$X);@
qu.5.4.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.5.4.answer=$answer@
qu.5.5.mode=Formula Mod C@
qu.5.5.comment=The answer is ${mathml("$answer")}.@
qu.5.5.editing=useHTML@
qu.5.5.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,9);
$b=range(-9,9);
condition:not(eq($b*($b^2+$a-2),0));
$r=range(0,1);
$fnc=switch($r,arctan($a*$X),arcsin($a*$X));
$function=$b*$fnc;
$anszero=if(gt($b,0),$b*$X*$fnc-("$b/(2*$a)")*ln(1+$a^2*$X^2),$b*$X*$fnc+("-$b/(2*$a)")*ln(1+$a^2*$X^2));
$ansone=if(gt($b,0),$b*$X*$fnc+("$b/$a")*sqrt(1-$a^2*$X^2),$b*$X*$fnc-("-$b/$a")*sqrt(1-$a^2*$X^2));
$answer=switch($r,"$anszero","$ansone");@
qu.5.5.question=Compute
${mathml("$function")} ${mathml(d*$X)}.@
qu.5.5.answer=$answer@
qu.6.topic=6-quadratic denominators@
qu.6.1.mode=Formula Mod C@
qu.6.1.comment=The answer is ${mathml("$answer")}.@
qu.6.1.editing=useHTML@
qu.6.1.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(-6,1);
$b=$a+range(1,5);
$c=range(-4,4);
$d=range(-9,9);
$k=2*$a*$c+$d;
$p=2*$b*$c+$d;
condition:not(eq($c*$k*$p*($a*$c+$b*$c+$d),0));
$function=(2*$c*$X+$d)/($X^2-($a+$b)*$X+$a*$b);
$ansone=(($p)/"($b-$a)")*ln(abs($X-$b))-(($k)/"($b-$a)")*ln(abs($X-$a));
$anstwo=(($p)/"($b-$a)")*ln(abs($X-$b))+((-$k)/"($b-$a)")*ln(abs($X-$a));
$answer=if(gt($k,0),"$ansone","$anstwo");@
qu.6.1.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.6.1.answer=$answer@
qu.6.2.mode=Formula Mod C@
qu.6.2.comment=The answer is ${mathml("$answer")}.@
qu.6.2.editing=useHTML@
qu.6.2.algorithm=$V=switch(rint(7),"t","u","v","w","x","y","z");
$X=$V;
$a=range(1,5);
$b=range(-4,4);
$c=range(1,9);
$d=range(-9,9);
condition:not(eq($b*(2*$b*$c+$d),0));
$function=(2*$c*$X+$d)/($X^2-(2*$b)*$X+($a^2+$b^2));
$arg=if(eq($a,1),$X-$b,($X-$b)/$a);
$k=2*$b*$c+$d;
$ansone=$c*ln(($X-$b)^2+$a^2)+(($k)/"$a")*arctan($arg);
$anstwo=$c*ln(($X-$b)^2+$a^2)-((-$k)/"$a")*arctan($arg);
$answer=if(gt($k,0),"$ansone","$anstwo");@
qu.6.2.question=Compute
${mathml($function)} ${mathml(d*$X)}.@
qu.6.2.answer=$answer@