## Forum archive 2000-2006

### Michael Hamm - +-

by Arnold Pizer -
Number of replies: 0
 +- topic started 1/11/2006; 1:15:02 PMlast post 1/11/2006; 4:47:22 PM
 Michael Hamm - +-  1/11/2006; 1:15:02 PM (reads: 316, responses: 2) I have ... $b=random(1,11,1)*random(-1,1,2); ... The equation of the line tangent to the curve ( y =$a x^3 + $b x ) at ... How do I rig it so that, if$b<0, it doesn't look like +-? Thanks, <| Post or View Comments |>

 Bob Byerly - Re: +-  1/11/2006; 3:05:19 PM (reads: 390, responses: 0) You might want to look at the documentation for FEQ in http://math.webwork.rochester.edu/docs/docs/pglanguage/pod/pgbasicmacros.html Bob <| Post or View Comments |>

 John Jones - Re: +-  1/11/2006; 4:47:22 PM (reads: 399, responses: 0) If the equation and text are between BEGIN_TEXT/END_TEXT, then this should happen automatically. It also usually makes the problem more readable. It is also possible that b is 1 or -1. To fix those cases as well, you could use $a = random(...);$b=random(1,11,1)*random(-1,1,2);$rhs = nicestring([$a, 0, $b, 0]);# or#$rhs = nicestring([$a,$b], [x^3, x]);BEGIN_TEXTThe equation of the line tangent to the curve $$y = rhs$$ at ...END_TEXT I think nicestring is also in PGbasicmacros. John <| Post or View Comments |>