Symbolic substraction of multiple valued functions
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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..
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!