I just recently updated from version 11.2 -> 12...there apparently are quite a few changes since 11.2. $\unicode{952}\unicode{960}$
One being how version >11.3 deal with numbers that approach zero.
To simulate a physical impulse one can use such an equation:
bump[t_] := 7 E^(-10 (t - 3)^2) - 3/2 E^(-10 (t - 6)^2) + 3 E^(-10 (t - 9)^2)
Which looks like this plotted over time in 11.2 and 11.1 this didn't cause any issues for me, I use this function quite often for impulses in many systems.
Now however I am constantly getting an error that comes along with it:
After doing some duckduckgoing, I found in this post And with some more infos and what I thought would be a solution at this post
One can simply increase the precision using
Exp[-900`20]
(*3.6678745841776872*10^-348*)
However as I try in all combinations of adding the higher precision or using Working Precision -> 20 I get error messages, or barring error messages in the functions themselves, I get the old General error message in the plot,
When using NDSolve[] the system becomes stiff at a specific time and cannot be further calculated (which in prior versions was again, never an issue)
Example working code from 11.2 with error from v12 and NDSolve:
Plot[{θ[t] 10, ϕ'[t]} /.
NDSolve[{{{0.18884908961676594` Sin[θ[t]] +
0.0023324989011712697` θ''[
t] == -0.000795` ArcTan[
10.` θ'[t]] +
0.0920755` Cos[θ[t]] f[t] -
0.00016799999999999996` θ'[t] -
0.0004032497194086029` ϕ''[t],
0.0004032497194086029` ϕ''[t] ==
0.0335` u[t] -
0.000039255383907286545` ϕ'[t] +
0.0004032497194086029` θ''[
t]}, {θ[0] == 3.0915926535897933`,
θ'[0] == 0, ϕ[0] == 0,
ϕ'[0] == 0}} /. {u[t] ->
42.69342907334017` (-π + θ[t]) +
3.88853571287127` θ'[t] +
0.21937104569306368` ϕ'[t],
f[t] -> 3 E^(-10 (-9 + t)^2) - 3/2 E^(-10 (-6 + t)^2) +
7 E^(-10 (-3 + t)^2)}}, {θ[t], ϕ'[t]}, {t, 0,
14}] // Evaluate, {t, 0, 14}, PlotRange -> All,
ImageSize -> Large, PlotLegends -> {θ, ϕ'}]
f[t] being where I would normally add my external forces, as my impulse function.
An attempt to add higher working precision to my bumpy function with error:
bumpy[t_] := 7 Exp[-10 (t - 3)^2`20 ] - 3/2 Exp[-10 (t - 6)^2`20 ] + 3 Exp[-10 (t - 9)^2`20]
(*Syntax::sntxf: "(" cannot be followed by "-10 (t-3)^2 `20)".*)
What is the correct way/syntax to write a function with increased precision for further use?
Thanks for the help!