I am getting the following message when trying to enable "Show Me Another", SMA for some but not all problems.

WeBWorK was unable to generate a different version of this problem; close this tab, and return to the original problem.

I thought that as long as there were randomization of inputs that resulted in different answers that the SMA would be enabled. What else could the issue be if not that?

I have included a sample problem if you could please help point out what is causing webwork to not show SMA:

There is an image, in the code, but it is not key to solving the problem...

## DESCRIPTION

## Calculus

## ENDDESCRIPTION

## Tagged by tda2d

## DBsubject(Calculus - single variable)

## DBchapter(Applications of differentiation)

## DBsection(Optimization - general)

## Date(6/3/2002)

## Institution(Indiana)

## Author(Utah ww group)

## MLT(Optimization_Ladder)

## MLTleader(1)

## Level(5)

## MO(1)

## TitleText1('Calculus: Early Transcendentals')

## AuthorText1('Stewart')

## EditionText1('6')

## Section1('4.7')

## Problem1('49')

## TitleText2('Calculus I')

## AuthorText2('Jerrold Marsden and Alan Weinstein')

## EditionText2('2')

## Section2('.')

## Problem2('')

## TitleText3('Calculus')

## AuthorText3('Dale Varberg, Edwin J. Purcell, and Steven E. Rigdon')

## EditionText3('9')

## Section3('.')

## Problem3('')

## TitleText4('Calculus: Early Transcendentals')

## AuthorText4('Rogawski')

## EditionText4('1')

## Section4('4.6')

## Problem4('49')

## KEYWORDS('derivative' 'extrema' 'optimization','calculus','Optimization', 'Fence','Derivatives','maximization' 'minimization' 'derivatives' 'optimization')

## Library/Union/setDervOptimization/nsc4_6_16

DOCUMENT(); # This should be the first executable line in the problem.

loadMacros(

"PGstandard.pl",

"PGunion.pl", # Union College utilities

"MathObjects.pl",

"niceTables.pl",

"PGcourse.pl", # Customization file for the course

"PGML.pl",

"parserNumberWithUnits.pl",

"parserFormulaWithUnits.pl"

);

$SPACER = MODES(

HTML=>'<span style="visibility:hidden"> Product A </span>',

TeX=>'\phantom{Product A}'

);

TEXT(beginproblem());

###################################

# Setup

$h = random(3,8,1);

$w = random(2,9,1);

if ($h == $w)

{ $w = random(2,9,1);

}

$wh =$w*$h;

$h2 =2*$h;

$wh2 = $wh*$h2;

$wh1 = $w*$h*$h;

$hh =$h*$h;

$hhw =$h*$h*$w;

if ($w == 4 || $w == 9) #ScenarioA

{

$s =21;

$wd = $w**0.5;

$ans1 = "\frac{1}{$wd} \cdot (\sqrt[3]{$hhw} +$w)^{\frac{3}{2}}";

$ans2 = 1/$wd*($hhw**(1/3)+$w)**(3/2);

} else {

$s =22;

$ans1 = "\frac{\sqrt{$w}}{$w} \cdot (\sqrt[3]{$hhw} +$w)^{\frac{3}{2}}";

$ans2 = $w**0.5/$w*($hhw**(1/3)+$w)**(3/2);

}

$ans3 =sprintf("%0.3f",$ans2);

$theta =arctan( ( $h/$w ) **(1/3) ); # optimum angle

$ans = $w/cos($theta) + $h/(sin( $theta) ); # length of the ladder.

$ans7 = NumberWithUnits( "$ans ft");

###################################

# Main text

BEGIN_PGML

A fence [$h] feet tall runs parallel to a tall building at a distance

of [$w] feet from the building.

[@ image( "Ladder_Fence.png", width=>458, height=>345,

tex_size=>700, extra_html_tags=>'alt="The leaning ladder forms a right triangle." ' )@]***

What is the length of the shortest ladder that will

reach from the ground over the fence to the wall of the building?

_(Include [@ helpLink('units') @]* in your answer.)_

Length of ladder = [_____]{$ans7}{40}

END_PGML

###################################

# Answers

$showPartialCorrectAnswers = 1;

