Tag Info

New answers tagged

4

I know nothing about the range of the data for your problem. Assuming that the values for Rho, Mu and z are real numbers you can gain insight into your problem by combining bbgodfrey's comment with a plot using Manipulate. For example, if Rho and Mu are known parameters you can see how the solution varies as you change the value of z. Manipulate[ ...


-1

This should work: Replace[{484/45, -16 EulerGamma/3, -8 Log[2], PolyGamma[0, 1/Sqrt[2]], (48/5 + 2 I/5) Sqrt[2] Log[1 + Sqrt[2]]}, _?ExactNumberQ -> 1, 2] (* {1, EulerGamma, Log[2], PolyGamma[1, 1/Sqrt[2]], Sqrt[2] Log[1 + Sqrt[2]]}*)


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 ...


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 ...


0

I have been working on this problem and I think I found the answer. I'm posting here in hopes it will help someone else. As I stated, and S^n where n is an odd number will give a 0 matrix on a symmetric integral. My solution is then to remove from the expression, automatically, all the terms where S^n where n is an odd number. The code is below, where it ...


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 ...


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 ...


3

Here is a more complete example. ClearAll[fun, $opsPatt]; $opsPatt = Alternatives @@ {Minus, PreDecrement, Decrement, PreIncrement, Increment, Greater, Less , GreaterEqual, LessEqual, Equal, Unequal, Mod, Divide, Times, Subtract, Plus, BitShiftLeft, BitShiftRight, BitAnd, BitXor, BitOr, And, Or, Not}; SetAttributes[fun, HoldAll]; ...


0

This is a complete example. ClearAll[fun, $opsPatt]; $opsPatt = Alternatives @@ {Less, Greater, LessEqual, GreaterEqual, Equal, Unequal}; SetAttributes[fun, HoldAll]; fun[code_] := ReleaseHold[ Hold[code] //. { (head : $opsPatt)[x_, y_] :> COperator[head, {x, y}], HoldPattern[Set[lhs_, rhs_]] :> CAssign[lhs, rhs], ...


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 ...


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]



Top 50 recent answers are included