Tag Info

The problem is that the function name f is substituted into Function (&) which is HoldAll. This means f[t] will not be evaluated until the Function is evaluated, such as in the OP's example problem[one][17].
So the trick is to evaluate the integrand before inserting it into the Function. Here is one way.
one[x_] := 1 (*the argument*)
problem[f_] := ...

Here is a partial answer. I believe for Method -> {opts}, opts may be any of the following, and they will have whatever effect they have:
Internal`InequalitySolverOptions[]
Internal`ReduceOptions[]
Internal`NSolveOptions[]
(*
{"ARSDecision" -> False, "BrownProjection" -> True, "CAD" -> True,
"CADAlgebraicCoefficients" -> True, ...

You can take advantage of how the rules associated with theta are stored behind the scenes by doing
Length @ DownValues[theta][[1, 2, 1]]
(* 40 *)
This isn't robust, however. In the sense that if you have defined beforehand theta[10] = 5, for instance, then it won't find the right DownValue.
Alternatively, you can build the checking into the function:
...

Oh well, the solution to my problem is trivial. I simply have to change the definition of my theta function, like this :
Angles := {0.0902266, 0.0889051, 0.0869336, 0.0840726, 0.0838656, ...}
theta[n_] := Angles[[n]]
Then I can use the length command on the Angles :
Nangles = Length[Angles];

I would like to share more universal method I use in my scientific manipulations involving trigonomeric expressions of real arguments. It does not require any identities used by hand and is mathematically coincise.
The idea is to convert trigonometric expression to exponents, which in turn will play the role of monomials. Then you can use very powerful ...

If we can pull the function Rescaled outside of myPlot, as Guess who it is suggests, then it can be done in a fairly straightforward way. (If Rescaled is to depend on the arguments to myPlot, perhaps Rescaled can be written so that any needed parameters can be passed to it through the function call instead coded in its definition. Then the following method ...

You need anonymous functions. The way it's written currently will replace every instance of x on the right hand side with the number you provide as the argument for collatz. What you want is something which can act on the value produced by NestWhileList on each iteration. So use
Clear[collatz]
collatz[x_] :=NestWhileList[If[Mod[#, 2] == 0, #/2, #*3 + ...

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.