1
$\begingroup$

How can I use NSolve the following situation (to rectify a cycloid arc mapping with hashes etc.)?

For a specific value on the right-hand side, I use

NSolve[8 Sin[t/4]^2 == 4, t]

I want to solve over a range of values on the right-hand side, but

NSolve[8 Sin[t/4]^2 == n , t, {n, 1, 8, 1}]

doesn't work.

EDIT1:

nn=10;
Table[FindRoot[ X[s] == Xsmax  frac, {s , .5}], {frac, 0, 1, 
1/nn}] // TableForm 

The suggestion also works for repeated FindRoot as above.

$\endgroup$
  • $\begingroup$ NSolve[{8 Sin[t/4]^2 == 4, 1 <= t <= 8}, t] $\endgroup$ – Jason B. Nov 23 '15 at 7:30
  • $\begingroup$ I like to see 8 solutions, first line entry example.. $\endgroup$ – Narasimham Nov 23 '15 at 7:42
  • 1
    $\begingroup$ I'm not sure what you need, Table[NSolve[8 Sin[t/4]^2 == n, t], {n, 8}]? $\endgroup$ – Kuba Nov 24 '15 at 8:52
6
$\begingroup$

My understanding from your question is that you want a solution set for each value of n going from 1 to 8 in steps of 1. If this is the case just use Table:

Table[NSolve[8 Sin[t/4]^2 == n, t], {n, 1, 8, 1}]
| improve this answer | |
$\endgroup$
1
$\begingroup$

You may solve it exactly:

Solve[8 Sin[t/4]^2 == #, t] /. C[1] -> 0 & /@ Range@8
| improve this answer | |
$\endgroup$

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