10.4.1 Expanding transcendental expressions
The texpand or
tExpand command
expands exponential and trigonometric functions, like simultaneous calling
textttexpexpand (see Section 10.3.2), which, for example,
expands enx as (ex)n,
lnexpand (see Section 10.3.3), which, for example,
expands ln(xn) as nln(x), and
trigexpand (see Section 10.2.1), which, for
example, expands sin(2x) as 2sin(x)cos(x).
-
texpand takes
expr, an expression containing transcendental or trigonometric functions.
- texpand(expr) expands these functions.
Examples
Expand cos(x+y).
Expand cos(3x).
Expand sin(3x)+sin(7x)/sin(5x).
texpand((sin(3*x)+sin(7*x))/sin(5*x)) |
|
− | 2 sinx |
|
⎛
⎝ | 16 cos4x−12 cos2x+1 | ⎞
⎠ | sinx |
|
| +
| 28 sinx cos2x |
|
⎛
⎝ | 16 cos4x−12
cos2x+1 | ⎞
⎠ | sinx |
|
| − |
| | | | | | | | | | |
| 80 sinx cos4x |
|
⎛
⎝ | 16 cos4x−
12 cos2x+1 | ⎞
⎠ | sinx |
|
| + | 64 sinx cos6x |
|
⎛
⎝ | 16 cos4x−12 cos2x+1 | ⎞
⎠ | sinx |
|
|
| | | | | | | | | | |
|
Expand ex+y.
Expand ln(x y).
Expand ln(xn).
Expand ln(e2+e2ln(2)+eln(3)+ln(2)).
texpand(log(e^2)+exp(2*log(2))+exp(log(3)+log(2))) |
or:
texpand(log(e^2)+exp(2*log(2)))+ lncollect(exp(log(3)+log(2))) |
Expand ex+y+cos(x+y)+ln(3x2).
texpand(exp(x+y)+cos(x+y)+ln(3*x^2)) |
|
cosx cosy−sinx siny+ex ey+ln | ⎛
⎝ | 3 | ⎞
⎠ | +2 ln | ⎪
⎪ | x | ⎪
⎪ |
| | | | | | | | | | |
|