Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

share|improve this question
1  
Try t2[x_] := t /. First @ Solve[4 π t + Sin[2 π 0.6 t ] - n1[x] == 2 π && x < t, t]. –  J. M. Jun 4 '13 at 8:39
    
Hi and welcome. Have you looked around the site? In particular mathematica.stackexchange.com/questions/18393/… –  gpap Jun 4 '13 at 9:44

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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