776 views

### Unexpected behaviors in built-in functions

Existence of this topic is discussed in this mathematica.meta post. I'm sure I am not the only non-beginner in WL who from time to time finds themselves not being able to predict an outcome of a ...
2k views

### Difference between Piecewise, Which and If?

I have the impression that these functions have different evaluation rules. I cannot produce a minimal example right now, but in general, what are the differences between these functions? That is, ...
• 11.4k
1k views

### Setting Up Boundary Conditions for Magnetostatic PDE

Bug introduced in 11.2.0 and fixed in 11.3.0 The system is a hollow cylinder (thin solenoid) with a current density $\text{J}$ and I'm looking to solve the magnetic potential ($\text{A}$) inside the ...
• 7,495
3k views

### A discontinuity in a plot of a continuous function

I plot a continuous, though not a smooth function: Plot[If[a >= 0.5, 0, Sqrt[0.5 - a]], {a, -1, 1}, PlotRange -> All] which returns the following One can ...
• 39.5k
2k views

### How to properly use conditionals inside NDSolve

Currently I am working with Mathematica to learn the program, and I'm confused what exactly is wrong with this code. ...
1k views

### When are If, Piecewise, Switch, and Which interchangeable and when are they not?

Experimenting with joint dependent distributions via the TransformedDistribution function, I used the following to derive a distribution where the second variate is ...
• 25.8k
1 vote
495 views

### Summand is not numerical at some point

I am trying to do some numerical integration with the following codes: ...
• 11
465 views

### NMaximize and Conditional Loop

I have developed the following code that simulates a process that decays over time and then returns to its initial state periodically. When I pass a list of random integers in the interval $(1,0)$ as ...
• 441