Symbolic substraction of multiple valued functions

1 次查看(过去 30 天)
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