1
$\begingroup$

I have a function $l(t) = 220 \sin(30 \pi t + \pi/6)$. I have plotted the function using the plot method.

I now have to find out when the current (l) equals zero. Having plotted the function, how do I use Mathematica to tell me when the current (l) equals zero?

The current (l) is the y-axis and time(t) is the x-axis.

For reference, the plotted function looks like this: enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ Solve[220 Sin[30 π t + π/6] == 0, t] and hence ${-\pi + 12 \pi k \over 180 \pi}$ for $k$ and integer. Incidentally, never ever use $I$ as a variable, since it is a constant in Mathematica ($I = \sqrt{-1}$). $\endgroup$ Commented Nov 17, 2016 at 1:08
  • $\begingroup$ Thank you! And yes, I didn't use I as the variable in the code, I used y. $\endgroup$ Commented Nov 17, 2016 at 1:49
  • $\begingroup$ So... doesn't my answer suffice? $\endgroup$ Commented Nov 17, 2016 at 1:50
  • 1
    $\begingroup$ For this specific Plot you can include a constraint: Solve[{220 Sin[30 Pi x + Pi/6] == 0, 0 <= x <= 2/15}, x] $\endgroup$
    – Bob Hanlon
    Commented Nov 17, 2016 at 1:50
  • $\begingroup$ @DavidG.Stork Yes it does. I just forgot to mark it as the answer. Thanks again! $\endgroup$ Commented Nov 17, 2016 at 2:03

2 Answers 2

2
$\begingroup$
Solve[220 Sin[30 π t + π/6] == 0, t]
$\endgroup$
2
$\begingroup$

I post this just to illustrate:

  • how to utilize solutions (and specify range)
  • use of Mesh andMeshFunctions to visualize zeroes

    func[t_] := 220 Sin[30 Pi t + Pi/6]
    With[{roots = t /. Solve[{func[t] == 0, 0 < t < 2/15}, t]}, 
    Plot[func[t], {t, 0, 2/15}, Mesh -> {{0}}, MeshFunctions -> (#2 &), 
    MeshStyle -> Directive[Red, PointSize[0.02]], 
    Epilog -> {Arrow[{{#, 150}, {#, 0}}] & /@ roots, 
    Text[Framed[#], {#, 150}, {0, -1}] & /@ roots}, Frame -> True]]
    

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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