Find the angle between two tangents



Thank you Paul and Robert for your input. It is greatly appreciated. 

 

I am too inexperienced with Maxima to carry it much farther than what Paul
has outlined. I have tried to use the find_root (<some expression>, en2, 10,
80); at the end of Paul's outline. Unfortunately I am not sure what to
insert in for <some expression>. Guessing at what expression to enter, I
have tried f1, ang, nIn, etc. but just guessing with no results.

 

On the last line f1(56); how did you know to insert the value 56? Is there
an expression that would generate the value?

 

Also on line en2 : en2 + 1),  /*Need variable increment here that can be
less than 1.0*/. what would be an example?

 

x^2+d*y*4+d^2*(-4)$
e1:  rhs(first(solve(x^2+d*y*4+d^2*(-4),y)));
en1: 10$   /* set x = 10   */
f1(nIn) := block([ang, n:nIn-1, en2:1],
   for i:0 thru n do (
      e2:subst([x=en1, d=en2],[first(diff(e1,x)), diff(e1,x)]),
      %phi[1] : first(e2),
      %phi[2] : second(e2),
      [(%phi[1]*d*(-2)),(d+((%phi[1])^(2)*d*(-1)))],
      [(%phi[2]*d*(-2)),(d+((%phi[2])^(2)*d*(-1)))],
      ang :
((%pi*1/2)+(atan((((%phi[1]+(%phi[2]*(-1))))^((-1))*(1+(%phi[2]*%phi[1]))))*
(-1))),
      en2 : en2 + 1),               /*Need variable increment here that can
be less than 1.0*/
   return( float(ang) ) );



f1(56);          /* How do you know to enter the 56 value? Can the
expressions generate this value?  */

 

William Porter

wporter at omegapar.com