DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');

$aSoln = Compute('e^x - 1')->cmp(
    checker => sub {
        my ($correct, $student, $ans) = @_;
        # return 0 if Formula(0) == $student; # See comments.
        if ($ans->{_filter_name} ne 'produce_equivalence_message') {
            my $context = Context()->copy;
            $context->flags->set(no_parameters => 0);
            $context->variables->add(C0 => 'Parameter');
            $student = Formula($context, $student);
            $correct = Formula($context, 'C0 * e^x - 1');
        }
        return $correct == $student;
    }
);

BEGIN_PGML
Find one solution to the differential equation.

    [`\frac{dy}{dx} = y + 1`]

[`y =`] [_]{$aSoln}
END_PGML

BEGIN_PGML_SOLUTION
Solution explanation goes here.
END_PGML_SOLUTION

ENDDOCUMENT();