Find the angle between two tangents



Robert Dodier writes

> Well, you had some expression in en2 for which you want to find en2 such
that the expression evaluates to 0.16 or something like that. So you could
set it up like this:
>  find_root (<expression in en2> - 0.16, en2, 10, 80);

But...
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);  

en2:1 on fourth line is defined in the block
en2 on sixth line is d=en2, the expression then
on 12th line en2 : en2 + 1
so en2 is an expression is on the sixth line, d=en2
therefore;
find_root (d - 0.16, en2, 10, 80); produces.

Maxima returns " find_root(d - 0.16, en2, 10.0, 80.0)"


William Porter
(425) 343-7711
wporter at omegapar.com


-----Original Message-----
From: Robert Dodier [mailto:robert.dodier at gmail.com] 
Sent: Tuesday, September 07, 2010 7:55 AM
To: William Porter
Cc: maxima at math.utexas.edu; pbowyer at olynet.com
Subject: Re: Find the angle between two tangents

On 9/6/10, William Porter <wmporter.omegapar at comcast.net> wrote:

> 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.

Well, you had some expression in en2 for which you want
to find en2 such that the expression evaluates to 0.16 or
something like that. So you could set it up like this:

  find_root (<expression in en2> - 0.16, en2, 10, 80);

HTH

Robert Dodier
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5429 (20100906) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5431 (20100907) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com