In electrical engineering, we usually require answers involving sinusoidal functions to be written as a cosine with phase, e.g, v(t) = A*cos(2*pi*F*t + phi). Of course, the answer a*cos(2*pi*F*t) + b*sin(2*pi*F*t) will give the same numerical result (for proper a and b). Can I force the form of the answer to be in the cosine with phase form? I realize the I could ask specifically for the magnitude, frequency and phase, but for solutions of DE's with decaying exponential envelopes, this gives more information than I wish.
Your question is on stuff that we will cover in detail in the next two weeks. Yes, you can do things like disable (or undefine or redefine) certain functions in webwork. One way to disable a function is described on the wiki
For example, you can disable the absolute value and the square root using
In your case, you would probably want to disable sine, tangent, and all the co- functions except for cosine, which could be accomplished with
### begin code snippet
$A = ??; # replace ?? by some value
$F = ??; # replace ?? by some value
$phi = ??; # replace ?? by some value
$answer = Compute("$A * cos(2*pi* $F * t + $phi)");
### end code snippet
If you write a question like this, make sure to include instructions for the students in the text of the problem that says something like "Enter your answer using a single cosine function and no other trig functions." or "Enter your answer in the formfor some constants , , and ."