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 sin x |
|
⎛
⎝ | 16 cos 4x−12 cos 2x+1 | ⎞
⎠ | sin x |
|
| +
| | 28 sin x cos 2x |
|
⎛
⎝ | 16 cos 4x−12
cos2x+1 | ⎞
⎠ | sin x |
|
| − |
| | | | | | | | | | |
|
| | 80 sin x cos 4x |
|
⎛
⎝ | 16 cos 4x−
12 cos2x+1 | ⎞
⎠ | sin x |
|
| + | | 64 sin x cos 6x |
|
⎛
⎝ | 16 cos 4x−12 cos 2x+1 | ⎞
⎠ | sin x |
|
|
| | | | | | | | | | |
|
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)) |
|
| |
cos x cos y−sin x sin y+ex ey+ln | ⎛
⎝ | 3 | ⎞
⎠ | +2 ln | ⎪
⎪ | x | ⎪
⎪ |
| | | | | | | | | | |
|