Tag Info

Hot answers tagged

13

EDIT--- The code was updated to include anti-cheating filter to address important issues raised by @Jens in comments (thanks). More filters can be added to exclude other type of cheating. ---EDIT I was teaching physics and math for many years and consider this to be a very important question. I would say Mathematica is very well equipped for this type of ...


13

In this context it might be useful to remark that if you enter escsumtesc you'll get a complete sum template with your cursor already at the bottom: I feel this is much easier than going through the other shortcuts. The same works for products: escprodtesc indefinite integrals: escinttesc and definite integrals: escdinttesc The 't'-s at the ...


12

The keyboard shortcut for underscripts has now been changed to ctr-4 (ctr-$). So, to enter your Sum[expr, {n, 1, 10}], you should type escsumesc ctr-$n=1ctr-%10 ctr-spaceexpr Another option is to type the overscript ctr-& first and then use the ctr-% shortcut to move to the underscript position. Not all of the tutorials have been updated (and if you ...


10

Here is a proof-of-concept of something that you can build upon to create such homework assignments. First, a helper function to check the correct answer and display the result. I'm only checking for accuracy to the third decimal, but you can tweak that as you wish. ClearAll[checkAnswer] checkAnswer[Null, _] := "" checkAnswer[ans_, correct_] := If[ ...


8

Verbeia is right. An alternative notation is to use escpdesc which gives a partial derivative; thus, typing escpdesc ctrl-t followed by f[x,t] will give the derivative of f with respect to its second argument. For instance, this is a valid way to specify a differential equation: This is closer to what you're after than D[f[x,t],t], for instance.


8

For a start, f[x,y]^(0,1) isn't the same as f^(0,1)[x,y]. But the real reason is that these expressions are very different in meaning, as revealed by their FullForm: D[f[x, y], y] // FullForm Derivative[0,1][f][x,y] versus (and I had to use a simple symbolic expression as the exponent to show what was going on: f[x,y]^z//FullForm Power[f[x,y],z] ...


7

As I mentioned in my comment to the question, I am quite fascinated by the idea of testing free-form input by numerical means similar to what the AcroTeX bundle has been able to do for a long time. This idea differs quite fundamentally from Vitaiy's suggestion, so I have tried to make it work in Mathematica. I will suspend discussion of the crucial ...


6

If for a given norm, we define a circle of radius $r$ centered around $q$ as all points at a distance $r$ from $q$: $\{x \in R^2 ; \|x-q\|=r \}$ Then we can define $\pi$ as the circumference of this curve over $2r$. Let's use the p-norms: $\|x\|_p = (|x_1|^p + |x_2|^p)^{\frac{1}{p}} $ (* Unit circle parametrization in p-norm *) unitCircle[t_, p_] := ...


6

You can use a slightly different query: (convert 1 atm to pascals)/pascals The number in this case is a regular number (not a string or some other exotic construction.) If you instead use Wolfram|Alpha query (shortcut ==), you get a lot of results: with a + icon on the right of each. Clicking on the + gives a menu where you can choose a format: ...


5

What internally makes the superscript behave as a Derivative seems to be implemented with TagBox, this is what the output looks like: SuperscriptBox["f", TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction -> None] If you show this with DisplayForm you will get something that looks like a superscript but ...


5

I have a function called "AbleitungsForm" (Ableitung is german for Derivative) which is based on an answer I found here in SE. I coudn't find the original answer. It looks like this: AbleitungsForm::ON = "AbleitungsForm with Options \"AuchStandard\[Rule]`1`\" and \"MitArgumenten\[Rule]`2`\" is activ."; AbleitungsForm::OFF = "AbleitungsForm has been ...


5

As the combination Ctrl+% behaves as before (it toggles between Subscript and Superscript, between Underscript and Overscript), you can use it instead of any special short cuts for Underscript: Enter your Overscript first, and use Ctrl+% to enter Underscipts. Of course, this is more challenging a habit switch than the alternative (switch to the new short ...


4

There is another way to input derivatives for people who really like TraditionalForm. I like TraditionalForm output to look as much as possible like a $\LaTeX$ typeset formula, and that's why I came up with the format that Peter is using in his answer. For example, I want partial derivatives to look like this: $\frac{\partial^2 f}{\partial x\partial y}$ or ...


3

I'd leave Pi protected personally and assign a different variable to be used in its place, so rather than c=2πr c would be equal to x2r, with x as another variable, so you can then make x equal to Pi, 22/7, 4, 3.14, 3.2, 3.1, my shoe size... whatever.


2

Edit: My interpretation of your question: From the clarification in your comment to the question: like for second derivative, fCtrl6Esc''Esc I assume you want the analogous entry method for the third derivative as you demonstrated for the second derivative. The difference to the other entry methods is that it uses the special character ...


1

I am not sure there is a simple solution to this. result = %; result //FullForm WolframAlphaResult["convert 1 atm to pascals", List[List["Result", 1], "Content"]] Copy As... and various other attempts to get at the result don't work. Interestingly, copying and pasting the result into somewhere other than Mathematica (e.g. an answer window ...



Only top voted, non community-wiki answers of a minimum length are eligible