Message Boards Message Boards

1
|
3814 Views
|
11 Replies
|
2 Total Likes
View groups...
Share
Share this post:

No "mathematical" input template for common differentiation with 2 variable

Posted 2 years ago

One of the great benefits of Mathematica is that one can enter equations and such using mathematical format, complete with integral signs with limits, and such. Most of these appear in the Basic Math Palette.

One can input derivatives of one variable using the template. However, these are not evaluated... some of them are just "for show."

How can one input in "mathematical" form a derivative with respect to two variables, the equivalent of D[f[x,y], {x,2},{y,3}]?

The key difficulty is to get the nice mathematical form AND HAVE THAT CODE RUN BY MATHEMATICA SO IT CALCULATES THAT ACTUAL DERIVATIVE.

POSTED BY: David Stork
11 Replies

This version seems to work also as a palette:

POSTED BY: Gianluca Gorni

Have a look at the notebook.

POSTED BY: Gianluca Gorni

I apologize for "yelling," but I was focussing on/highlighting the issue that seemed to be the source of the misunderstanding. Forgive me.

Your current solution is excellent and acceptable. (I had tried something along those lines with the Basic Math Palette but somehow failed.) I was hoping for a slightly more "mathematical form," such as your typographic form you provided earlier. After all, I've never seen a mathematician write a derivative with the curly brackets and such.

I'll assume your final solution is the best that can be provided and be done with it.

Thanks again.

POSTED BY: David Stork

I'm going to reply here, but I must insist that you NOT YELL AT ME the way that you have been yelling at the other poster in this thread. It is not polite.

To enter a multivariable derivative in a mathematical form do the following:

  1. type Esc pd Esc to get the partial derivative symbol
  2. hit Ctrl- to add a subscript to the derivative symbol
  3. in the subscript type, for example, {x,2},{y,3}
  4. exit the subscript then type (Sin[a x] Cos[b y]) - the parentheses are needed here
  5. now hit Shift-enter and it should work

enter image description here

POSTED BY: Jason Biggs

No no no. The issue isn't just about running code to get the template... it is to get a template THAT CAN THEN BE INTERPRETED BY MATHEMATICA TO CALCULATE THE ACTUAL MULTI-VARIABLE DERIVATIVE.

As background: for example when you enter D[Sin[a x] Cos[ b y], {x, 2}, {y, 3}] you get

-a^2 b^3 Sin[a x] Sin[b y]

In short the actual two-variable symbolic derivative IS COMPUTED.

Great. But here the input is in the unwanted "computer science" form (D[Sin[a x] Cos[ b y], {x, 2}, {y, 3}]) rather than the desired "mathematical typography" form such as provided by the template you created.

But getting the mathematical typography is just HALF my problem: I then want that input form TO BE INTERPRETED (calculated) by Mathematica. Your approach does not achieve that!!! If I fill in your template AND THEN TRY TO CALCULATE THE ACTUAL DERIVATIVE OF SOME FUNCTION, MATHEMATICA FAILS.

Try computing the derivative from your filled-in template to see why your approach does not provide a solution as follows: Execute your code to get the nice mathematical typography as you've shown. Now fill in for the function an example, such as Sin[a x] + Cos[b x]. I'm sure it all looks precisely how I'd like... in a mathematical form that is easy to read by mathematicians. Great.

But now the problem: TRY TO EXECUTE YOUR CODE TO HAVE MATHEMATICA CALCULATE THE ACTUAL DERIVATIVE, to get the result in the above example (-a^2 b^3 Sin[a x] Sin[b y]). Your code does NOT achieve that.

In short, I WANT the solution -a^2 b^3 Sin[a x] Sin[b y] to appear BUT IT DOES NOT. THAT is the problem. (Actually, it is the second HALF of the problem.)

In short (again): Render a multi-variable derivative in the nice mathematical form you have BUT ALSO HAVE THE INPUT INTERPRETABLE BY MATHEMATICA SO THAT THE ACTUAL DERIVATIVE IS CALCULATED.

I don't think I can be any clearer than that.

POSTED BY: David Stork

Could you please clarify what you mean when you say, "Does not work!!"?
The forms I showed evaluates fine to me.
Maybe you include a notebook with your evaluation vs the expected one?

POSTED BY: Ahmed Elbanna

If you evaluate the code, you will be presented with a template. Fill in the little squares and evaluate. On my system it computes fine.

POSTED BY: Gianluca Gorni

Thanks but no. My whole question centers on being able to COMPUTE the derivative from the "mathematical" notation. Your attempt gives the appropriate typography but when I insert a function such as x^2 + y^3 and try to take the equivalent of D[x^2 + y^3, {x,2},{y,1}] your code simply does not perform the computation.

I need to be able to COMPUTE (not merely render).

Clear?

POSTED BY: David Stork

Maybe something like this?

DisplayForm@FormBox[
    FractionBox[
      RowBox[{
         SuperscriptBox["\[PartialD]", "\[Placeholder]"], 
     "\[Placeholder]"}], 
      RowBox[{
         RowBox[{"\[PartialD]", 
            SuperscriptBox["\[Placeholder]", "\[Placeholder]"]}], 
     "\[ThinSpace]", 
         RowBox[{"\[PartialD]", 
            SuperscriptBox["\[Placeholder]", "\[Placeholder]"]}]}],
      MultilineFunction -> None], TraditionalForm]

It is inspired by the CellExpression of Ahmed's answer. It may be turned into a palette.

POSTED BY: Gianluca Gorni

Sorry, no. The typography does NOT get interpreted and computed. Try multiple variable integration on x^2 + y^3. Does not work!!

POSTED BY: David Stork

Hi David,
Does the video below answer your question? enter image description here

POSTED BY: Ahmed Elbanna
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract