Difference between revisions of "TrigExpand Command"

From GeoGebra Manual
Jump to: navigation, search
(updated as a v.4.2 command)
(Add example TrigExpand(sin(x)sin(x/3)))
 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>{{betamanual|version=4.2}}
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|function}}
{{command|CAS}}
+
;TrigExpand( <Expression> )
;TrigExpand[ <Expression> ]
+
:Transforms a trigonometric expression into an expression using only simple variables as arguments.
:Transformes a trigonometric expression into an expression using only simple variables as arguments.
+
:{{example|1=<code>TrigExpand(tan(x + y))</code> gives <math>\frac{\frac{sin(x)}{cos(x)}+\frac{sin(y)}{cos(y)}} {1-\frac{sin(x)}{cos(x)} \cdot \frac{sin(y)}{cos(y)}} </math>.}}
:{{example|1=<code>TrigExpand[tan(x+y)]</code> gives <math>\frac{cos(x) sin(y) + cos(y) sin(x)}{cos(x) cos(y) - sin(x) sin(y)}</math>.}}
+
:It can also expand a product into a linear expression
;TrigExpand[ <Expression>, <Target Function> ]
+
:{{example|1=<code>TrigExpand(sin(x)sin(x/3))</code> gives <math>\frac{3}{2 \; x^{2}} \; cos \left( 2 \cdot \frac{x}{3} \right) - \frac{3}{2 \; x^{2}} \; cos \left( 4 \cdot \frac{x}{3} \right) </math>.}}
:Transformes a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function.
+
 
:{{example|1=<code>TrigExpand[tan(x+y),tan(x)]</code> gives <math>\frac{-tan(x) - tan(y)}{tan(x) tan(y) - 1}</math>.}}
+
;TrigExpand( <Expression>, <Target Function> )
;TrigExpand[ <Expression>, <Target Function>, <Target Variable> ]
+
:Transforms a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function.
:Transformes a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function and tagret variable.
+
:{{example|1=<code>TrigExpand(tan(x + y), tan(x))</code> gives <math>\frac{-tan(x) - tan(y)}{tan(x) tan(y) - 1}</math>.}}
:{{example|1=<code>TrigExpand[sin(x),sin(x),x/2]</code> gives <math>2cos(\frac{x}{2})sin(\frac{x}{2})</math>.}}
+
 
;TrigExpand[ <Expression>, <Target Function>, <Target Variable>, <Target Variable> ]
+
==CAS Syntax==
:Transformes a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function and target variables.
+
CAS syntaxes may show different results, depending on the selected output mode:
:{{example|1=<code>TrigExpand[csc(x) - cot(x) + csc(y) - cot(y), tan(x), x/2, y/2]</code> gives <math>tan(\frac{x}{2})+tan(\frac{y}{2})</math>.}}
+
 
 +
:{{example|1=<code>TrigExpand(tan(x + y))</code> <br/> in [[Image:Mode evaluate.svg|32px]] ''Evaluate'' mode  gives  <math>\frac{\frac{sin(x)}{cos(x)}+\frac{sin(y)}{cos(y)}} {1-\frac{sin(x)}{cos(x)} \cdot \frac{sin(y)}{cos(y)}} </math> <br/> in [[Image:Mode numeric.svg|32px]] ''Numeric'' mode  gives  <math>\frac{sin(x) cos(y) + sin(y) cos(x)}{- sin(x) sin(y) +cos(x) cos(y) }</math> .}}
 +
 
 +
 
 +
The following commands are only available in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]]:
 +
 
 +
;TrigExpand( <Expression>, <Target Function>, <Target Variable> )
 +
:Transforms a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function and target variable.
 +
:{{examples|1=<div>
 +
:*<code>TrigExpand(sin(x), sin(x), x/2)</code> gives <math>2cos \left( \frac{x}{2} \right) sin \left( \frac{x}{2} \right) </math>
 +
:*<code>TrigExpand(sin(x)/(1+cos(x)), tan(x), x/2)</code> gives <math>tan \left( \frac{x}{2} \right)</math>.</div>}}
 +
 
 +
 
 +
;TrigExpand( <Expression>, <Target Function>, <Target Variable>, <Target Variable> )
 +
:Transforms a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function and target variables.
 +
:{{example|1=<code>TrigExpand(csc(x) - cot(x) + csc(y) - cot(y), tan(x), x/2, y/2)</code> gives <math>tan \left( \frac{x}{2} \right) +tan \left( \frac{y}{2} \right) </math>.}}
 +
 
 
{{note|See also [[TrigSimplify Command]] and [[TrigCombine Command]].}}
 
{{note|See also [[TrigSimplify Command]] and [[TrigCombine Command]].}}

Latest revision as of 08:54, 25 November 2020


TrigExpand( <Expression> )
Transforms a trigonometric expression into an expression using only simple variables as arguments.
Example: TrigExpand(tan(x + y)) gives \frac{\frac{sin(x)}{cos(x)}+\frac{sin(y)}{cos(y)}} {1-\frac{sin(x)}{cos(x)} \cdot \frac{sin(y)}{cos(y)}} .
It can also expand a product into a linear expression
Example: TrigExpand(sin(x)sin(x/3)) gives \frac{3}{2 \; x^{2}} \; cos \left( 2 \cdot \frac{x}{3} \right) - \frac{3}{2 \; x^{2}} \; cos \left( 4 \cdot \frac{x}{3} \right) .


TrigExpand( <Expression>, <Target Function> )
Transforms a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function.
Example: TrigExpand(tan(x + y), tan(x)) gives \frac{-tan(x) - tan(y)}{tan(x) tan(y) - 1}.


CAS Syntax

CAS syntaxes may show different results, depending on the selected output mode:

Example: TrigExpand(tan(x + y))
in Mode evaluate.svg Evaluate mode gives \frac{\frac{sin(x)}{cos(x)}+\frac{sin(y)}{cos(y)}} {1-\frac{sin(x)}{cos(x)} \cdot \frac{sin(y)}{cos(y)}}
in Mode numeric.svg Numeric mode gives \frac{sin(x) cos(y) + sin(y) cos(x)}{- sin(x) sin(y) +cos(x) cos(y) } .


The following commands are only available in the Menu view cas.svg CAS View:

TrigExpand( <Expression>, <Target Function>, <Target Variable> )
Transforms a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function and target variable.
Examples:
  • TrigExpand(sin(x), sin(x), x/2) gives 2cos \left( \frac{x}{2} \right) sin \left( \frac{x}{2} \right)
  • TrigExpand(sin(x)/(1+cos(x)), tan(x), x/2) gives tan \left( \frac{x}{2} \right).


TrigExpand( <Expression>, <Target Function>, <Target Variable>, <Target Variable> )
Transforms a trigonometric expression into an expression using only simple variables as arguments, preferring the given target function and target variables.
Example: TrigExpand(csc(x) - cot(x) + csc(y) - cot(y), tan(x), x/2, y/2) gives tan \left( \frac{x}{2} \right) +tan \left( \frac{y}{2} \right) .


© 2021 International GeoGebra Institute