Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite using MathObjects and PGML #1178

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Conversation

lahvak
Copy link
Contributor

@lahvak lahvak commented Sep 7, 2024

The problem uses 'cmp_str' to check for answer 'infinity'. The cmp_str is deprecated, and does not work well with the MathQuill editor.

In addition to rewriting in PGML, a solution was added as well.

The problem uses 'cmp_str' to check for answer 'infinity'. The `cmp_str` is deprecated,
and does not work well with the MathQuill editor.

In addition to rewriting in PGML, a solution was added as well.
@lahvak
Copy link
Contributor Author

lahvak commented Sep 7, 2024

This should fix another instance of #1000

The function [`f(x)=(x+[$a])^2`] is not one-to-one. Choose a largest possible
domain containing the number 100 so that the function restricted to the domain is one-to-one.

The largest possible domain is [`\left[\strut\right.`][________]{$ans1},[________]{$ans2}[`\left.\strut\right)`].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be cleaner using the Interval context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about it, but did not want to make too large changes to the problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO there is no such thing as too large of changes. If there are places where the problem can be improved while still effectively asking the same question then I say go for it.

$ans3 = Formula("sqrt(x)-$a");

BEGIN_PGML
The function [`f(x)=(x+[$a])^2`] is not one-to-one. Choose a largest possible
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a unique largest possible domain containing 100, so how about changing this to "Choose the largest possible domain..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


The largest possible domain is [`\left[\strut\right.`][________]{$ans1},[________]{$ans2}[`\left.\strut\right)`].

The inverse function is [`g(x)=`][_______________]{$ans3}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should specify that it is asking for the inverse function on the domain given above. How about "If x is restricted to the above domain, then the inverse function is "?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that is definitely better.

ANS(str_cmp($ans2));
ANS(fun_cmp($ans3));
Solving the equation [`y=(x+[$a])^2`] for [`x`] will give us two solutions: [`x = \pm\sqrt{y} - [$a]`].
According to our domain choice, [`x \ge [$ans1]`], which means we have to choose the solution with [`+`].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 53: replace $ans1 with $a

The function [`f(x)=(x+[$a])^2`] is not one-to-one. Choose the largest possible
domain containing the number 100 so that the function restricted to the domain is one-to-one.

The largest possible domain is [_________________]{$ansInt} (use interval notation).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 43: replace "interval notation" with [@ helpLink("interval","interval notation") @]*
(including the star at the end!) This will create a link that points to instructions for entering intervals into webwork.

@gajennings gajennings merged commit 1f47084 into openwebwork:main Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants