# Trig function graphing exercise [closed]

I am trying to figure out how to do the following exercise in Mathematica

Graph $y(t)= a \cos t + b \sin t - 0.5 \sin t$ on the interval $0 ≤ t ≤ 6\, π$

## closed as off-topic by MarcoB, José Antonio Díaz Navas, Henrik Schumacher, Bob Hanlon, zhkApr 26 '18 at 7:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, José Antonio Díaz Navas, Henrik Schumacher, Bob Hanlon, zhk
If this question can be reworded to fit the rules in the help center, please edit the question.

• Manipulate[ Plot[a Cos[t] + b Sin[t] - 0.5 Sin[t], {t, 0, 6 Pi}, PlotRange -> {-3, 3}], {{a, 0}, -2, 2}, {{b, 0}, -1, 1} ] – Henrik Schumacher Apr 25 '18 at 21:23

The Plot function needs to have numeric values for a and b. The With function is a good way to supply them. Like so.

With[{a = -1., b = 2.},
Plot[a Cos[t] + b Sin[t] - 0.5 Sin[t], {t, 0, 6 π},
Ticks -> {Subdivide[0, 6 π, 6], Automatic},
PlotRange -> All]]


• @HighPerformanceMark, @Rabbit. 'fiction should of course be 'function'. My system's intrusive spelling corrector "fixed" a mis-typing for me and I didn't notice it. Thanks for bringing my attention to it. – m_goldberg Apr 26 '18 at 18:36

 f[a_, b_, t_] := a Cos[t] + b Sin[t] - 0.5 Sin[t]

Plot[f[1, 1, t], {t, 0, 6 \[Pi]}]
`