필터 지우기
필터 지우기

Symbolic substraction of multiple valued functions

조회 수: 1 (최근 30일)
Meva
Meva 2016년 10월 21일
댓글: Meva 2016년 10월 22일
Hello,
I have two equations which are the same but in a different format. byhand is arranged version of thetadouble function. If I substract byhand from thetadouble I should get zero, but instead Matlab just repeats what I typed. Please see below.
syms thetadouble(h, theta, kappa, b, a, c, gamma) byhand(h, theta, kappa, b, a, c, gamma)
thetadouble = (sqrt(a*kappa)*(a^3 *(1 - 2 *b) ...
- a^2 *(-1 + 2 * b) *(1 - 2*c + 2 * c^2) *kappa - (b - c) *(-1 + c) ...
*c *(h + theta - b *theta)^2 *kappa + ...
a *((-1 + b + c) * h^2 -2 *(-1 + b) *(-1 + b + c) *h*theta ...
+ (-1 + b)^2 *(-1 + b + c) * theta^2 - (-1 + 2*b) *(-1 + c)^2 *c^2 *kappa^2)) ...
- (b - c) *(h + theta - b *theta)^2 *...
(a^2 + a *(1 - 2 *c + 2 *c^2) *kappa + (-1 + c)^2 *c^2 *kappa^2) ...
*atan((-1 + c)*kappa/a) + (b -c) * (h + theta - b *theta)^2*(a^2 + a *(1 - 2 *c + 2 *c^2) * kappa + (-1 + c)^2 *c^2*kappa^2) ...
*atan(c *kappa/a))...
/(4*a^(3/2)*gamma *sqrt(kappa)...
*(a +(-1 + c)^2*kappa)* (a +c^2 *kappa));
byhand = (sqrt(a*kappa)*(a*(1 - 2*b)*(a^2 + kappa*a*(1 - 2 *c + 2 *c^2) + ...
c^2*kappa^2 *(1 - c)^2) + (b - c)*(1 - c)*c*(h + (1 - b)*theta)^2*kappa ...
+ a*(b - 1 + c)*(h + (1 - b)*theta)^2)...
+ (b - c) *(h + (1 - b )* theta)^2 * ...
(a^2 + a *(1 - 2 *c + 2 *c^2) ...
* kappa + (-1 + c)^2 *c^2*kappa^2)*(atan((1 - c) * sqrt(kappa/a))+ ...
atan(c * sqrt(kappa/a))))/((4 *a^(3/2) *gamma *sqrt(kappa) ...
*(a + (-1 + c)^2 *kappa)*(a +c^2 *kappa)));
diff = thetadouble - byhand
Please give me an idea. Thanks..

채택된 답변

Steven Lord
Steven Lord 2016년 10월 21일
What happens when you simplify the difference?

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Gamma Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by