明月山河 发表于 2016-2-20 18:38
) l! C; m+ n, ~http://blog.sina.com.cn/s/blog_636a8b120100jnyt.html
' t1 i9 w! g; b5 s- e. o. `( r2 _3 Z2 p5 f. I
3.带有附加条件的化简
/ T0 B$ i" R- ]: E8 u试了下还是不行 可能matlab和maple 使用不一样' a( J4 s8 Q6 ?7 f
>> syms x1 l+ N5 ?; i& j8 [% K/ u
>> combine(sin(x)^2+cos(x)^2) - Y6 T7 b9 l1 ~
3 N7 G' ^( g7 `* ~, pans =7 Q" @) C( ^( Y6 r7 q/ x
3 u5 F* [: s0 Ycos(x)^2 + sin(x)^2 这个不化简单
+ {9 o7 e" @- k0 N( @: K" w) _
* h. P- j& r5 y P4 s9 y>> simplify(sin(x)^2+cos(x)^2)
! m$ t, w! H/ C1 n& ?8 L5 r
- c4 g& i6 ]& v2 K6 Fans =
6 O& H" I8 g8 l9 M7 @ ) V3 J0 R5 m* n1 E# I% R; u! n7 B
1 a1 q o0 {, i& M& N) `0 P
7 _, C5 q& R V5 f! J, z6 b* x! \6 Y4 n
>> syms x
$ @( q; z/ M+ ?9 R+ D, }; D4 j>> A=sym('ln(3*x)+sin(x)^2+cos(x)^2')) k' p4 z& A% O; }1 t
5 r! V8 F: @! A2 h# U
A =1 s* `4 I! ^" h- g3 ]6 B7 j# h2 O N2 C4 [
' P. A/ b ?" Glog(3*x) + cos(x)^2 + sin(x)^2
" y; m- F w" N
7 H, ] K, c: Y>> simplify(A)
$ e2 v% o. t. T1 n( t# _0 A , V3 Z: A/ d9 c% {* F
ans =2 P( k! ^+ n/ A7 e, b3 E( v, S( W
& l3 R( H" x2 w+ C
log(3*x) + 1
' h8 k6 |, J% g d6 ~
3 x9 I( k+ s7 ~/ r" p; C
\8 F( {# h9 ?+ ?7 P: b8 P8 B4 R2 F( ~0 \3 X5 B. Z B# |( C) |
>> simplify(A,x)5 d$ J3 X. ^9 [' l8 q
错误使用 sym/simplify (line 99)
0 Z" ^/ Y1 R$ y; I2 ` HToo many input arguments.- M7 `1 e, K: M$ V4 h% e! ~
1 _5 T; R( `! e1 T! I( `/ g
|