1

I'm trying to plot the output of the following function t2[x_] in

    n1[x_] := 4 \[Pi]*x + Sin[2 \[Pi] 0.6 x];

    t2[x_] := Solve[4 \[Pi] t + Sin[2 \[Pi] 0.6 t ] - n1[x] == 2 \[Pi] && x < t, t];

Now, if I type in a particular value it gives the expected answer:

    t2[1]

{{t -> 1.5}}

But I can't figure out how to input x as a continuous variable, or even a discrete list. I've also tried plotting Evaluate[t2[x]] and Plot[x /. t2, {x, 0, 2}] in all combinations I can think of but I just can't get it to work.

Any help would be greatly appreciated,

Rick

Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323
  • 1
    Try t2[x_] := t /. First @ Solve[4 π t + Sin[2 π 0.6 t ] - n1[x] == 2 π && x < t, t]. – J. M.'s missing motivation Jun 04 '13 at 08:39
  • Hi and welcome. Have you looked around the site? In particular http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users#answer-18706 – gpap Jun 04 '13 at 09:44

1 Answers1

2

Solve can't find a closed form solution for this equation. Since it can be solved (numerically) for discrete values, then something like ListLinePlot[{#, t2[#]} & /@ Range[0, 4, 0.1]] might do what you want.

David G
  • 629
  • 4
  • 6