# Tag Info

14

If you use the third argument in Solve, i.e. a list of variables to be eliminated (take a look at the Eliminating Variables tutorial in Mathematica) then you'll get the result immediately : Solve[{a b c == -1, a^2/c + b/c^2 == 1, a^2 b + b^2 c + c^2 a == t, a b^5 + b c^5 + c a^5 == res}, {res}, {a, b, c, t}] {{res -> 3}} Edit ...

13

The code for the default ComplexityFunction was posted on MathSource a number of years ago by Adam Strzebonski (of Wolfram Research). You will see reference to the original reply from Adam referenced in a MathGroup reply from Andrzej Kozlowski dated 12 Jan 2010 with the subject: "[mg106386] Re : Radicals simplify". I mention all that because I can't get the ...

12

Working with RSolve we can find much more than only a few first terms, here is a general term of your function u[n] e.g. : u[n_] = u[n] /. Flatten[ RSolve[{ u[1] == 1, u[2] == 2, u[3] == 3, u[n] == -u[n-3] + 3 u[n-2] + 2 u[n-1]}, u[n], n]] Root[1 - 3 #1 - 2 #1^2 + #1^3 &, 3]^n Root[-45 + 457 #1 - 1028 #1^2 + 257 ...

12

Here's the exact answer: i1 = Integrate[x^n Exp[-(x - a)^2], {x, 0, Infinity}, Assumptions -> n > 0] /. n -> 1/2 (* 1/2 E^-a^2 (Gamma[3/4] Hypergeometric1F1[3/4, 1/2, a^2] + 1/2 a Gamma[1/4] Hypergeometric1F1[5/4, 3/2, a^2]) *) i1 /. a -> 0.3 (* 0.907605 *)

12

Working with such a sophisticated function as Reduce, if we can't get the result initially we should add possibly many assumptions. Without the Backsubstitution option it yielded: Reduce[ Abs[x] + Abs[y] + Abs[z] + Abs[t] == 1 && t != 0, {x, y, z, t}, Reals] No more memory available. Mathematica kernel has shut down. Try quitting other ...

11

This is in fact more of a math question than a Mathematica one. Your equation is one of the many transcendental equations (as opposed to being an algebraic equation that can be solved with methods for solving polynomials) that one cannot solve with the usual ways taught in undergraduate algebra/precalculus courses. In particular, the difficulty in solving ...

11

In general, one cannot get explicit analytic solutions of trancendental equations in terms of radicals. This is also the case of univariate higher order polynomial equations. On the other hand since Mathematica 7 we can find exact solutions (in terms of Root objects) of a wide range of (univariate) trancendental equations, for more detailed discussion of ...

11

Since you're working with vectors, just let Mathematica know that these are vectors. Some other systems (MATLAB and its relatives in particular) have the limitation that they can only work with matrices, forcing you to distinguish between row vector and column vectors and keep transposing. This is not necessary nor convenient in Mathematica. In[1]:= ...

10

First, you can try to apply the FunctionExpand command to the DifferenceRoot object. If it is able to find a closed form of the sequence, then the Limit might be able to find an exact symbolic limit. To find a numerical approximation, you can use the SequenceLimit command. In general, it does not guarantee to give the correct result, but if your sequence ...

10

In this particular case Mathematica for some reason considers b[i] as a constant. Compare: Integrate[Exp[Sum[-((cw λ - b)^2/(2 σ^2)), {i, 1, n}]], {cw, 0, 1}] (Sqrt[π/2] σ (Erf[(b Sqrt[n])/(Sqrt[2] σ)]-Erf[(Sqrt[n] (b-λ))/(Sqrt[2] σ)]))/(Sqrt[n] λ) A possible workaround consists in the manually expanding the sum Integrate[Exp[(-n cw^2 λ^2 + 2 cw λ ...

10

Short story $$\vartheta(x) = \arg \left[(\operatorname{Bi}x+i \operatorname{Ai}x)e^{-\frac{2}{3} i (-x)^{3/2}}\right]+\frac{2}{3} \operatorname{Re}\left[(-x)^{3/2}\right]$$ Update: I see that you want use only real functions, so you can expand this as $$\vartheta(x) = \begin{cases} \arctan\frac{\cos \left(\frac{2}{3} (-x)^{3/2}\right) ... 9 Solution using Block The easiest option is probably to use Block, and wrap your result in Hold or HoldForm. So, a = 1; b = 2; c = 3; result = Block[{a, b, c}, Hold[Evaluate[Expand[(a + b + c)^3]]] ] (* Hold[a^3+3 a^2 b+3 a b^2+b^3+3 a^2 c+6 a b c+3 b^2 c+3 a c^2+3 b c^2+c^3] *) The values will be automatically substituted once you call ... 9 You can use Select to pull the elements meeting some specified criterion from a list. The selected elements are returned in a list that you can feed to Total to sum them. Total is better than Sum for your problem because you don't have to supply the length of the list and you have no need for indexing. Clear[u]; u[1] := 1; u[2] := 2; u[3] := 3; u[y_] := ... 9 Assuming you don't have any built-in symbols in that list, you could simply do: DeleteDuplicates@Cases[Leff, _Symbol, Infinity] (* {da, ma, dm, mc, La, h, R} *) If you do have symbols from built-in contexts or packages, you can simply pick out only those that are in the Global context with: With[{globalQ = Context@# === "Global" &}, ... 9 You can use Defer to see how to properly enter your "summation" type notation. Defer[1 + Sum[Sum[1/((k + 2) k!), {k, n, Infinity}], {n, 0, Infinity}]] You can then enter that output to see that it works. You must've entered something different. 9 You need to specify assumptions: In[1]:= FunctionExpand[StirlingS2[n, 10], n > 0 && Mod[n, 1] == 0] Out[1]= -(1/362880) + 2^(-8 + n)/315 + 1/135 2^(-7 + 2 n) + 1/315 2^(-8 + 3 n) - 3^(-3 + n)/1120 + 1/5 2^(-7 + n) 3^(-3 + n) - 5^(-2 + n)/576 + 1/567 2^(-8 + n) 5^(-2 + n) - 7^(-1 + n)/4320 - 9^(-2 + n)/4480 9 FullSimplify[(-1)^n*BesselJ[n, z] - BesselJ[-n, z], n ∈ Integers, ComplexityFunction -> (StringLength @ ToString @ # &)] Also: ComplexityFunction -> (Count[#, _BesselJ | _Power, {-2}] &) ComplexityFunction -> (Count[#, _?NumberQ, Infinity] &) 8 Teach Mathematica the rules. The fundamental one is$$\frac{d}{dx} \prod_i f_i(x) = \prod_i f_i(x) \sum_i \frac{f_i'(x)}{f_i(x)}, at least where none of the $f_i(x)=0$. Iterate this to obtain higher-order derivatives: Unprotect[D]; D[Product[f_, i___], x_Except[List]] := Product[f, i] Sum[D[f, x]/f, i]; D[Product[f_, i___], {x_, n_Integer}] := ...

8

Analyze the integrand $f(r)r^2$: {Expand[Numerator[#]], Denominator[#]} & @ (Apart[f[r]][[#]] r^2 // FullSimplify) & /@ Range[3] The result exhibits the integrand as a sum of six fractions whose numerators are in the form $\lambda \exp(2 r \alpha / 3) r^k$ for $k=1,2$ and whose common denominator is in the form $(1 + \mu \exp(4 r \alpha / 3))^2$ ...

8

I think RecurrenceTable deserves justice as a very efficient way to tabulate solutions of the recurrence equations. Compare procedural approach with no dynamic programming used: In[214]:= Block[{u, A}, u[1] := 1; u[2] := 2; u[3] := 3; u[y_] := -u[y - 3] + 3*u[y - 2] + 2*u[y - 1]; A = Table[u[k], {k, 1, 25}]; Total[Select[A, EvenQ]]] // ...

8

The * multiplication operator is rendered in InputForm: c = a*b; c // InputForm a*b For producing/exporting strings: ExportString[c, "Text"] ToString[c, InputForm] "a*b" "a*b"

7

Here's another way to proceed, using Derivative[], and sidestepping the use of a dummy variable: LogDerivative[f_] := Derivative[1][Composition[Log, f]] Test: LogDerivative[Sin][x] Cot[x] LogDerivative[Gamma][x] PolyGamma[0, x] LogDerivative[#^3 &][x] 3/x

7

I'll start by saying that I don't have an answer, but I found this interesting and wanted to share some of the manipulations I noticed. I'm essentially "thinking out loud". Perhaps in recasting the question, somebody else will notice something. The following is a mixture of manipulations made by hand and some simplifications done in Mathematica. I started ...

7

[This answer was made while the OP question kept being changed...I hope it is current.] The easy way is to use the built-in SymmetricPolynomial: vietePoly[deg_Integer, n_Integer, var_: \[FormalX]] := SymmetricPolynomial[deg, Array[var, n]] Clear[x]; vietePoly[2, 4, x] (* x[1] x[2] + x[1] x[3] + x[2] x[3] + x[1] x[4] + x[2] x[4] + x[3] x[4] *) The ...

7

In cases like this, a little help to Mathematica can often go a long way. You can notice that for these functions, the integral is zero unless Abs[n-m]==1. So you only need to generate a 1D table: tab=Table[Integrate[E^-x^2 HermiteH[n-1,x] x HermiteH[n,x],{x,-\[Infinity],\[Infinity]}],{n,1,5}]; and this result can be fed to FindSequenceFunction ...

7

I could be perceived as biased since I'm the CTO of Evolved Analytics (www.evolved-analytics.com) and wrote much of the DataModeler code over the past 13 years, however, DM is probably the most efficient, complete and powerful symbolic regression platform out there for any environment. In addition to the basic model development, it supports the entire ...

6

Since we ask if the numbers $\;x_n = \cos(\frac{2n\pi}{11})\;$ are the actual roots of the polynomial : p[x_] := 64 x^7 - 112 x^5 - 8 x^4 + 56 x^3 + 8 x^2 - 7 x - 1 any numerical approach cannot be sufficient and in order to prove the statement we should proceed with a symbolic approach. Nevertheless NSolve may guarantee that all the roots could be ...

6

I get this result as well in both V8 and V9. Product[n^MoebiusMu[n], {n, 1, Infinity}] (* Out: 1/(4*Pi^2) *) It's a simple fact, though, that an infinite product can converge to a non-zero value only if the general term tends to 1. As MoebiusMu takes each of the values $\pm 1$ (as well as zero) infinitly often, this product simply can't converge. We ...

6

One trick that hasn't been pointed out yet is this: Extremizing f is equivalent to extremizing any monotonic function of f. Since your f is positive the product is too. Therefore, we can in particular choose the Log of the product as a convenient monotonic function to extremize. Then the equivalent problem is f[x_, θ_] := E^(-x + θ)/(1 + E^(-x + θ))^2; ...

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