Function Repository Resource:

TrigonometricProperties

Source Notebook

Compute properties of a given trigonometric expression

Contributed by: Jordan Hasler, Wolfram|Alpha Math Team

ResourceFunction["TrigonometricProperties"][expr,x,y]

gives an Association of properties of the trigonometric expression expr viewed as an equation in x and y.

ResourceFunction["TrigonometricProperties"][expr,x,y,prop]

returns the specified property prop for the given trigonometric expression expr.

Details

ResourceFunction["TrigonometricProperties"] works with trigonometric expressions with numeric coefficient. Allowable expressions are those containing Sin, Cos, Sec, Cot, Tan and Cot that reduce to a single trigonometric function.
Allowed values of prop are:
"Amplitude"amplitude of the given trigonometric expression
"Midline"midline of the given trigonometric expression
"ReducedPhaseShift"phase shift of the given trigonometric expression
"Period"period of the given trigonometric expression
"Frequency"frequency of the given trigonometric expression
"Parity"parity of the given trigonometric expression
"MinValue"minimum value of the expression
"MaxValue"maximum value of the expression
"Intercepts"association of the horizontal and vertical intercepts
"FunctionMonotonicity"association of where the expression is increasing and decreasing
"FunctionConcavity"association of where the expression is concave up and concave down
"Plot"plot of the given trigonometric expression
Allassociation of information returning all allowed properties

Examples

Basic Examples (3) 

Compute the properties of a trigonometric function:

In[1]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x], x, y]
Out[1]=

Return a specific trigonometric property:

In[2]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x], x, y, "Midline"]
Out[2]=

Compute the amplitude:

In[3]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x], x, y, "Amplitude"]
Out[3]=

Possible Issues (4) 

If a function is not periodic, the function returns unevaluated:

In[4]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][x^2, x, y]
Out[4]=

If a function contains terms that are non-constant, non-trigonometric, the function returns unevaluated:

In[5]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Sin[x] + x, x, y]
Out[5]=

TrigonometricProperties does not work with inverse trigonometric functions:

In[6]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][ArcTan[x], x, y]
Out[6]=

Functions that do not reduce to a single trigonometric expression return unevaluated:

In[7]:=
ResourceFunction[
 "TrigonometricProperties", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Tan[Cos[x]], x, y]
Out[7]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 2.0.0 – 23 March 2023
  • 1.0.0 – 14 March 2022

Related Resources

License Information