[ab initio mathematics] 179th Triangle Elementary Transformation

Source: Internet
Author: User
Tags acos asin

plot summary:
[Machine Xiao Wei], accompanied by [engineer Ah Wei], entered the middle of the end of Dan's cultivation,
The goal of this practice is [trigonometric elementary transformation].

Drama Start:

Star Calendar April 15, 2016 15:32:35, the Milky Way Galaxy Earles the Chinese Empire Jiangnan Line province.
[Engineer Ah Wei] is working with [machine Xiao Wei] to study [triangular elementary transformation].









<span style= "FONT-SIZE:18PX;" >if (1) {var mathtext = new Mathtext (), var s = [' and angle, difference angle formula ', ' sin (a+b) = Sinacosb+sinbcosa ', ' sin (A-B) = Sinacosb-sinbcosa ' , ', ' cos (a+b) = Cosacosb-sinasinb ', ' cos (A-B) = Cosacosb+sinasinb ', ', ' tan (a+b) = (TANA+TANB)/(1-TANA*TANB) ', ' Tan (A-B  ) = (TANA-TANB)/(1+TANA*TANB) ',];var x =40, Y=40;var r1 = 40;var len = s.length;for (var i = 0; i < len; i++) {if (S[i] = = ") {if (x < +) {x + = 300;y-=r1*3;} else {x = 20;y + = r1;}} else {mathtext.print (s[i], x, y); y+=r1;}}} </span>


<span style= "FONT-SIZE:18PX;" >var s = [' Octave formula ', ' sin2a = 2sinacosa ', ' cos2a = Cos^[2]a-sin^[2]a ', ' tan2a = 2tana/(1-tan^[2]a) ', ', ' cos2a = 2cos^[2]a-1 ' , ' cos2a = 1-2sin^[2]a ',];</span>



<span style= "FONT-SIZE:18PX;" >var s = [' Half angle formula ', ' sin (A/2) =± ((1-cosa)/2) ^[0.5] ', ' cos (A/2) =± ((1+cosa)/2) ^[0.5] ', ' Tan (A/2) =± ((1-cosa)/(1+cosa)) ^ [0.5] ', ' = sina/(1+cosa) ', ' = (1-cosa)/sina ',];</span>


Before this formula, there are many, are the experience of predecessors and the crystallization of the think tank,

But the time has come, now no matter how to calculate, which is better than the first to find the angle,

The direct calculation is accurate and fast. So [people challenge the teacher] Also think that these formulas

Donuts on the line.


Of course, Xiao Wei still made a tool, in general should be enough:

<span style= "FONT-SIZE:18PX;" >>>> sin45°= 0.707cos45°= 0.707tan45°= 1.0sin30°= 0.5cos30°= 0.866tan30°= 0.577sin75°= 0.966cos75°= 0.  259tan75°= 3.732sin15°= 0.259cos15°= 0.966tan15°= 0.268sin90°= 1.0cos90°= 0.0tan90°= 1.633123935319537e+16sin135°=    0.707cos135°= -0.707tan135°= -1.0sin22.5°= 0.383cos22.5°= 0.924tan22.5°= 0.414# Triangular Identity def tmp (angle1, angle2 = 0):        task = [#第一个角的三角函数值 [' sin ', angle1], [' cos ', angle1], [' Tan ', angle1], #第二个角的三角函数值 [' sin ', angle2], [' cos ', angle2], [' Tan ', angle2], #和角公式 [' sin ', angle1+angle2], [' Cos ', angle1+angle2], [' Tan ', angle1+angle2], #差角公式 [' sin ', angle1-angle2], [' cos ', Angle1-ang Le2], [' Tan ', angle1-angle2], #二倍角 [' sin ', angle1*2], [' cos ', angle1*2], [' Tan ', angle1 * *], #三倍角 [' sin ', angle1*3], [' cos ', angle1*3], [' Tan ', angle1*3], #半角 [' Sin ', angle1/2], [' cos ', ANGLE1/2], [' Tan ', ANGLE1/2]]; Trifun (Task), if __name__ = = ' __main__ ': tmp ($),;</span>




<span style= "FONT-SIZE:18PX;" >>>> 5400[0.0002908882045634, 0.00058178, 0.00087266, 0.00116355, 0.00145444, 0.00174533, 0.00203622, 0.0023271, 0.00261799, 0.00290888, 0.00319976, 0.00349065, 0.00378154, 0.00407242, 0.00436331, 0.00465419, 0.00494508, 0.00523596, 0.00552685, 0.00581773, 0.00610861, 0.0063995, 0.00669038, 0.00698126, 0.00727214, 0.00756302, 0.0078539, 0.00814478, 0.00843566, 0.00872654, 0.00901741, 0.00930829, 0.00959916, 0.00989004, 0.01018091, 0.01047178, 0.01076266, 0.01105353, 0.0113444, 0.01163527, 0.01192613, 0.012217, 0.01250787, 0.01279873, 0.0130896, 0.01338046, 0.01367132, 0.01396218, 0.01425304, 0.0145439, 0.01483475, 0.01512561, 0.01541646, 0.01570732, 0.01599817, 0.01628902, 0.01657987, 0.01687072, 0.01716156, 0.01745241, 0.01774325, 0.01803409, 0.01832493, 0.01861577, 0.01890661, 0.01919744, 0.01948828, 0.01977911, 0.02006994, 0.02036077, 0.02065159, 0.02094242, 0.02123324, 0.02152407, 0.02181489, 0.0221057, 0.02239652, 0.02268733, 0.02297815, 0.02326896, 0.02355976, 0.02385057, 0.02414138, 0.02443218, 0.02472298, 0.02501378, 0.02530457, 0.02559537, 0.02588616, 0.02617695, 0.02646774, 0.02675852, 0.0270493, 0.02734008, 0.02763086, 0.02792164, 0.02821241, 0.02850318, 0.02879395,    0.02908472]#[0, 90] degree angle range sinusoidal trigonometric Functions table Def tritable (): Import math;    Trigonometric function value of #1 ' Corner sin1 = 0.0002908882045634;    COS1 = Math.sqrt (1-sin1*sin1);    #90度内 sin = sin1;    cos = COS1;    #存放值 array = [];    Array.append (SIN);        while (Sin < 1): sin = sin1*cos+cos1*sin;        cos = math.sqrt (1-sin*sin);    Array.append (Round (sin, 8)); #每次1 ' Corner increments, array arrays should have elements 90*60=5400 a print (len (array)), #看看前100个元素 print (array[:100]);</span>


<span style= "FONT-SIZE:18PX;" >#### @usage Trigonometric Call Encapsulation # @author mw# @date April 05, 2016 Tuesday 09:36:50 # @param # @return # # # #def Trifun (task, Prec = 3): #需要计算的任务 #输入量为角度制, in order of degrees, minutes, seconds #可输出显示度, minutes, seconds of expression #用于计算锐角三角函数 #对于角度变换, has not been tested #以后可扩展添加其它多种数学函数 size = le    n (Task);    result = [];    Import Math;    Precision = Max (PREC, 3);  For I in range (size): if task[i][0] = = ' sin ' or task[i][0] = = ' cos ' or task[i][0] = = ' tan ' or task[i][0]            = = ' Cot ': tasknew = task[i];            Part1 = Angletransfer (tasknew[1:]);            Len1 = Len (part1);            Tasknew = [tasknew[0]];            For n in range (LEN1): Tasknew.append (Part1[n]);                        Size_1 = Len (Task[i]);            angle = 0;            if size_1 = = 2:angle = Tasknew[1];            elif Size_1 = = 3:angle = TASKNEW[1]+TASKNEW[2]/60; elif Size_1 = = 4:angle = tasknew[1]+tasknew[2]/60+tasknew[3]/3600;           angle = Angle/180*math.pi;                If task[i][0] = = ' sin ': s = ';                if size_1 = = 2:s = Task[i][0]+str (task[i][1]) + ' ° ';                elif Size_1 = = 3:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ';                elif Size_1 = = 4:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ' +str (task[i][3]) + ' ″ ';                s + = ' = ';                s + = str (round (Math.sin (angle), precision));                s + = ' \ n ';            Result.append (s);                Elif task[i][0] = = ' cos ': s = ';                if size_1 = = 2:s = Task[i][0]+str (task[i][1]) + ' ° ';                elif Size_1 = = 3:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ';                elif Size_1 = = 4:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ' +str (task[i][3]) + ' ″ ';                s + = ' = '; s + = str(Round (Math.Cos (angle), precision));                s + = ' \ n ';            Result.append (s);                Elif task[i][0] = = ' Tan ': s = ';                if size_1 = = 2:s = Task[i][0]+str (task[i][1]) + ' ° ';                elif Size_1 = = 3:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ';                elif Size_1 = = 4:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ' +str (task[i][3]) + ' ″ ';                s + = ' = ';                s + = str (round (Math.tan (angle), precision));                s + = ' \ n ';            Result.append (s);                Elif task[i][0] = = ' cot ': s = ';                if size_1 = = 2:s = Task[i][0]+str (task[i][1]) + ' ° ';                elif Size_1 = = 3:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ '; elif Size_1 = = 4:s = Task[i][0]+str (task[i][1]) + ' ° ' +str (Task[i][2]) + ' \ ' +str (Task[i][3])                + ' ″ ';                s + = ' = ';                s + = str (round (1/math.tan (angle), precision));                s + = ' \ n ';        Result.append (s);                Else:if task[i][0] = = ' ASIN ': s = ';                s = task[i][0]+str (task[i][1]) + ' = ';                res = Math.asin (task[i][1])/math.pi*180;                If res < 0:s + = '-';                Absres = ABS (res);                s + = str (Math.floor (absres)) + ' ° ' +str (Math.floor (absres*60)%60) + ' \ ' +str (round (absres*3600)%60) + ' ″ ';                s + = ' \ n ';            Result.append (s);                Elif task[i][0] = = ' ACOs ': s = ';                s = task[i][0]+str (task[i][1]) + ' = ';                res = Math.acos (task[i][1])/math.pi*180;                If res < 0:s + = '-';                Absres = ABS (res);                s + = str (Math.floor (absres)) + ' ° ' +str (Math.floor (absres*60)%60) + ' \ ' +str (round (absres*3600)%60) + ' ″ '; S + = ' \ n ';            Result.append (s);                Elif task[i][0] = = ' Atan ': s = ';                s = task[i][0]+str (task[i][1]) + ' = ';                res = Math.atan (task[i][1])/math.pi*180;                If res < 0:s + = '-';                Absres = ABS (res);                s + = str (Math.floor (absres)) + ' ° ' +str (Math.floor (absres*60)%60) + ' \ ' +str (round (absres*3600)%60) + ' ″ ';                s + = ' \ n ';            Result.append (s);                Elif task[i][0] = = ' Acot ': s = ';                s = task[i][0]+str (task[i][1]) + ' = ';                res = 90-math.atan (task[i][1])/math.pi*180;                If res < 0:s + = '-';                Absres = ABS (res);                s + = str (Math.floor (absres)) + ' ° ' +str (Math.floor (absres*60)%60) + ' \ ' +str (round (absres*3600)%60) + ' ″ ';                s + = ' \ n ';                            Result.append (s);                Else:pass; size = Len (result);    For I in range (size): print (Result[i]); return result; #把任意角转化成 the angle in the range [0, 360] degrees.    #传入 [degrees, minutes, seconds] #传出 [degrees, minutes, seconds]def Angletransfer (a): #传入的角度可以只有度, can also have points, can also have seconds #这样会造成数组的大小变动 accuracy = Len (a);                            if (A[0] < 0): if accuracy = = 2:if (a[1]! = 0): a[0]-=1;        A[1] = 60-a[1];                elif accuracy = = 3:if (a[1]! = 0 or a[2]! = 0): a[0]-=1;                    if (a[2]! = 0): a[1] = 59-a[1];                A[2] = 60-a[2];                    ELSE:A[1] = 60-a[1];    While a[0] < 0:a[0]+=360;    Elif (A[0] >=): While a[0] >= 360:a[0]-=360; Return a;</span>

The end of this section, to know how to funeral, please see tell.


[ab initio mathematics] 179th Triangle Elementary Transformation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.