Linked Questions

5
votes
1answer
115 views

Generate pattern held by HoldPattern

I am trying to match expressions that have factors with certain exponents. For instance, I would like to match as follows ...
5
votes
4answers
226 views

How to Force Evaluation of Derivative in a Pure Function Definition

Let's say I have a function f1 = #^2 &; I want to calculate its derivative, perform some manipulations and make the result a pure function. I try ...
0
votes
3answers
86 views

Function definition from a variable (RESTATED)

This is similar to a problem I had earlier. I have a variable Gj that is related to the nj, for example: ...
2
votes
1answer
56 views

any way to stop all the following evaluations?

I often slect the whole notebook to evaluate. Sometimes some functions may return wrong parameters, which may happen, for example, I may have forgotten to specify values to some variables in the ...
7
votes
1answer
699 views

Free Convective Heat Transfer of Non-Newtonian Power Law Fluids from a Vertical Plate

I am trying to solve a set of PDEs mentioned in this paper with NDSolve but facing quite a few issues. The PDE system is: ...
3
votes
1answer
29 views

Condition in SparseArray does not check the condition for some matrix elements

Consider the following MWE: SparseArray[{{i_, j_} /; (IntegerDigits[i - 1, 2, 2][[1]] == 0) :> 1}, {4, 4}] This should give a $4\times 4$ matrix in which the ...
3
votes
1answer
36 views

Prevent argument substitution in held expression when injecting into unevaluated code

I want to write a custom sow/reap pair to wrap any piece of code in sow[code] and call reap ...
16
votes
1answer
1k views

How to solve the tsunami model and animate the shallow water wave?

Backslide introduced in 9.0, persisting through 11.3. Recently when I was learning differential equations, I noticed there is a shallow water wave equation to model the tsunami propagation. How to ...
8
votes
7answers
1k views

How to display very small numbers in Mathematica?

I am trying to evaluate the function: $$f(x) = \cos(x) - \mathrm{e}^{-2.7 x}$$ at $x = 1.7 \times 10^{-25}$ and Mathematica keeps returning '0.' How do I evaluate the expression in a better way?
10
votes
2answers
420 views

How to copy formatted numbers as MathML without quotation marks?

I have the following code: a = 6.08717*10^6; b = a/3; c = a*1.5; d = a^2; matrix={{a, b, c, d},{b, c, d, a},{c, d, a, b},{d, a, b, c}}; matrix // EngineeringForm ...
6
votes
4answers
489 views

partial numerical evaluation

Context The following is an issue I have come across many times and still do not have a satisfactory solution for. The context of it is this. Let's say we have an equation, a linear ODE for the ...
6
votes
2answers
143 views

How to use ReplaceAll and RuleDelayed with an Association? [duplicate]

I expected that something like this ...
7
votes
2answers
366 views

Evaluate Only Part of a Function

I have a list of functions, each containing none or more of the functions Plus, Times, ...
4
votes
1answer
62 views

How can I evaluate only the (bound) variables in an expression?

Given an arbitrary expression, how can I have Mathematica only evaluate the (bound) symbols, i.e. replace them by their respective values, but not do any further simplification/evaluation of the ...
7
votes
1answer
245 views

Instability, Courant Condition and Robustness about solving 2D+1 PDE

After several discussions, I would like to focus on the robustness of solving 2D+1 PDE by considering all suggested methods from @xzczd (see here) I found that the Ratio between the convection term ...

15 30 50 per page
1
2 3 4 5