Simplify a long symbolic expression

2 次查看(过去 30 天)
Lu Zhao
Lu Zhao 2021-3-8
The variable "U_j0" can be canceled by simplifying the equation by hand, but it doesn't work by using command "simplify()".
- My guess is the variable "U_j0" is in a natral log and somehow it's not fully simplified.
Here is the symbolic expression:
% Equation is:
clc
clear
syms u(r) alpha m omega Omega R0 R Uinf U_j0 alpha1 omega1 S U1 delta c1
syms dIm Im dKm Km
-(Km*U_j0^2*alpha1*((U_j0*((U_j0*(- S^2*delta^2*m^2 + 2*S^2*delta^2 + 2*S^2*delta + 2*S*alpha1*c1*delta*m - 2*S*alpha1*delta*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(R^2*delta*(alpha1 - alpha1*c1 + S*delta*m)) - (S*U_j0*m*(delta - 1)*((2*log(-(U_j0*(alpha1 - alpha1*c1 + S*delta*m))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2) - (log(R)*(m^2 - 2))/m^2 + (Im*alpha1^2*((R*dIm*delta*((2*S*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2) - (log(-R*(delta - 1))*(m^2 - 2))/m^2 + (2*log(-(U_j0*alpha1*(c1 - 1)*(delta - 1))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2)))/(Im*alpha1) - (R^2*delta^2*((U_j0*alpha1*(c1 - 1))/(R^2*delta*(delta - 1)) + (S*U_j0*m*((2*S*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2) - (log(-R*(delta - 1))*(m^2 - 2))/m^2 + (2*log(-(U_j0*alpha1*(c1 - 1)*(delta - 1))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2)))/(R^2*delta*(delta - 1))))/(U_j0*alpha1^2*(c1 - 1)))*(c1 - 1)*(delta - 1))/(delta*(Im*S*m - R*alpha1*dIm + R*alpha1*c1*dIm + R*alpha1*dIm*delta - R*alpha1*c1*dIm*delta)) + (2*S*alpha1*(c1 - 1)*(delta - 1)*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2*(alpha1 - alpha1*c1 + S*delta*m))))/(R^2*delta))*(alpha1 - alpha1*c1 + S*delta*m))/alpha1 + (2*S*U_j0^2*m*(alpha1 - alpha1*c1 + S*delta*m)*((2*log(-(U_j0*(alpha1 - alpha1*c1 + S*delta*m))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2) - (log(R)*(m^2 - 2))/m^2 + (Im*alpha1^2*((R*dIm*delta*((2*S*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2) - (log(-R*(delta - 1))*(m^2 - 2))/m^2 + (2*log(-(U_j0*alpha1*(c1 - 1)*(delta - 1))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2)))/(Im*alpha1) - (R^2*delta^2*((U_j0*alpha1*(c1 - 1))/(R^2*delta*(delta - 1)) + (S*U_j0*m*((2*S*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2) - (log(-R*(delta - 1))*(m^2 - 2))/m^2 + (2*log(-(U_j0*alpha1*(c1 - 1)*(delta - 1))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2)))/(R^2*delta*(delta - 1))))/(U_j0*alpha1^2*(c1 - 1)))*(c1 - 1)*(delta - 1))/(delta*(Im*S*m - R*alpha1*dIm + R*alpha1*c1*dIm + R*alpha1*dIm*delta - R*alpha1*c1*dIm*delta)) + (2*S*alpha1*(c1 - 1)*(delta - 1)*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2*(alpha1 - alpha1*c1 + S*delta*m))))/(R^2*alpha1))*(U1*alpha1 - alpha1*c1 + S*delta*m)^2)/delta^2 == (U_j0^4*dKm*(alpha1 - alpha1*c1 + S*delta*m)^2*((2*log(-(U_j0*(alpha1 - alpha1*c1 + S*delta*m))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2) - (log(R)*(m^2 - 2))/m^2 + (Im*alpha1^2*((R*dIm*delta*((2*S*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2) - (log(-R*(delta - 1))*(m^2 - 2))/m^2 + (2*log(-(U_j0*alpha1*(c1 - 1)*(delta - 1))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2)))/(Im*alpha1) - (R^2*delta^2*((U_j0*alpha1*(c1 - 1))/(R^2*delta*(delta - 1)) + (S*U_j0*m*((2*S*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2) - (log(-R*(delta - 1))*(m^2 - 2))/m^2 + (2*log(-(U_j0*alpha1*(c1 - 1)*(delta - 1))/delta)*(S^2*m^2 + 2*S*alpha1*c1*m - 2*S*alpha1*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(m^2*(alpha1 + S*m - alpha1*c1)^2)))/(R^2*delta*(delta - 1))))/(U_j0*alpha1^2*(c1 - 1)))*(c1 - 1)*(delta - 1))/(delta*(Im*S*m - R*alpha1*dIm + R*alpha1*c1*dIm + R*alpha1*dIm*delta - R*alpha1*c1*dIm*delta)) + (2*S*alpha1*(c1 - 1)*(delta - 1)*(S*m - alpha1 + alpha1*c1))/(m*(alpha1 + S*m - alpha1*c1)^2*(alpha1 - alpha1*c1 + S*delta*m)))*(- S^2*delta^2*m^2 + 2*S^2*delta^2 + 2*S^2*delta + 2*S*alpha1*c1*delta*m - 2*S*alpha1*delta*m - alpha1^2*c1^2 + 2*alpha1^2*c1 - alpha1^2))/(R*delta^3) ;
% Please help to simplify the above equation : cancel out "U_j0"
Anyone would like to take the challenge to deal with this long equation and help me out? lol.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by