why the output is a list type in Mupad ?

1 view (last 30 days)
I have a rather complicated function "aa", which is a function of "A", "B", "C" and "DD". And "A", "C", "DD" are essentially functions of "B" (other variables, P, m0, Ka, Kd are constants).
I want to substitute the expressions of "A", "C" and "DD" into "aa" so it is only a function of "B". I do as follows in Mupad Notebook:
A := 3/2*P*m0*Ka/(B*sinh(B)*(B^2+Kd) + Ka*B^2*cosh(B))
C := -3/2*P*m0/B^2
DD := -Ka*B^2/(B^2+Kd)
aa := 1/B^4/(B*sinh(B)-DD*cosh(B))*[(1/3*A*B^3*DD - 1/4*A*B*DD - 1/4*A*B^3 + 1/4*A*B)*sinh(B) + (1/4*A*B^2*DD - 1/3*A*B^4 - 1/4*A*B^2)*cosh(B) + (B^2+1)*2*DD*C -2*B*C]
Mupad substitutes the expression of "A", "C" and "DD" into "aa", so it outputs:
The results is actually correct. However, "aa" right now converts to a list type (I check the type using domtype), which causes error if I want to do other mathematical manipulations on "aa" such as series.
Anyone can tell me why ? And how to deal with this ?

Accepted Answer

Li Zhang
Li Zhang on 5 Apr 2016
The bracket in the "aa" expression causes all the problem. It converts "aa" into a list type although "looks like" just an bracket expression...

More Answers (0)

Community Treasure Hunt

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

Start Hunting!