New answers tagged algebraic-manipulation
1
The following routine tries to eliminate the linear terms by completing the square for arbitrary number of variables:
CenterPoly[poly_] := Module[{a, b, c, u, vars},
vars = Variables[poly];
{c, b, a} = {#[[1]], #[[2]]/2, (#[[3]] + Transpose[#[[3]]])/2} &@
Normal@CoefficientArrays[poly, vars];
u = PseudoInverse[a].b;
(#\[Transpose].a.#)[[1, ...
0
The operation of completing the square with respect to a specified variable is realized by the function CompleteTheSquare in the Manipulations set of routines from David Park's add-on Presentations (http://home.comcast.net/~djmpark/DrawGraphicsPage.html). In your example:
expr = -11 - 2 x + x^2 - 4 y + y^2 - 6 z + z^2;
<< Presentations`
...
1
fullFactor[f_, x_] := Roots[f == 0, x] /. Equal -> ((#1 - #2) &) /. Or -> Times
fullFactor[x^5 - 1, x]
(* (-1 + x) ((-1)^(1/5) + x) (-(-1)^(2/5) + x) ((-1)^(3/5) + x) (-(-1)^(4/5) + x) *)
1
This is easier to do with Map, rather than with Reduce. Like this:
eq = a == b + c + d - e;
Map[Subtract[#, b - e] &, eq]
or like this:
Map[Plus[#, -b + e] &, eq]
In both cases the result is the desired one:
a - b + e == c + d
4
Algebraically, the way to construct the inverse of a series is straightforward. The basic iterative step is to add the next degree terms and solve for the coefficients.
If we have $u = U(x, y)$, $v = V(x, y)$, then we are looking for $x = X(u, v)$, $y = Y(u, v)$ such that $u = U(X(u,v), Y(u,v))$ and $v = V(X(u,v), Y(u,v))$ identically. If the ...
3
c + d + # & /@ (Subtract @@ (a == b + c + d - e) == 0) // Reverse
a == b + c + d - e /. a == c + d + x_ -> c + d == a - x
With[{t = c + d},
Reduce[a == b + c + d - e /. t -> x, x] /. x -> t]
With[{t = c + d},
Reduce[Eliminate[a == b + c + d - e && t == x, {c, d}], x] /. x -> t]
(*c + d == a - b + e*)
(*c + d == a - b + e*)
...
1
The combination of Reduce and ReplaceAll may help:
Reduce[a == b + c + d - e /. c -> aa - d, aa] /. aa -> c + d
(* c + d == a - b + e *)
There's a defection in the solution above: it won't work correctly if the original equation contains the variable aa, of course in most cases we can avoid the duplication of name manually without much effort, but ...
1
This isn't really a full answer, but it's too long to fit in the comment box. It sounds like what you want is a Taylor series in 2D. Wikipedia gives this:
In order to apply this in your case, you would need to specify the point {a,b} about which you are expanding. Presumably your f[a,b]=0 and the first derivative terms are also zero, so you would look at ...
3
Maybe you could expand the Vin to Fourier series to "normalize" it.
For example there are three of them kind:
VinSet = {10 Cos[1000 t - π/2], 9 Cos[400 t + π/4], Cos[t + 3.45]};
coeffSet = FourierCoefficient[# /. Times[ω_?NumericQ t] :> t, t, 1] & /@ VinSet
$\left\{-5 i,\frac{9 \sqrt[4]{-1}}{2}, -0.476409-0.151771 i\right \}$
{2 Abs[#], ...
1
As for your second question, here's one way that is very similar to what we'd do by hand. Use the exponential form and then identify the phase and magnitude.
Clear[A, p, t]
Vin = 10 Exp[-Pi/2]*Exp[1000 t I];
{A, p} = Replace[Vin, A_ Exp[p_] -> {A Exp[Re[p]], Im[p]}]
A now holds the amplitude and p holds the phase. If you have the trigonometric form you ...
2
If you specify the angle as a real number (rather than an exact integer), it does not do the transformation to Sin. For instance
Vin = 10 Cos[1000 t - Pi/2.0]
and
Vin = 10 Cos[1000 t - 90.0 Degree]
both do what you ask.
Top 50 recent answers are included
