0
$\begingroup$

I am running some symbolic scripts to generate a model problem. One of my outputs is

enter image description here

This is generated by the Mathematica code

enter image description here

or, in Mathematica format (owing to the fancy lettering and formatting used)

Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptCapitalB]\), \(_\)]\), 
      i] = {0, 0, 
        Subscript[\[ScriptCapitalB], 
         z][\[ScriptX], \[ScriptY], \[ScriptT]]} + 
       Curl[{0, 
         0, \[ScriptCapitalA][\[ScriptX], \[ScriptY], \[ScriptT]]}, {\
    \[ScriptX], \[ScriptY], \[ScriptZ]}];
    Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptCapitalB]\), \(_\)]\), 
      a] = {Subscript[\[ScriptCapitalB], a][\[ScriptT]] Cos[\[Phi]], 
       Subscript[\[ScriptCapitalB], a][\[ScriptT]] Sin[\[Phi]], 0};
    
    \!\(\*UnderscriptBox[\(\[ScriptCapitalB]\), \(_\)]\) = Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptCapitalB]\), \(_\)]\), a] + Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptCapitalB]\), \(_\)]\), i];
    Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptR]\), \(_\)]\), 
      w] = {Subscript[\[ScriptX], w][\[ScriptS]], 
       Subscript[\[ScriptY], w][\[ScriptS]], \[ScriptZ]}; 
    VectorNorm[vec_] := Sqrt[vec . vec];
    UnitVector2[vec_] := vec/VectorNorm[vec];
    UnitTangent[vec_, param_] := UnitVector2[D[vec, param]]
    UnitNormal[vec_, param1_, param2_] := 
      UnitVector2[D[vec, param1]\[Cross]D[vec, param2]] ;
    NormalNorm[vec_, param1_, param2_] := 
      VectorNorm[(D[vec, param1]\[Cross]D[vec, param2])];
    Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptN]\), \(_\)]\), w] = 
      FullSimplify[UnitNormal[Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptR]\), \(_\)]\), 
        w], \[ScriptZ], \[ScriptS]]];
    magFieldNormalWall =  FullSimplify[
    \!\(\*UnderscriptBox[\(\[ScriptCapitalB]\), \(_\)]\) . Subscript[
    \!\(\*UnderscriptBox[\(\[ScriptN]\), \(_\)]\), w]]

However, it is often more convenient to write the final two terms as

$$ \dfrac{\partial A}{\partial x}\dfrac{\partial x_{w}}{\partial s}+\dfrac{\partial A}{\partial y}\dfrac{\partial y_{w}}{\partial s}=\dfrac{\partial A}{\partial s} $$

but I don't know how to make Mathematica think "this expression looks like the above so let's write it as that". Is there an easy way to get Mathematica to "reverse simplify" an expression by condensing it into a more convenient form?

$\endgroup$
4
  • 1
    $\begingroup$ Please include Mathematica code for this expression so that someone is able to help you further. Thanks. $\endgroup$
    – Syed
    Jan 4 at 9:52
  • $\begingroup$ Please include copy-paste-able code, not its picture. You can copy directly from the input cell and paste in the Edit window where there is a braces button { } to help you format it. Thanks. $\endgroup$
    – Syed
    Jan 4 at 10:10
  • $\begingroup$ Prior to copy and paste convert cells to Raw InputForm or at least InputForm $\endgroup$
    – Bob Hanlon
    Jan 4 at 16:20
  • $\begingroup$ See How to copy code from Mathematica so it looks good on this site. $\endgroup$
    – MarcoB
    Jan 4 at 19:35

1 Answer 1

1
$\begingroup$

Does this help:

enter image description here

??

The body must be at least 30 symbols, therefore, I add this senseless text.

$\endgroup$
2
  • $\begingroup$ Instead of the senseless test, please explain what changes you have made to the code, and post text, not pictures. $\endgroup$
    – MarcoB
    Jan 4 at 15:35
  • 1
    $\begingroup$ @MarcoB I am intentionally posting the image, rather than a code, since OP made his code with a huge number of sub-, superscripts, and script font. These make it absolutely impossible to view the code and the output, let alone to understand it. Like I did, one can see and understand what has been done. As for the explanation, I applied a simple rule. It is exactly the one OP wants. I only left one item in the left-hand part and placed the rest into the right-hand part. $\endgroup$ Jan 4 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.