Reputation
6,880
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 12 77
Impact
~67k people reached

12h
comment List of compilable functions
With all due respect, I think the first example given by the engineer is meaningless. Power is in the list of Compile`CompilerFunctions[] !
12h
comment Why Function is compiled?
@Pickett To be honest, I was about to add Function to my answer below that question yesterday, but was confused because I felt it strange that as a frequently used function (I think) inside Compile, no one has ever mentioned Function there hitherto, so I was guessing there might be some deeper reason and asked this question. Well… now that this question gets no answer and 1 downvote, maybe I should delete it and just add Function to the list?
Jun
23
comment How can I get Mathematica to produce better Fortran code?
Come on, not every one can spend another $2,495.00 without hesitation. BTW, the discount of MathCode for students is really stingy compared to Mathematica: Mathematica student version only sells for 140 dollars (50.00 dollars in China, at least when I bought it), while MathCode sells for $1,095.00 even in education store!
Jun
21
comment Smoothing a unit step function
After a second look I think your question is a little unclear. What do you really want? Smoothen n with NDSolve or find a smooth approximation of n which is to be used in NDSolve?
Jun
21
comment How to use NDSolve with discontinuities at internal boundaries?
@Dr.Know To deal with discontinuities of derivatives, you can try changing the independent variable, for example $f′(0+)/f′(0−)=\lambda$ can be "eliminated" by $ζ=c z$ where $c$ is a piecewise coefficient.
Jun
21
comment How to use NDSolve with discontinuities at internal boundaries?
One possible reason for the failure of the former approach is WhenEvent can only deal with IVP (at least now). (Just checked the document of WhenEvent and saw no example for a BVP. )
Jun
20
comment How to use NDSolve with discontinuities at internal boundaries?
Sadly this answer is wrong. Just compare the values at z=0 with OP's, they're apparently different.
Jun
5
comment Diverging solution to coupled second order ODEs from NDSolve
@AlbertRetey Very surprising! In this case changing 1.5 to 3/2 is necessary, or WorkingPrecision -> 32 won't work at all! I used to think that though the warning NDSolve::precw will be generated, as long as a higher WorkingPrecision is set, approximate numbers in the differential equation won't influence the result. (Actually I never saw this principle failed before!)
Jun
4
comment How to solve the differential equation with Duhamel's integral?
@MichaelE2 Er…sorry, but I just can't figure out how to calculate the n-th derivative at $t=0$ where $n>2$. $x''(0)$ can be obtained by Solve[eq /. t -> 0, x''[0]]/. x[0] -> 0 (* => x''[0] == 0.000625 *), but when it comes to D[eq, t], a $\frac{x'(0)}{\sqrt{t}}$ term involves in. One may argue that since $x'(0)=0$ so this term is (probably) zero at $t=0$, too, but when it comes to D[eq, {t, 2}], a $\frac{x''(0)}{\sqrt{t}}$ term involves in…
Jun
3
comment How to solve the differential equation with Duhamel's integral?
Oh, "Adding the dummy algebraic equation y[t] == y0[t] to the system helps with the accuracy." I missed this sentence, seems that I'm a little tired today 囧
Jun
3
comment How to solve the differential equation with Duhamel's integral?
As to the accuracy part: it's possible to improve the accuracy of FunctionInterpolation, see the edit of my answer.
Jun
3
comment How to solve the differential equation with Duhamel's integral?
Very interesting. BTW the dae = y[t] == y0[t]; line isn't necessary.
May
26
comment Solve wave equation using DSolve?
@kattern As to the The actual situation: is a solution involving unevaluated InverseLaplaceTransform acceptable?
May
26
comment Solve PDE with DiracDelta function
In v9.0.1, DSolve returns unevaluated after a warning. For the FourierTransform part: unlike LaplaceTransform, currently FourierTransform isn't handy. To circumvent this, here's a shell for enhancing. But what's really troublesome is: the ODE isn't defined in a infinite domain, so Fourier transform can't be used directly, theoretically one can extend the domain in cycles with e.g. Mod, but personally I never succeeded in the subsequent step: perhaps a artificial periodic function is too hard for FourierTransform, I'm not sure.
May
20
comment Save a C compiled function without losing the blessing of C compiler
@OleksandrR. Er…are you sure? I just tested the code in this answer, and funcNew apparently makes use of the DLL even if I restart Mathematica: i.stack.imgur.com/gIqig.png
May
19
comment Can Mathematica be used for developing “normal” stand-alone software?
Related: mathematica.stackexchange.com/q/37888/1871
May
19
comment Laplace transform of $\frac{1-\cos (t)}{t}$
Well, are you sure that LaplaceTransform[f[t], t, 2 s] is always equal to LaplaceTransform[f[t/2], t, s]?
May
16
comment Analogue for Maple's dchange - change of variables in differential expressions
How about adding one more syntax dChange[expresion, rule, {oldVars}, {newVars}, {functions}] that will internally make use of CoordinateTransform instead of Solve? Then one can do something like Assuming[{r > 0, -Pi < θ < Pi}, dChange[D[f[x, y], x, x] + D[f[x, y], y, y] == 0, "Cartesian" -> "Polar", {x, y}, {r, θ}, f[x, y]]]
May
13
comment Manipulating a damped oscillator plot - plot does not show
possible duplicate of Manipulate not showing anything
May
13
comment Bilateral Laplace Transform
@Guesswhoitis. Yeah, I know, but InverseFourierTransform doesn't know 囧:i.stack.imgur.com/PGcPh.png