wxMaxima-developers / wxmaxima

A gui for the computer algebra system Maxima built with wxWidgets
https://wxMaxima-developers.github.io/wxmaxima/
Other
460 stars 96 forks source link

Abbreviated diff should have parenthesis when there is a product. XML CODE #1833

Closed richardgobeli closed 6 months ago

richardgobeli commented 8 months ago

You can see here that there should be brackets around the product or a sum that is inside the derivative when written as a subscript. ein131R is the substitution of N = R*Z looks like the R(r) is multiplying the diff, but it really is inside the diff. I don't know if it is the height of the expression that makes it inside the diff N_r, N_rr, and N_zz. The actual diff equation is below in the text. The derivabbrev code is hard to read. It looks like the copy text does not do the product. RZ is really R*Z. image (%i228) ein131; (%o228) -(diff(N,r,1)/r)+N/r^2-diff(N,z,2)-diff(N,r,2)=0 (%i229) depends([R,ψ],[r],[Z],[z]); (%o229) [R(r),ψ(r),Z(z)] (%i230) eqN:N=RZ; (%o230) N=RZ (%i231) ein131R:subst([eqN],ein131); (%o231) -(diff(RZ,r,1)/r)+(RZ)/r^2-diff(RZ,z,2)-diff(RZ,r,2)=0 --> ein131s:expand(ein131R/(RZ)); (%o233) -(diff(RZ,r,1)/(RZr))+1/r^2-diff(RZ,z,2)/(RZ)-diff(RZ,r,2)/(RZ)=0

gunterkoenigsmann commented 6 months ago

My guess is that in order to make this happen one has to manipulate the left and right binding powers. But that aspect of maxima I definitely am no expert in ;-(

richardgobeli commented 6 months ago

I guess this may be OK. the lbp and rbp are already the highest at 200. below you can see a product is with parentheses, but with a sum, it does not show parentheses.

image binding powers of other operators in expression. image