'+nl win_out_start+='
"
this_ANS[1]="< "+Iw(p1,1)+"/"+Iw(p3,1)+" , "+Iw(p2,1)+"/"+Iw(p3,1)+" >"
break;
case 2: // Find the unit vector in the direction v= "
this_ANS[1]="< "+Iw(p1,1)+"/"+Iw(p4,1)+" , "+Iw(p2,1)+"/"+Iw(p4,1)
this_ANS[1]+=" , "+Iw(p3,1)+"/"+Iw(p4,1)+" >"
break;
case 3: // For f(x,y)= ax^b + cy^d find the directional derivative
// of f at (e,f) in the direction of v= "
x=a*b*Math.pow(e,b-1)*p1/p3+c*d*Math.pow(f,d-1)*p2/p3;
this_ANS[1]=""+Fwd(x,9,3)+""
break;
case 4: // For f(x,y)=a[x or y]^b*[sin cos, tan or cot] (a[y or x])
// find the directional derivative at (f,g) in direction v= ";
if( d==1 )
{ // x then y
x=a*b*Math.pow(f,b-1)*p1/p3;
switch (e)
{ case 1: // sin
x=x*Math.sin(c*g);
x+=c*a*Math.pow(f,b)*(Math.cos(c*g))*p2/p3;
break;
case 2: // cos
x=x*Math.cos(c*g);
x+=c*a*Math.pow(f,b)*(-1)*(Math.sin(c*g))*p2/p3;
break;
case 3: // tan
x=x*Math.tan(c*g);
x+=c*a*Math.pow(f,b)*(p2/p3)*(1/Math.pow(Math.cos(c*g),2) );
break;
case 4: // cot
x=x/Math.tan(c*g);
x+=c*a*Math.pow(f,b)*(p2/p3)*(-1/Math.pow(Math.sin(c*g),2) );
break;
}
}
else
{ // y then x
x=a*b*Math.pow(g,b-1)*p2/p3;
switch (e)
{ case 1: // sin
x=x*Math.sin(c*f);
x+=c*a*Math.pow(g,b)*(Math.cos(c*f))*p1/p3;
break;
case 2: // cos
x=x*Math.cos(c*f);
x+=c*a*Math.pow(g,b)*(-1)*(Math.sin(c*f))*p1/p3;
break;
case 3: // tan
x=x*Math.tan(c*f);
x+=c*a*Math.pow(g,b)*(p1/p3)*(1/Math.pow(Math.cos(c*f),2) );
break;
case 4: // cot
x=x/Math.tan(c*f);
x+=c*a*Math.pow(g,b)*(p1/p3)*(-1/Math.pow(Math.sin(c*f),2) );
break;
}
}
this_ANS[1]=""+Fwd(x,9,3)+""
break;
case 5: // For f(x,y) = ax^b+c(x^d)(y^e)+fy^g find del f(x,y).
//
for (i=1; i<=6; i++)
{coeff[i]=i+1; coeff[i+6]=(i+1)*( (Math.random()>0.5)?1:-1) ; }
lcl_shuffle(coeff,1,6);
lcl_shuffle(coeff,7,12);
a=coeff[7]; c=coeff[8]; f=coeff[9];
b=coeff[1]; d=coeff[2]; e=coeff[3]; g=coeff[4];
this_prob+="For f(x,y)= "+Iw(a,1)+"x"+b+" + ";
this_prob+=Iw(c,1)+"x"+d+"y"+e+" + "
this_prob+=Iw(f,1)+"y"+g+", "
this_prob+="find ";
x="("+(a*b)+"x"+(b-1)+" + "+(c*d)+"x"+(d-1)+"y"+e+")i"
y="("+(c*e)+"x"+d+"y"+(e-1)+" + "+(f*g)+"y"+(g-1)+")j"
this_ANS[1]=x+" + "+y
break;
case 6: // For f(x,y) = x^2 +y^2+ ax +b sin(cy) what is the
// (maximum||minimum) increase of f at the point (d,e) where -4 "
x=2*d+a
y=2*e+b*c*Math.cos(c*e)
if(f==1) { x=-x; y=-y; }
this_ANS[1]=Fwd(x,3,3)+"i +"+Fwd(y,3,3)+"j"
break;
case 7: //For f(x,y) = x^2 +y^2+ ax +b sin(cy) what is the
// direction, expressed as a linear comnbination of i and j, of the
// (maximum||minimum) increase of f at the point (d,e) where -4 ";
// now, to construct the answer
x="( "+a_t+"("+d_t+")"
if(e==1)
{ if( b==1 )
{ x+=" + y cos(x)"; }
else
{ x+=" – y sin(x)"; }
}
if(f==1)
{ if( c==1 )
{ x+=" + z cos(x)"; }
else
{ x+=" – z sin(x)"; }
}
x+=" ) i + ";
y="( ";
if(d==1)
{ if( a==1 )
{ y+="x cos(y)"; }
else
{ y+="–x sin(y)"; }
y+=" + "
}
y+=b_t+"("+e_t+")"
if(f==2)
{ if( c==1 )
{ y+=" + z cos(y)"; }
else
{ y+=" – z sin(y)"; }
}
y+=" ) j + ";
z="( ";
if(d==2)
{ if( a==1 )
{ z+="x cos(z)"; }
else
{ z+="–x sin(z)"; }
z+=" + ";
}
if(e==2)
{ if( b==1 )
{ z+="y cos(z)"; }
else
{ z+="–y sin(z)"; }
z+=" + ";
}
z+=c_t+"("+f_t+")"
z+=" ) k";
this_ANS[1]=x+y+z
break;
case 9: // for z^3 = x^2 - y^2 + ay + bxy + c find the equation
// of the plane, in general form, that is tangent to the surface at
// the point (p1,p2,p3)
//
a=get_rand(2,8,false)
b=get_rand_not(3,7,false,a)
p1=get_rand_not(-2,5,false,0)
p2=get_rand_not(-3,1,false,0)
p3=get_rand_not(-3,3,false,0)
c=p3*p3*p3-p1*p1+p2*p2*p2-a*p2-b*p1*p2
this_prob+="For z³=x² – y³ + "+Iw(a,1)+"y + "+Iw(b,1)+"xy + "
this_prob+=Iw(c,1)+", find the equation of the plane that is tangent to the surface at ";
this_prob+="the point ("+Iw(p1,1)+","+Iw(p2,1)+","+Iw(p3,1)+"). "
this_prob+="Give your answer in general form. "
x=-2*p1-b*p2;
y=3*p2*p2-a-b*p1
z=3*p3*p3
this_ANS[1]=""+Iw(x,1)+"x + "+Iw(y,1)+"y + "+Iw(z,1)+"z + "+Iw(-(x*p1+y*p2+z*p3),1)+" = 0"
break;
case 10: // for the surface defined by z^3 = x^2 +axy +y^2 -bxyz + c find the symmetric equation of the
// normal line passing through the point (p1,p2,p3)
//
x=0; y=0; z=0;
while ( (x*y*z)==0 )
{ // we do not want any case where one of the partials is 0.
p1=get_rand(2,4,true);
p2=p1+((Math.random()>0.5)?-1:1);
p3=get_rand_not(-3,3,false,0);
a=get_rand(2,5,true);
b=get_rand(2,5,true);
if(b>0){ p2=-p2 }
c=p3*p3*p3-p1*p1-a*p1*p2-p2*p2-b*p1*p2*p3;
x=-2*p1-a*p2-b*p2*p3;
y=-a*p1-2*p2-b*p1*p3;
z=3*p3*p3-b*p1*p2
}
// alert(x+" "+y+" "+z);
this_prob+="For the surface defined by z³ = x² + "+Iw(a,1)+"xy + y² + "
this_prob+=Iw(b,1)+"xyz + "+Iw(c,1)+" find the symmetric form of the equation of the ";
this_prob+="normal line at the point ("+Iw(p1,1)+","+Iw(p2,1)+","+Iw(p3,1)+"). "
this_ANS[1]="`"
if(p1>=0)
{this_ANS[1]+="(x - "+p1+")/"+x+" = "}
else
{this_ANS[1]+="(x + "+(-p1)+")/"+x+" = "}
if(p2>=0)
{this_ANS[1]+="(y - "+p2+")/"+y+" = "}
else
{this_ANS[1]+="(y + "+(-p2)+")/"+y+" = "}
if(p3>=0)
{this_ANS[1]+="(z - "+p3+")/"+z+"`"}
else
{this_ANS[1]+="(z + "+(-p3)+")/"+z+"`"}
break;
case 11: // for the surface defined by z^3 = x^2 +axy +y^2 -bxyz + c find the angle of inclination
// of the tangent plane at the point (p1,p2,p3)
//
x=0; y=0; z=0;
while ( (x*y*z)==0 )
{ // we do not want any case where one of the partials is 0.
p1=get_rand(2,4,true);
p2=p1+((Math.random()>0.5)?-1:1);
p3=get_rand_not(-3,3,false,0);
a=get_rand(2,5,true);
b=get_rand(2,5,true);
if(b>0){ p2=-p2 }
c=p3*p3*p3-p1*p1-a*p1*p2-p2*p2-b*p1*p2*p3;
x=-2*p1-a*p2-b*p2*p3;
y=-a*p1-2*p2-b*p1*p3;
z=3*p3*p3-b*p1*p2
}
// alert(x+" "+y+" "+z);
this_prob+="For the surface defined by z³ = x² + "+Iw(a,1)+"xy + y² + "
this_prob+=Iw(b,1)+"xyz + "+Iw(c,1)+" find the angle, in radians to the nearest thousandth, ";
this_prob+="of the tangent plane at the point ("+Iw(p1,1)+","+Iw(p2,1)+","+Iw(p3,1)+"). "
d=Math.abs(z)/Math.sqrt(x*x+y*y+z*z) ;
e=Math.acos( d );
this_ANS[1]=""+Fwd(e,4,3)+""
break;
case 12: // We want a function with 4 critical points. choose a, b such that a<>b and a and b both odd or
// both even, Choose c and d the same way. find 3*integral (x+a) Time list = {"+reg_xlist
this_prob+="} ";
this_ANS[1]="
f(x,y).
f(x,y,z).
z= x³ + "+Iw(3*(a+b)/2,2)+"x² + ";
this_prob+=Iw(3*a*b,2)+"x + y³ +"+Iw(3*(c+d)/2,2)+"y² + "+Iw(3*c*d,2)+"y +";
this_prob+=Iw(e,2)+", find the critical points."
this_ANS[1]="("+Iw(-a,1)+","+Iw(-c,1)+"), "
this_ANS[1]+="("+Iw(-a,1)+","+Iw(-d,1)+"), "
this_ANS[1]+="("+Iw(-b,1)+","+Iw(-c,1)+"), "
this_ANS[1]+="("+Iw(-b,1)+","+Iw(-d,1)+") "
break;
case 13: // We want a function with 4 critical points and then determine if we have any relative min points.
// choose a, b such that a<>b and a and b both odd or
// both even, Choose c and d the same way. find 3*integral (x+a)
z= x³ + "+Iw(3*(a+b)/2,2)+"x² + ";
this_prob+=Iw(3*a*b,2)+"x + y³ +"+Iw(3*(c+d)/2,2)+"y² + "+Iw(3*c*d,2)+"y +";
this_prob+=Iw(e,2)+", find the point(s) that is(are) relative minimum value(s)."
// now check out each of the points using the second partials, note that the xy partial is 0
this_ANS[1]="";
// first point
x=6*(-a)+3*(a+b); y=6*(-c)+3*(c+d);
if ( (x*y>0) && (x>0) )
{ this_ANS[1]+="("+Iw(-a,1)+","+Iw(-c,1)+") "}
// second point
x=6*(-a)+3*(a+b); y=6*(-d)+3*(c+d);
if ( (x*y>0) && (x>0) )
{ this_ANS[1]+="("+Iw(-a,1)+","+Iw(-d,1)+") "}
// third point
x=6*(-b)+3*(a+b); y=6*(-c)+3*(c+d);
if ( (x*y>0) && (x>0) )
{ this_ANS[1]+="("+Iw(-b,1)+","+Iw(-c,1)+") "}
// fourth point
x=6*(-b)+3*(a+b); y=6*(-d)+3*(c+d);
if ( (x*y>0) && (x>0) )
{ this_ANS[1]+="("+Iw(-b,1)+","+Iw(-d,1)+") "}
break;
case 14: // We want a function with 4 critical points and then determine if we have any relative max points.
// choose a, b such that a<>b and a and b both odd or
// both even, Choose c and d the same way. find 3*integral (x+a)
z= x³ + "+Iw(3*(a+b)/2,2)+"x² + ";
this_prob+=Iw(3*a*b,2)+"x + y³ +"+Iw(3*(c+d)/2,2)+"y² + "+Iw(3*c*d,2)+"y +";
this_prob+=Iw(e,2)+", find the point(s) that is(are) relative maximum value(s)."
// now check out each of the points using the second partials, note that the xy partial is 0
this_ANS[1]="";
// first point
x=6*(-a)+3*(a+b); y=6*(-c)+3*(c+d);
if ( (x*y>0) && (x<0) )
{ this_ANS[1]+="("+Iw(-a,1)+","+Iw(-c,1)+") "}
// second point
x=6*(-a)+3*(a+b); y=6*(-d)+3*(c+d);
if ( (x*y>0) && (x<0) )
{ this_ANS[1]+="("+Iw(-a,1)+","+Iw(-d,1)+") "}
// third point
x=6*(-b)+3*(a+b); y=6*(-c)+3*(c+d);
if ( (x*y>0) && (x<0) )
{ this_ANS[1]+="("+Iw(-b,1)+","+Iw(-c,1)+") "}
// fourth point
x=6*(-b)+3*(a+b); y=6*(-d)+3*(c+d);
if ( (x*y>0) && (x<0) )
{ this_ANS[1]+="("+Iw(-b,1)+","+Iw(-d,1)+") "}
break;
case 15: // We want a function with 4 critical points and then determine if we have any relative saddle points.
// choose a, b such that a<>b and a and b both odd or
// both even, Choose c and d the same way. find 3*integral (x+a)
z= x³ + "+Iw(3*(a+b)/2,2)+"x² + ";
this_prob+=Iw(3*a*b,2)+"x + y³ +"+Iw(3*(c+d)/2,2)+"y² + "+Iw(3*c*d,2)+"y +";
this_prob+=Iw(e,2)+", find the point(s) that is(are) saddle point(s)."
// now check out each of the points using the second partials, note that the xy partial is 0
this_ANS[1]="";
// first point
x=6*(-a)+3*(a+b); y=6*(-c)+3*(c+d);
if ( (x*y<0) )
{ this_ANS[1]+="("+Iw(-a,1)+","+Iw(-c,1)+") "}
// second point
x=6*(-a)+3*(a+b); y=6*(-d)+3*(c+d);
if ( (x*y<0) )
{ this_ANS[1]+="("+Iw(-a,1)+","+Iw(-d,1)+") "}
// third point
x=6*(-b)+3*(a+b); y=6*(-c)+3*(c+d);
if ( (x*y<0) )
{ this_ANS[1]+="("+Iw(-b,1)+","+Iw(-c,1)+") "}
// fourth point
x=6*(-b)+3*(a+b); y=6*(-d)+3*(c+d);
if ( (x*y<0) )
{ this_ANS[1]+="("+Iw(-b,1)+","+Iw(-d,1)+") "}
break;
case 16: //
num_1=get_rand(2,5,false)
num_2=get_rand(56,70,false)
num_3=(get_rand(13,25,false))/10.0
num_4=gen_reg(12,num_1,3,num_3,num_2)
this_prob+="[This problem has two parts to its answer and therefore counts as two problems.] "
this_prob+="Roger has a standard exercise routine. During that routine, Roger records the elapsed TIME "
this_prob+="and his heart rate at those intervals. Roger believes that there is a linear "
this_prob+="relationship between the elapsed time and his heart rate. "
this_prob+="Your task is to determine and state, rounding values to the nearest thousandth, "
this_prob+="the linear regression equation, and the correlation coefficient, "
this_prob+="showing heart rate (HR) as a linear function of Time (T) for the following data:
HR list = {"+reg_ylist+"}
"
this_prob+="By the way, the sum of the products of the HR and T values is "+num_4+".
";
this_ANS[1]="HR = ("+Fwd(reg_eq_m,8,3)+") T + "+Fwd(reg_eq_b,8,3)+"
"
this_ANS[1]+=" corr = "+Fwd(reg_eq_corr,7,3)+""
break;
case 17: // Problem to max box size under the plane
//
//
//
this_prob+="[This problem has three parts to its answer and therefore counts as three problems.] "
this_prob+="As a political consultant you have the following problem. Your candidate has "
this_prob+="identified three hot issues, A, B, and C. The candidate is convinced that the ";
this_prob+="electorate sees these as three completely separate issues; they are politically orthogonal. ";
this_prob+="Considered separately, each issue has a maximum targeted electorate. The politician wants to deal ";
this_prob+="with all three issues but needs to gauge the amount of effort to put into each. That effort is ";
this_prob+="expressed as a portion of the targeted electorate. Your job is to determine the proportion, actually ";
this_prob+="the resulting size of each of the three targeted electorates, which will maximize the politician's ";
this_prob+="results. You do this by analogy. You look at the three issues as if they were the three axes, x, y, and z. ";
this_prob+="The size of each targeted electorate for each issue is merely a point on the appropriate axis.";
this_prob+="The constraint on the politician's time and effort amounts to being on the plane that contains all three ";
this_prob+="of these points. The goal is equivalent to finding the largest box (rectangular parallelpiped) ";
this_prob+="that will fit under that plane. ";
for(i=1; i<=10; i++ ) {coeff[i]=5+i;}
lcl_shuffle(coeff,1,10);
a=coeff[1]; b=coeff[2]; c=coeff[3];
this_prob+="Issue A has a maximum electorate of "+a+" million people. ";
this_prob+="Issue B has a maximum electorate of "+b+" million people. ";
this_prob+="Issue C has a maximum electorate of "+c+" million people. ";
this_prob+="Expressed as the number of targeted people (to the nearest 1000 people) for each issue, thus there will be three values, "
this_prob+=" the maximizing goal for each of the three issues? " ;
d=Math.floor((a*1000000/3+500)/1000)*1000;
e=Math.floor((b*1000000/3+500)/1000)*1000;
f=Math.floor((c*1000000/3+500)/1000)*1000;
this_ANS[1]="Issues: A="+d+" B="+e+" C="+f+""
break;
case 18: //
//
this_prob+="[This problem has four parts to its answer and therefore counts as four problems.] "
this_prob+="You were so successful in your earlier endeavor as a political consulatant that a ";
this_prob+="national candidate has come to you with a similar problem. However, this candidate has 4 totally ";
this_prob+="independent issues, A, B, C, and D. Again, your task is to maximize the political gain by determining ";
this_prob+="the goal size for each of the four issues, realizing that the total amount of time that the politician has ";
this_prob+="is fixed. Thus, the limitis the hyper-plane containing all four points, and the goal finding the largest hyper-box ";
this_prob+="that fits under that hyper-plane. "
for(i=1; i<=10; i++ ) {coeff[i]=5+i;}
lcl_shuffle(coeff,1,10);
a=coeff[1]; b=coeff[2]; c=coeff[3]; g=coeff[4];
this_prob+="Issue A has a maximum electorate of "+a+" million people. ";
this_prob+="Issue B has a maximum electorate of "+b+" million people. ";
this_prob+="Issue C has a maximum electorate of "+c+" million people. ";
this_prob+="Issue D has a maximum electorate of "+g+" million people. ";
this_prob+="Expressed as the number of targeted people (to the nearest 1000 people) for each issue, thus there will be four values, "
this_prob+="the maximizing goal for each of the four issues? " ;
d=Math.floor((a*1000000/4+500)/1000)*1000;
e=Math.floor((b*1000000/4+500)/1000)*1000;
f=Math.floor((c*1000000/4+500)/1000)*1000;
h=Math.floor((g*1000000/4+500)/1000)*1000;
this_ANS[1]="Issues: A="+d+" B="+e+"
C="+f+" D="+h+" "
break;
case 19: //set up Legrange equations for a truncated triangular room.
//
for (i=1;i<=10;i++) {coeff[i]=i+4}
lcl_shuffle(coeff, 1, 10);
a=coeff[1]; b=coeff[2]; d=coeff[3]; e=coeff[4];
c=d+e+get_rand(4,7,false);
this_prob+="[This problem has five parts to its answer and therefore counts as five problems.] "
this_prob+="Set up, but do not solve, the Legrange equations to find the "
this_prob+="dimensions and volume of a rectangular box to be constructed in a "
this_prob+="truncated triangular room that has corners at ("+a+",0,0), "
this_prob+="(0,"+b+",0), (0,0,"+c+"), ("+a+",0,"+d+"), and (0,"+b+","+e+").
"
break;
case 20: //
//
//
//
this_prob+="Type 20"
this_ANS[1]="Answer type 20"
break;
case 21: //
//
//
//
this_prob+="Type 21"
this_ANS[1]="Answer type 21"
break;
} // end of switch statement
} // end of function gen_prob_eval definition...
// -->