Tag Info

New answers tagged

0

The issue at least on my machine (Linux, M10.1) is that the plots take a long time to generate and so creating a smooth animation with on-the-fly generated plots is, well, impossible. You could generate the plots beforehand, though. Here's some code to show you the progress of plot generation as well. Assuming that you have defined a function f[t] that ...


1

I guess there is some floating-point-related issue here... This works: f[t_] := RegionPlot[ TransformedRegion[ Rectangle[{-1, -1}, {1, 1}], { Indexed[#1, {1}] (1 + t (Indexed[#1, {2}]^2 - 1)) + 2 t, Indexed[#1, {2}] (1 + t (Indexed[#1, {1}]^2 - 1)) + 2 t } & ], PlotRange -> {{-1 + 2 t, 1 + 2 t}, {-1 + 2 t, 1 + 2 t}} ] ...


1

One way to get the real-number version of Abs, which is piecewise differentiable is to use ComplexExpand: ArcLength[ComplexExpand@{x, x^2 - 4 Abs[x] - x}, {x, 0, 5}] (* 1/2 (5 Sqrt[26] + ArcSinh[5]) *) Alternatively, PiecewiseExpand, along with the assumption that x is real works, too: Assuming[x ∈ Reals, ArcLength[{x, PiecewiseExpand[x^2 - 4 Abs[x] ...


1

Rather uninspiringly but consistent with problematic Abs[x]: f[x_] := Piecewise[{{x^2 + 3 x, x < 0}, {x^2 - 5 x, x > 0}}] e.g. ArcLength[f[x], {x, -2, 2}] ArcLength[f[x], {x, 0, 2}] ArcLength[f[x], {x, -2, 0}] yield respectively, 1/4 (3 Sqrt[10] + 5 Sqrt[26] + ArcSinh[3] + ArcSinh[5]) 1/4 (-Sqrt[2] + 5 Sqrt[26] - ArcSinh[1] + ArcSinh[5]) 1/4 ...


1

Since Abs behaves badly in some situations, let's first assume you want the arc length for some x>0. When x>0, your function can be rewritten as (I'll keep that un-simplified form so that you see, I only removed the Abs) f[x_] := x^2 - 4 x - x Now we can calculate the arc length for the interval [0,5] with the usual formula manually ...


3

Mathematica does not know how to take the derivative of Abs[x] D[Abs[x], x] Derivative[1][Abs][x] Consequently, use the equivalent (for real x) Sqrt[x^2] Abs[x] == Sqrt[x^2] // Simplify[#, Element[x, Reals]] & True f[x_] = x^2 - 4 Sqrt[x^2] - x; ArcLength[{x, f[x]}, {x, 0, 5}] 1/2 (5 Sqrt[26] + ArcSinh[5]) % // N 13.9038



Top 50 recent answers are included