$theta =arctan( ( $h/$w ) **(1/3) ); # optimum angle

$ans = $w/cos($theta) + $h/(sin( $theta) ); # length of the ladder.

#ANS(Real($ans)->cmp);

###################################

BEGIN_SOLUTION

$BR

The solution to minimizing the ladder length begins with recognizing the three similar triangles that lie within the configuration of the ladder, fence and building. Consider the image below that reveals these three triangles.$BR

$BR

$BR

\{ image( "Ladder_Fence2.png", width=>862, height=>298,

tex_size=>700, extra_html_tags=>'alt="Three similar triangles are formed." ' ) \}

$BR

$PAR

Let's declare variables for the different lengths associated with three similar triangles formed by the building, ladder and fence: $BR

$BR

\(L =\) The length of the ladder in feet. $BR

$BR

\(y =\) The vertical height of the ladder's contact with the building in feet. $BR

$BR

\(x =\) The horizontal distance between the building and the foot of the ladder in feet. $BR

$BR

\(f = $h =\) The height of the fence in feet. $BR

$BR

\(g = $w =\) The horizontal distance between the building and the fence in feet. $BR

$BR

\(y - f = y - $h =\) The vertical height between the top of the fence and the point of the ladder's contact with the building in feet. $BR

$BR

\(x - g = x - $w =\) The horizontal distance between the fence and the foot of the ladder in feet. $BR

$BR

The right angle legs of all three right triangles will form equivalent ratios: $BR

$BR

\(\displaystyle{\frac{y}{x}=\frac{y - f}{g}=\frac{f}{x - g}} \) $BR

$BR

Substituting for the given values: $BR

$BR

\(\displaystyle{\frac{y}{x}=\frac{y - $h}{$w}=\frac{$h}{x - $w}} \) $BR

$BR

Use the leg ratio of the large triangle with either one of the leg ratios of the smaller triangles to establish an equation for the variables of \(x\) and \(y\). Our immediate goal here is to solve for \(y\) in terms of \(x\).$BR

$BR

\(\begin{aligned}&\\

\frac{y}{x} & = \frac{y - $h}{$w} && \text{Using the first two triangle leg ratios. }\\

\frac{y}{x} \cdot $w x &= \frac{y - $h}{$w} \cdot $w x && \text{Cross multiply to clear the denominators.}\\

$w y & = (y - $h) x && \text{Distribute through the quantity. }\\

$w y & = yx -$h x && \text{ }\\

$w y - yx & = -$h x && \text{Push the terms of }y \text{ to one side of the equation.}\\

y($w - x) & = -$h x && \text{Pull the factor of }y.\\

y & = \frac{(-$h x)}{($w - x)} \cdot \frac{-1}{-1} && \text{Divide by } ($w - x) \text{ and clear the negative values. }\\

y & = \frac{$h x}{ x -$w} && \text{The variable of } y \text{ in terms of } x.\\

\end{aligned}\)

$BR

$BR

By expressing \(y\) in terms of \(x\) we can use the Pythagorean theorem to determine an equation for the length of the ladder, \(L\), (the hypotenuse of the larger triangle) in terms of \(x\). We then apply the derivative to the ladder length equation. By setting the derivative to zero we can solve for the minimum ladder length necessary to span the fence and building.

$BR

$BR

\(\begin{aligned}&\\

L^2 & = x^2 + y^2 && \text{By the Pythagorean theorem. }\\

L^2 & = x^2 + \left(\frac{$h x}{ x -$w}\right)^2 && \text{Substituting for } y = \frac{$h x}{ x -$w}. \\

L(x) & = \pm \sqrt{x^2 + \left(\frac{$h x}{ x -$w}\right)^2} && \text{Taking the square root returns a function of }x.

\end{aligned}\)

$BR

$BR

Note that the goal of minimizing the ladder length as represented by the function of \(L(x)\) can be accomplished by minimizing the contents of the root which we call the radicand. Doing so permits us to take the derivative of a much simpler function.

The only caveat here is that we must be sure that the radicand is greater than tha number one, which it surely is in this case. Lets represent the radicand with the function name of \(R(x)\). $BR

$BR

