Tag Info

Hot answers tagged

23

The plan is first get the "external" contour and then use Green's theorem to find its area. r[t_] := {-9 Sin[2 t] - 5 Sin[3 t], 9 Cos[2 t] - 5 Cos[3 t], 0} (*find the intersections*) tr = Quiet@ToRules@Reduce[{r@t1 == r@t2, 0 < t1 < t2 < 2 Pi}, {t1, t2}]; pt = {t1, t2} /. {tr} // Flatten; pts = SortBy[pt, N@# &]; pps = Partition[pts, 2]; Now ...


9

Is this what you want? Clear[Derivative, h]; h[0] = 1; (* to avoid division by zero with OP's example R *) Derivative[1][h][s_] := Block[{Derivative}, h'[\[FormalS]] /. First@Solve[ D[R[a + h[\[FormalS]]] == - \[FormalS], \[FormalS]], h'[\[FormalS]]] /. \[FormalS] -> s ]; Derivative[n_][h][s_] := D[Derivative[n - ...


6

Update Based on Guesswhoitis. answer I have improved my ugly code and use his approach. Otherwise the format is as outlined in original answer. Manipulate[p = {-a, 0}; q = {0, b}; r = {c, 0}; s = mp[a, b, c]; nfb = RegionNearest[Circle[{0, 0}, b]]; nfc = RegionNearest[Circle[{0, 0}, c]]; res = VectorAngle @@@ Partition[Join[{{-a, 0}}, sc[#] & /@ ...


6

MyLine is embedded in 2D space, thus for $x\in\text{MyLine}$, x is a 2D point and Sin[x] just makes no sense. You probably meant the interval Interval[{-Pi,Pi}] instead, which I think should work. But it doesn't. I don't know why. Maybe a bug? In[27]:= MaxValue[Sin[x], x \[Element] Interval[{-Pi, Pi}]] During evaluation of In[27]:= MaxValue::objfs: The ...


5

Since "Visualizing the resulting triangle is left as an exercise for the interested reader" and I am interested here is a visualization of J.M.'s numeric solution. DynamicModule[{corners, perimeter, sol, u, v, pts}, Manipulate[ corners = {{-c, 0}, b {(1 - u^2)/(1 + u^2), 2 u/(1 + u^2)}, a {(1 - v^2)/(1 + v^2), 2 v/(1 + v^2)}}; perimeter[u_, v_] = ...


4

Although Belisarius' creative solution is entirely satisfactory, a solution symbolic at every step may be useful. To begin, define x[t_] := -9 Sin[2 t] - 5 Sin[3 t] y[t_] := 9 Cos[2 t] - 5 Cos[3 t] and note that t = π corresponds to the uppermost point in the star in the question, {0, 14}}. From there, the point {0, -5} can be reached by increasing or ...


2

Line defines a 2D region, therefore MyLine = Line[{{-Pi, 0}, {Pi, 0}}]; MaxValue[First@Sin[{x1, x2}], {x1, x2} ∈ MyLine] or MaxValue[Sin[First@{x1, x2}], {x1, x2} ∈ MyLine] or MaxValue[Sin[Indexed[x, 1]], x ∈ MyLine] would be the correct syntax. But it's much simpler to use MaxValue[{Sin[x], -Pi < x < Pi}, x]


1

It is not exactly what you asked about, but did you try this: list = {Cos[x], Sin[x], -(Cos[t3 (d1 - d2)]/(1728 tg^3 (d1 - d2)^2)) + Cos[t3 (d1 - d2)]/(864 tg^3 (d1 - d2) (-d1 + d2)) + Cos[t3 (d1 - d2)]/(864 tg^3 (d1 - d2) (2 (d1 - d2) - 2 (-d1 + d2))) - Cos[t3 (d1 - d2)]/(864 tg^3 (d1 - d2) (2 (d1 - d2) + 2 (-d1 + ...


1

If you think you will run into that ambiguity a lot you might want to define a function to carry out your calculation: Clear[matrixmult] matrixmult[m_?MatrixQ, v_?VectorQ] := v.m.v matrixmult[m_?NumberQ, v_?VectorQ] := v.(m IdentityMatrix[3]).v I used two conditional definitions: the correct definitions will be picked depending on the type of the ...


1

If you just want to track things for your own usage you could do something simple like this: lists = {a, b, c}; scalars = {p, q, r}; function[sym_] := Which[ MemberQ[lists, sym], "list", MemberQ[scalars, sym], "scalar", True, Head[sym]] function /@ {a, p, 0} {"list", "scalar", Integer} You ...


1

I can't open the 9MB file as it is a .7z extension and I don't know what that is. However, if your expressions has sets of Denominators that are the same then the following will spread the Simplify over your kernels by ParallelMaping it. tmp is the first 5 summands you shared in PasteBin Simplify@Total@ParallelMap[Simplify[Total[#]] &, GatherBy[List ...



Only top voted, non community-wiki answers of a minimum length are eligible