@kat05 I often use variables in the answers to such problems--but rarely ones as complex as this. As a warning, I'll wager there are like 15 specialty function calls that will do similar things to what I'm doing with a single call...my background is C++ from decades ago, so I'm sure my methods are inefficient.

As a note, all R variables are "randomizers." Since I want to compare before switches and you can't set a variable after its initial setting, it became necessary for me (though probably not necessary in general...unsure on that,) to declare 6 variables that are otherwise unused in the problem.

__The problem is simply__

Simplify the expression.

__$C1$V1__^{$A1}$V2^{$B1}

$C2$V1^{$A2}$V2^{$B2}

Here's all the code I use to write the problem.

#CODE TO SELECT TWO VARIABLES IN ALPHABETICAL ORDER WITHOUT TROUBLE LETTERS

$R = rint( 21 );

$R0 = rint( 22 );

$R1 = if ( lt( $R, $R0 ), $R, $R0 );

$R2 = if ( lt( $R, $R0 ), $R0, $R + 1 );

$V1 = switch( $R1,a,b,c,d,f,g,h,j,k,m,n,p,q,r,s,t,u,v,w,x,y,z );

$V2 = switch( $R2,a,b,c,d,f,g,h,j,k,m,n,p,q,r,s,t,u,v,w,x,y,z );

#Either the first, second, or both exponents are negative for each variable.

$R3 = rint( 3 );

$R4 = rint( 3 );

$A1 = switch( $R3, -1*( rint( 9 ) + 1 ), rint( 8 ) + 2, -1*( rint( 9 ) + 1 ) );

$A2 = switch( $R3, rint( 8 ) + 2, -1*( rint( 9 ) + 1 ), -1*( rint( 9 ) + 1 ) );

$B1 = switch( $R4, -1*( rint( 9 ) + 1 ), rint( 8 ) + 2, -1*( rint( 9 ) + 1 ) );

$B2 = switch( $R4, rint( 8 ) + 2, -1*( rint( 9 ) + 1 ), -1*( rint( 9 ) + 1 ) );

#Create our constants and their print variants.

$C1 = ( rint( 9 ) + 1 ) * -1^( rint( 3 ) );

$C2 = ( rint( 9 ) + 1 ) * -1^( rint( 3 ) );

$C1p = if( $C1 - 1, if( $C1 + 1, $C1, "-" ), "" );

$C2p = if( $C2 - 1, if( $C2 + 1, $C2, "-" ), "" );

#Here's where the code would go to write the answer, but my code isn't working properly!

#Or at least isn't working with the answer type =/.

#Calculate the numerator

$ANSn = if( lt( $Aa, 1 ),

if( lt( $Ba, 1 ), $C1a,

if( gt( abs($C1a), 1), -$C1a*$V2^$Ba,

if( lt( $C1a, 0 ), -$V2^$Ba, $V2^$Ba ) ) ),

if( lt( $Ba, 1 ),

if( gt( abs($C1a), 1), $C1a*$V1^$Aa,

if( lt( $C1a, 0 ), -$V1^$Aa, $V1^$Aa ) ),

if( gt( abs($C1a), 1), $C1a* $V1^$Aa * $V2^$Ba,

if( lt( $C1a, 0 ), -$V1^$Aa * $V2^$Ba, $V1^$Aa * $V2^$Ba ) ) ) );

#Divide that by our denominator.

$ANS = if( lt( $Aa, 0 ),

if (lt ($Ba, 0 ),

$ANSn / ( $C2a*( $V1^(abs( $Aa ) ) ) * ( $V2^(abs( $Ba ) ) ) ),

$ANSn / ( $C2a*( $V1^(abs( $Aa ) ) ) ) ),

if (lt ($Ba, 0 ),

$ANSn / ( $C2a* $V2^(abs( $Ba ) ) ),

if( gt( $C2a, 1 ), $ANSn / $C2a, $ANSn ) ) );