Showing posts with label tangent. Show all posts
Showing posts with label tangent. Show all posts

Saturday, September 20, 2025

Trigonometric Calculus when Angles are in Degrees

Trigonometric Calculus when Angles are in Degrees


Today’s blog is a quickie.


The preferred angle measure in calculus is the radian. However, a lot of applications, including geometry, astronomy, engineering, and construction, use degrees.


An approach is to convert everything to radians before proceeding. Another approach is to remember that x radians = x° * π / 180, and use the conversion factor.



Derivatives



d/dx sin( x° )


Now all calculus calculations must have radians.


d/dx sin( x * π / 180)

= π / 180 * cos (x * π / 180)

= π / 180 * cos(x°)


Similarly – remember the angle considered is in DEGREES:

d/dx sin(x°) = π / 180 * cos(x°)

d/dx csc(x°) = - π / 180 * csc(x°) * cot(x°)

d/dx cos(x°) = - π / 180 * sin(x°)

d/dx sec(x°) = π / 180 * tan(x°) * sec(x°)

d/dx tan(x°) = π / 180 * sec(x°)^2

d/dx cot(x°) = -π / 180 * csc(x°)



Integration


Now let’s try integration.


∫( sin(x°) dx)

= ∫( sin(x * π / 180)) dx

= 180 / π * ∫(π / 180 * sin(x * π / 180)) dx

= 180 / π * -cos(x * π / 180) + C

= -180 / π * cos(x°) + C


Similarly:

∫ sin(x°) dx = -180 / π * cos(x°) + C

∫ cos(x°) dx = 180 / π * sin(x°) + C

∫ tan(x°) dx = -180 / π * ln(cos(x°)) + C



Use caution when using calculators. A lot of calculators when using calculus in degree mode get it correct but its’ always good to verify.



Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

The author does not use AI engines and never will.

Saturday, December 5, 2020

HP 71B: Sign "Graph" of Trig Functions

 HP 71B: Sign "Graph" of Trig Functions


Introduction


The program SGNTRIG builds a 22 character binary string that depends on the function:


g(x) = 

1  if  sgn(t(x/c)) > 1

0  if  sgn(t(x/c)) ≤ 0


where:


c is a scaling factor, 


sgn(x) is the sign function,  and


t(x) represents one of three trigonometric functions, sin(x), cos(x), or tan(x).   Angles are assumed to be radians.


If we set to scale to c = 1, then g(x) takes the integer values from 1 to 22.  


The HP 71B builds the result to the string S$.   This is an aid to visualize at least some of the graph.   When the bit is 1, the graph is above the x-axis, otherwise, the graph is either on or below the x-axis.  The program presented can be expanded or modified to explore other functions.


The resulting string is a "psuedo-graph".  


Below is a graphical representation of g(x) (an HP Prime is used to graph g(x)).


HP 71B Program SGNTRIG

Size:  270 bytes


100 DESTROY S,I,N,E,C

105 S$=""

110 RADIANS

115 INPUT 'SCALE? ';C

120 DISP "S:SIN C:COS T:TAN"

125 E$=KEY$

130 IF E$="S" OR E$="C" OR E$="T" THEN 200 ELSE 120


200 FOR I=1 TO 22

205 IF E$="S" THEN N=SGN(SIN(I/C))

210 IF E$="C" THEN N=SGN(COS(I/C))

215 IF E$="T" THEN N=SGN(TAN(I/C))

220 IF N=1 THEN N=1 ELSE N=0

225 S$=S$&STR$(N)

230 DISP S$ @ BEEP 589,0.1 @ WAIT 0.2

235 NEXT I

240 DISP S$ @ BEEP 661,2


Notes:


Line 105:  creates a blank string, which is allowed on the HP 71B


Line 125:  The KEY$ function calls for a key input. S for sine, C for cosine, and T for tangent.


Lines 205 to 215: determine which trigonometric function to use


Line 220:  Sets the character to 0 if the sign function returns 0 or -1


