Here are the problems

integrating factor must be given in the form x^n. If given in the form e^(n ln(x)), it does not recognize it and reports incorrect answer. If given in the form 1/x^m, the integrating factor is gradede correct but correct solution is graded incorrect. I copied the answer checker from the solution answer in the script and modifeid it. It did not work work either. Help needed. Thanks. Here is the script

_____________________

\## DESCRIPTION

## First order ODEs: separable differential equations

## ENDDESCRIPTION

## KEYWORDS('differential equations','first order','first order linear differential equations')

## DBsubject('Differential Equations')

## DBchapter('First Order Differential Equations')

## DBsection('Separable Equations')

## Date('01/30/2011')

## Author('Paul Pearson')

## Institution('Fort Lewis College')

## TitleText1('Notes on Diffy Qs')

## EditionText1('December 9, 2010')

## AuthorText1('Jiri Lebl')

## Section1('1.3')

## Problem1('4')

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

# Initialization

DOCUMENT();

loadMacros(

"PGstandard.pl",

"MathObjects.pl",

"parserAssignment.pl",

"AnswerFormatHelp.pl",

);

TEXT(beginproblem());

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

# Setup

Context("Numeric")->variables->add(

y=>"Real", k=>"Real"

);

parser::Assignment->Allow;

$a = random(3,15,1);

$b=2-$a;

$answer1 =Compute("x^(-$a)");

$answer2 = Compute("y = x^2/$b+k*x^$a");

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

# Main text

Context()->texStrings;

BEGIN_TEXT

Solution to the following differential equation can be found by treating it as $BR

first order linear differential equation.

$BR

\( \displaystyle x \frac{dy}{dx} = x^{2} + $a y \)

$BR

Integrating factor for this differential equation is

\{ ans_rule(20) \}

$BR

Note: You must write Your answer in the form "x^n".

$PAR

Find a solution to

\( \displaystyle x \frac{dy}{dx} = x^{2} + $a y \).

$BR

Use must use k for constant of integration.

$BR

\{ ans_rule(30) \}

\{ AnswerFormatHelp("equations") \}

END_TEXT

Context()->normalStrings;

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

# Answer evaluation

$showHint = 2;

BEGIN_HINT

Write the differential equation in the form $BR

\( \displaystyle \frac{dy}{dx} + P(x)y = Q(x) \)

END_HINT

$showPartialCorrectAnswers = 1;

ANS( $answer1->cmp() );

ANS( $answer2->cmp( checker => sub {

my ( $correct, $student, $self ) = @_;

if ($self->{_filter_name} ne 'produce_equivalence_message') {

my $stu = Formula($student->{tree}{rop});

if ($stu->isConstant) {

Value::Error('Your answer should not be constant');

return 0;

}

my $stu_x = $stu->D('x');

return $stu_x == Formula("$a*$stu /x + x");

}

})

);

COMMENT("MathObject version.");

ENDDOCUMENT();