title: help with secant root finding C++
body: <p>Can someone explain to me how I would use the secant method to find the root of an equation?
  The equation is: <code>( v / b ) ^2sin(alpha)= kr * Ts^4 +Uc *Ts -q</code> 
  and I have to find <code>Ts</code>. I have all the other info but am confused on what I'm supposed to do with the seccant method. Any help would be greatly appreciated.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  #include &lt;fstream&gt;
  #include &lt;iomanip&gt;
  #include &lt;cmath&gt;
  using namespace std;
  
  void secant(double, double, double, double, double, double, double);
  int main()
  {
      double kr, uc, q, b, radians;
  
      const double PI = 4.0 * atan(1.0);
      ifstream datain("shuttle.txt");
      ofstream dataout("results.txt");
      datain &gt;&gt; kr &gt;&gt; uc &gt;&gt; q &gt;&gt; b;
      int velocity = 16000;
      double angle = 10;
  
      for (int velocity = 16000; velocity &lt;= 17500; velocity += 500) {
          for (int angle = 10; angle &lt;= 70; angle += 15) {
              radians = angle * PI / 180;
              cout &lt;&lt; velocity &lt;&lt; endl;
              cout &lt;&lt; radians &lt;&lt; endl;
              cout &lt;&lt; angle &lt;&lt; endl;
              secant(angle, radians, velocity, kr, uc, q, b);
          }
      }
      getchar();
  }
  
  void secant(double angle, double radians, double velocity, double kr, double uc,
          double q, double b)
  {
  
  }
  </code></pre>