Line 225:  &, the ampersand symbol concatenates two strings


Lines 230 and 240, respectively:  589 Hz is middle D, 661 Hz is middle E


Example


Below are results for each of the trigonometric functions when scale is set to 1.  




YouTube video: https://www.youtube.com/watch?v=GL6urOGvRGY&feature=youtu.be

Eddie


All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Wednesday, June 8, 2016

HP Prime: Trigonometric CAS Rewrite Commands

HP Prime:  Trigonometric CAS Rewrite Commands



All of the following examples have CAS Simplification set to Minimum.

Rewrites of Arcsine and Sine
asin2acos
Toolbox → 4. Rewrite → 5. Sine → 1. asin x → acos x
asin2acos(2*asin(x)) returns
2*(-acos(x) + π/2)
asin2atan
Toolbox → 4. Rewrite → 5. Sine → 2. asin x → atan x
asin2atan(2*asin(x)) returns
2*(atan(x/√(-x^2+1))
sin2costan
Toolbox → 4. Rewrite → 5. Sine → 3. sin x → cos x tan x
sin2costan(2*sin(x)^2) returns
2*(cos(x)*tan(x))^2

Rewrites of Arcosine and Cosine
acos2asin
Toolbox → 4. Rewrite → 6. Cosine → 1. acos x → asin x
acos2asin(acos(x*π/2)) returns
-asin(1/2*π*x)+π/2
acos2atan
Toolbox → 4. Rewrite → 6. Cosine → 2. acos x → atan x
acos2atan(acos(x*π/2)) returns
-atan( (1/2*π*x)/
(√(1/4) –
√(-(π*x)^2+4) )+π/2
cos2sintan
Toolbox → 4. Rewrite → 6. Cosine → 3. cos x → sin x/tan x
cos2sintan(2*cos(x)^2)
Returns
2*(sin(x)/tan(x))^2

Rewrites of Arctangent and Tangent
atan2asin
Toolbox → 4. Rewrite → 7. Tangent → 1. atan x → asin x
atan2asin(atan(x/3)) returns
asin( (x/3) /
(√(1/9)*√(x^2+9))
simplify gets
asin( (x*√(x^2+9)) /
(x^2+9) )
atan2acos
Toolbox → 4. Rewrite → 7. Tangent → 2. atan x → acos x
atan2acos(atan(x/3)) returns
-acos( (x/3) /
(√(1/9)*√(x^2+9))+π/2
simplify gets
( (π-2*acos(
(x*√(x^2+9))/(x^2+9) )/2
tan2sincos
Toolbox → 4. Rewrite → 7. Tangent → 3. tan x → sin x/cos x
tan2sincos(tan(2*x))
returns
sin(2*x)/cos(2*x)
halftan

(sin x, cos x, tan x) → tan(x/2)
Toolbox → 4. Rewrite → 7. Tangent → 4. halftan
halftan(cos(2*x))
returns
(-tan(x)^2+1)/
(tan(x)^2+1)

Other Commands
tlin
(trigonometric form of powers) → (trigonometric form of linearized terms)
Toolbox → 4. Rewrite → 8. Trig → 5. tlin
tlin(cos(2*x)^2)
returns
1/2*cos(4*x)+1/2
trig2exp
(sin x, cos x, tan x) → (exponential form with complex exponentials)
Toolbox → 4. Rewrite → 8. Trig → 8. trig2exp
trig2exp(sin(x/3))
returns
1/(2*i) * (e^(i*x/3) – 1/e^(i*x/3))
atrig2ln
(asin x, acos x, atan x) → (logarithm form with complex exponentials)
Toolbox → 4. Rewrite → 8. Trig → 4. atrig2ln
atrig2ln(asin(x/3))
returns
i*ln(√(1/9)*√(x^2-9)+x/3)+π/2


That is a list of basic CAS commands for trigonometric rewrites. 

Eddie


This blog is property of Edward Shore, 2016.

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations Some Background and Periodic Reduction Formulas ...