question in my sin law function



El s?b, 31-10-2009 a las 19:45 +0800, ? ?? escribi?:
> Dear all
>         I have a question in my function.Would you help me again?
> we know in sin law a/sin(A)=b/sin(B)
> if A,b,B is given , then we can solve a
> that is my code. I input A,b,B, I want it can solve a by sinLaw
> function directly. 
> (if I don't let a:b/sin(B)*sin(A), can I show a=?)
> 
> sinLaw(a,A,b,B):=(
> a/sin(A*%pi/180)=b/sin(B*pi/180),
> solve(%,[a])
> );
> [a,A,b,B]:[x,30,sqrt(30),60];
> sinLaw(a,A,b,B);
> 
> (%o1) sinLaw(a,A,b,B):=(a/sin((A*%
> pi)/180)=b/sin((B*pi)/180),solve(%,[a]))
> (%o2) [x,30,sqrt(30),60]
> (%o3) []

Inside the parentheses you need to write two % symbols to make reference
to the last result. Also, the second pi needs a %.


(%i3) display2d: false $
(%i4) sinLaw(a,A,b,B):=(
a/sin(A*%pi/180)=b/sin(B*%pi/180),
solve(%%,[a])
)$
(%i5) [a,A,b,B]:[x,30,sqrt(30),60] $
(%i6) sinLaw(a,A,b,B);
(%o6) [x = sqrt(30)/sqrt(3)]



-- 
Mario