\(\displaystyle{ R(x) = \left(x^2 + \left(\frac{$h x}{ x -$w}\right)^2\right) }\) $BR

$BR

Apply prime tics to both terms in preparation for applying the derivative.

$BR

\(\displaystyle{ R'(x) = \left(x^2\right)' + \left(\left(\frac{$h x}{ x -$w}\right)^2\right)'}\) $BR

$BR

Expand the prime tics for two applications of the chain rule: $BR

$BR

\(\displaystyle{ R'(x) = \left(x^2\right)' + \left(\left(\frac{$h x}{ x -$w}\right)^2\right)' \left(\frac{$h x}{ x -$w} \right)' }\) $BR

$BR

Apply the derivative, taking care to use the quotient rule on the last fraction under a prime tic.

$BR

$BR

\(\displaystyle{ R'(x) = 2x + 2\left(\frac{$h x}{ x -$w}\right) \cdot \left(\frac{($h x)'(x -$w) - (x -$w)' $h x}{ (x -$w)^2} \right) }\) $BR

$BR

$BR

Apply the derivative for the quotient rule.

$BR

$BR

\(\displaystyle{ R'(x) = 2x + 2\left(\frac{$h x}{ x -$w}\right) \cdot \left(\frac{$h(x -$w) - $h x}{(x -$w)^2} \right) }\) $BR

$BR

Distribute through the last two quantities: $BR

$BR

$BR

\(\displaystyle{ R'(x) = 2x + \left(\frac{$h2 x}{ x -$w}\right) \cdot \left(\frac{$h x -$wh - $h x}{(x -$w)^2} \right) }\) $BR

$BR

Collect like terms: $BR

$BR

$BR

\(\displaystyle{ R'(x) = 2x + \left(\frac{$h2 x}{ x -$w}\right) \cdot \left(\frac{ -$wh }{(x -$w)^2} \right) }\) $BR

$BR

$BR

Combine the last two factors: $BR

$BR

$BR

\(\displaystyle{ R'(x) = 2x + \left(\frac{ -$wh2 x }{(x -$w)^3} \right) }\) $BR

$BR

$BR

Pull the out the common factor of \(2x\) and place it in front: $BR

$BR

$BR

\(\displaystyle{ R'(x) = 2x \left(1 - \frac{ $wh1 }{(x -$w)^3} \right) }\) $BR

$BR

$BR

Build a common denominator for the quantity: $BR

$BR

$BR

\(\displaystyle{ R'(x) = 2x \left(1\cdot \frac{(x -$w)^3}{(x -$w)^3} - \frac{ $wh1 }{(x -$w)^3} \right) }\) $BR

$BR

$BR

Combine the common denominator: $BR

$BR

$BR

\(\displaystyle{ R'(x) = 2x \left( \frac{ (x -$w)^3 - $wh1 }{(x -$w)^3} \right) }\) $BR

$BR

$BR

Set the reduced derivative to zero and solve for \(x\): $BR

$BR

$BR

\(\displaystyle{ R'(x) = \frac{2x \left( (x -$w)^3 - $wh1\right)}{(x -$w)^3} = 0 }\) $BR

$BR

$BR

Recognize that the denominator quantities will clear on the first step so we have only to set the numerator quantity to zero: $BR

$BR

\(\displaystyle{ R'(x) = 2x \left( (x -$w)^3 - $wh1\right) = 0 }\) $BR

$BR

Recognize that the denominator quantities will clear on the first step so we have only to set the numerator quantity to zero: $BR

$BR

The trivial solution of \(x = 0\) is discarded. $BR

$BR

Then we must solve for : \((x -$w)^3 - $wh1 = 0 \)

$BR

\(\begin{aligned}&\\

(x -$w)^3 & = $wh1 && \text{Isolating the term holding }x.\\

\sqrt[3]{(x -$w)^3} & = \sqrt[3]{$wh1} && \text{Apply the cube root to both sides. } \\

x -$w & = \sqrt[3]{$wh1} && \text{Reduce the cube powers }\\

x & = \sqrt[3]{$wh1} +$w && \text{Solve for }x.

\end{aligned}\)

$BR

$BR

Substitute \(x = \sqrt[3]{$wh1} +$w\) back into the ladder length equation of \(L(x)\) to find the minimum length: $BR

$BR

\(\displaystyle{ L(x) = \left(x^2 + \left(\frac{$h x}{ x -$w}\right)^2\right)^\frac{1}{2} }\) $BR

$BR

\(\begin{aligned}&\\

L(\sqrt[3]{$wh1} +$w) &= \left(\left(\sqrt[3]{$wh1} +$w \right)^2 + \left(\frac{$h \left(\sqrt[3]{$wh1} +$w\right)}{ \left(\sqrt[3]{$wh1} +$w\right) -$w}\right)^2\right)^\frac{1}{2} && \text{Substitute the minimizing value of }x.\\

L(\sqrt[3]{$wh1} +$w) &= \left(\left(\sqrt[3]{$wh1} +$w \right)^2 + \left(\frac{$h \left(\sqrt[3]{$wh1} +$w\right)}{ \sqrt[3]{$wh1}}\right)^2\right)^\frac{1}{2} && \text{Collect like terms in the denominator. }

\end{aligned}\)

$BR

$BR

Distribute the power of \(2\) to the three factors of the fraction.$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\left(\sqrt[3]{$wh1} +$w \right)^2 + \frac{$h^2 \left(\sqrt[3]{$wh1} +$w\right)^2}{ \left(\sqrt[3]{$wh1}\right)^2}\right)^\frac{1}{2} }\) $BR

$BR

Pull the common factor of \(\left(\sqrt[3]{$wh1} +$w\right)^2\) from both terms within the quantity. $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\left(\sqrt[3]{$wh1} +$w \right)^2 \cdot \left( 1 + \frac{$h^2}{ \left(\sqrt[3]{$wh1}\right)^2}\right)\right)^\frac{1}{2} }\) $BR

$BR

$BR

Distribute the power of \(\frac{1}{2}\) to both factors and prepare to rationalize the denominator by converting the root to a rational exponent and then multiplying the numerator and denominator by \( $wh1^\frac{1}{3}\). $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\sqrt[3]{$wh1} +$w \right)^{2 \cdot \frac{1}{2}} \cdot \left( 1 + \frac{$h^2 \cdot $wh1^{\frac{1}{3}}}{ $wh1^{\frac{2}{3}} \cdot $wh1^{\frac{1}{3}}}\right)^\frac{1}{2} }\) $BR

$BR

$BR

Combine first powers and convert the numerator back to a root. Square the fence height, of \($h\) feet. $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\sqrt[3]{$wh1} +$w \right) \left( 1 + \frac{$hh \cdot \sqrt[3]{$wh1}}{ $wh1 }\right)^\frac{1}{2} }\) $BR

$BR

$BR

Reduce the fraction and build a common denominator in the isolated term. $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\sqrt[3]{$wh1} +$w \right) \left( 1 \cdot \frac{$w}{$w} + \frac{ \sqrt[3]{$wh1}}{ $w }\right)^\frac{1}{2} }\) $BR

$BR

$BR

Reduce the fraction and build a common denominator in the isolated term. $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\sqrt[3]{$wh1} +$w \right) \left(\frac{$w + \sqrt[3]{$wh1}}{ $w } \right)^{\frac{1}{2}} }\) $BR

$BR

$BR

Split the power between the numerator and denominator and rearrange terms. $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \left(\sqrt[3]{$wh1} +$w \right) \frac{ \left(\sqrt[3] {$wh1}+$w \right)^{\frac{1}{2}} }{\left( $w \right)^{\frac{1}{2}} } }\) $BR

$BR

$BR

Combine the common bases and rationalize the denominator. $BR

$BR

$BR

\(\displaystyle{L(\sqrt[3]{$wh1} +$w) = \frac{1}{\sqrt{$w }} \cdot \frac{\sqrt{$w }}{\sqrt{$w }}\left(\sqrt[3] {$wh1}+$w \right)^{\frac{3}{2}} }\) $BR

$BR

$BR

Then the minimum length for the ladder is: $BR

$BR

\( \displaystyle{L(\sqrt[3]{$wh1} +$w) = $ans1 \approx $ans3 \quad }\) feet.

$PAR

END_SOLUTION

;

ENDDOCUMENT();