I want to generate a list of simple trigonometric questions in TeXForm, for example, as follows.

Evaluate the following expressions.
\item $\sin 30^\circ$
\item $\sec 90^\circ$
% ... others go here ...
\item $\csc 315^\circ$

So I can just copy and paste it to my LaTeX input file to create a problem sheet.

I have a list of arguments args and a list of functions funcs as follows.

args = Array[15 # &, 24, 0];
funcs = {Sin, Cos, Tan, Csc, Sec, Cot};

How to define a function GenerateProblem[n_] where n represents the number of problems to generate in TeXForm?



args=Array[15 #&,24,0];



\begin{array}{l} \text{Tan 180} \\ \text{Sin 210} \\ \text{Sec 210} \\ \text{Tan 300} \\ \end{array}

Edit 1. This produces TeX math expressions like \sin , \sec etc

generateProblem = Column[#1@#2 & @@@ RandomSample[Tuples@{funcs, args}, #]] &


\begin{array}{l} \sec (60) \\ \sec (255) \\ \csc (195) \\ \sin (30) \\ \end{array}

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.