Forum archive 2000-2006

Steven McKay - I can't seem to use inverse secant with 2.3

Steven McKay - I can't seem to use inverse secant with 2.3

by Arnold Pizer -
Number of replies: 0
inactiveTopicI can't seem to use inverse secant with 2.3 topic started 9/8/2006; 11:27:23 PM
last post 9/9/2006; 3:43:47 PM
userSteven McKay - I can't seem to use inverse secant with 2.3  blueArrow
9/8/2006; 11:27:23 PM (reads: 297, responses: 6)
Yes, I know that 2.3 is not officially out yet, but I needed it to be able to install the moodle-webwork bridge. If my answer contains arcsec or asec, the question is always marked wrong even if it's typed exactly as it is in the problem. I can use arctan ok, but not arcsec. Has anyone seen this, or do I need to wait for the bugs to be ironed out?

Thanks for your help.

<| Post or View Comments |>


userDavide P. Cervone - Re: I can't seem to use inverse secant with 2.3  blueArrow
9/9/2006; 7:56:51 AM (reads: 371, responses: 1)
I am not able to reproduce your error. Can you post the relevant portions of the problem you are writing? It is not clear, for example, if you are talking about numeric answers or formulas, or whether you are using the traditional answer checkers or using the new parser. These are crucial details that we need in order to diagnose your problem.

Davide

<| Post or View Comments |>


userMichael Gage - Re: I can't seem to use inverse secant with 2.3  blueArrow
9/9/2006; 9:57:27 AM (reads: 347, responses: 0)
I don't think this is a 2.3 vs 2.2 issue. It probably has to do with the problem itself. In addition to posting to this list, you can automatically place it in bugzilla, our database for bugs.

To this:

1. While viewing the problem click "Edit this problem" link^(you have to have instructor privileges to see this.)

2. Now that you are on the editor page you will see a row of links, the right most one will say "report problem bugs".

3. Clicking on this will take you to bugzilla. If this is your first time reporting the bug, there is a short setup sequence because bugzilla needs to know who you are in order to record the bug. It will ask you to enter your email. It will then email you a password. Once you are signed up with bugzilla you can change your password to something easy to remember. (This only happens the first time, after that you can enter your email address and password to login, or if you always use the same computer a cookie will be saved automatically and you won't have to do anything -- you will be taken straight to bugzilla.)

4. Once in bugzilla fill out a description of the problem. The address of the problem and the seed used which produces the error have been entered for you automatically. (If the PG problem is one you created and is not in a library you should include the code at the end of your entry.)

5. That's it. This method has been particularly useful for bugs found in library problems -- we are slowly getting rid of them all as the bug reports come in from across the country.

--Mike

<| Post or View Comments |>


userSteven McKay - Re: I can't seem to use inverse secant with 2.3  blueArrow
9/9/2006; 2:29:25 PM (reads: 433, responses: 0)
Ok, I should have realized that you needed more info, and if I'm doing something really stupid, please be kind :-)

Here is the code:

DOCUMENT();



# Load whatever macros you need for the problem
loadMacros(PG.pl,
PGbasicmacros.pl,
PGchoicemacros.pl,
PGanswermacros.pl,
PGauxiliaryFunctions.pl,
PGgraphmacros.pl,
);

## Do NOT show partial correct answers
$showPartialCorrectAnswers = 0;
$a=random(2,9);
$b=random(2,9);
$c=$a*$a;
$soln="($b/$a)*arcsec(x/$a)";
TEXT(beginproblem());



BEGIN_TEXT



Integrate:



\[\int\frac{$b,dx}{x\sqrt{x^2-$c}}\]



\{ans_rule()\}+C
END_TEXT



ANS(fun_cmp($soln,mode=>"antider",vars=>"x"));



ENDDOCUMENT();

Notice that I want them to give the answer to the indefinite integral. If I replace arcsec with arctan, it works (even though its the wrong answer).

thanks for any help you can give. I will post a bug as soon as I am sure it is one and not stupidity on my part.

S.M.

<| Post or View Comments |>


userMichael Gage - Re: I can't seem to use inverse secant with 2.3  blueArrow
9/9/2006; 3:15:36 PM (reads: 337, responses: 0)
HI,

The default domain for checking functions is (0,1). In your case arcsec() has a domain that lies in the range (1, infinity)

Try this line:

 

ANS(fun_cmp($soln,mode=>"antider",vars=>"x",domain=>[2,5]));
This specifies that the comparison points should be chosen in the interval [2,5] rather than (0,1)

The clue was the error message: "Can't generate enough valid points for comparison" which indicates not enough points were in the domain of the function.

Hope this helps.

-- Mike

<| Post or View Comments |>


userSteven McKay - Re: I can't seem to use inverse secant with 2.3  blueArrow
9/9/2006; 3:34:05 PM (reads: 339, responses: 0)
Thanks, Mike and Davide,

As I suspected, a stupid error :-). I am trying to save time by using other questions as a pattern for my own instead of reading the manual. That never seems to work in practice.

Thanks for your kind help.

S.M.

<| Post or View Comments |>


userMichael Gage - Re: I can't seem to use inverse secant with 2.3  blueArrow
9/9/2006; 3:43:47 PM (reads: 351, responses: 0)
That's a perfectly reasonable approach. Particularly since our "manuals" are often out of date. We're working on better documentation.

-- Mike

<| Post or View Comments |>