(
In order to have:
(A^2 + SQRT(y^2+3) + A·SQRT(2*SQRT(y^2+3))) · (A^2 + SQRT(y^2+3) -
A·SQRT(2*SQRT(y^2+3)))
)
(
OR:
(y^2 - i·SQRT(A^4+3)) · (y^2 + i·SQRT(A^4+3))
)
Thanks....
Anyway here is my solution
Clear[f, x, y, myfactor]
myfactor[f_, x_] := Times @@ Apply[Plus, Solve[f == 0, x], 2]
f[A_, y_] := A^4 + 3 + y^2
(myfactor[f[A, y], #1] & ) /@ Variables[f[A, y]]
{(A - (-3 - y^2)^(1/4))*(A - I*(-3 - y^2)^(1/4))*(A + I*(-3 -
y^2)^(1/4))*(A + (-3 - y^2)^(1/4)),
(-Sqrt[-3 - A^4] + y)*(Sqrt[-3 - A^4] + y)}
Regards
Dimitris
Hi,
you have to tell Mathematica what form you want.
Assume e.g. that we want the form (A^2 + a1 A + a0)(A^2 + b1 A + b0).
Then we expand, equate the coefficients of A and solve for a0,a1,b0,b1:
r1=CoefficientList[(A^2+A a1+a0)(A^2+b1 A+ b0)//Expand,A]
r2=CoefficientList[A^4+3+y^2,A]
Solve[Thread[r1==r2],{a0,a1,b0,b1}]
this gives several possible expansions.
Daniel
mySolveAlways[$Leq_, $Lvar_, $Lpar_ : {}] := Module[
{Leq = $Leq, Lvar = $Lvar, Lpar = $Lpar, ans},
{Leq, Lvar, Lpar} = If[ListQ@ #, #, {#}]& /@
{Leq, Lvar, Lpar};
ans = Solve[!Eliminate[!And @@ Leq, Lvar], Lpar];
Select[ans, FreeQ[#, Alternatives @@ Lvar]&] /;
Head@ ans =!= Solve
]
In[2]:= (A^2 + a1*A + b1)*(A^2 + a2*A + b2) /.
Last@ mySolveAlways[
A^4 + 3 + y^2 == (A^2 + a1*A + b1)*(A^2 + a2*A + b2),
A, {a1, b1, a2, b2}]
Out[2]= (A^2 - Sqrt[2]*A*(3 + y^2)^(1/4) + Sqrt[3 + y^2])*(A^2 +
Sqrt[2]*A*(3 + y^2)^(1/4) + Sqrt[3 + y^2])
Maxim Rytin
m...@inbox.ru
> How can i factor A^4 + 3 + y^2 (A,y reals) for example with
> Mathematica.....?
>
> In order to have:
> (A^2 + SQRT(y^2+3) + A·SQRT(2*SQRT(y^2+3))) · (A^2 + SQRT(y^2+3) -
> A·SQRT(2*SQRT(y^2+3)))
Seeking quadratic factors (using coercion into Series),
rs = Solve[(a^2 + a c + b)(a^2 + a e + d) == (a^4 + y^2 + 3) + O[a]^5,
{b, c, d, e}]
we simplify the result using the fact that y is real.
rs = Simplify[rs, Element[y, Reals]]
One obtains 6 solutions as three conjugate pairs. Here are the three
quadratic factorizations:
(a^2 + a c + b)(a^2 + a e + d) /. rs // Union
{
(a^2 - I Sqrt[2] a (3 + y^2)^(1/4) - Sqrt[3 + y^2])*
(a^2 + I Sqrt[2] a (3 + y^2)^(1/4) - Sqrt[3 + y^2]),
(a^2 - I Sqrt[3 + y^2]) (a^2 + I Sqrt[3 + y^2]),
(a^2 - Sqrt[2] a (3 + y^2)^(1/4) + Sqrt[3 + y^2])*
(a^2 + Sqrt[2] a (3 + y^2)^(1/4) + Sqrt[3 + y^2])
}
The last solution is the one you were looking for.
> OR:
> (y^2 - i·SQRT(A^4+3)) · (y^2 + i·SQRT(A^4+3))
You should have y not y^2 here. Seek quadratic factors of the form
Solve[(y + b) (y + c) == (a^4 + y^2 + 3) + O[y]^3, {b, c}]
Cheers,
Paul
_______________________________________________________________________
Paul Abbott Phone: 61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
(A^2 + a1*A + b1)*(A^2 + a2*A + b2) //.
{ToRules[Reduce[LogicalExpand[A^4 + 3 + y^2 == (A^2 + a1*A + b1)*(A^2
+ a2*A + b2) + O[A]^4],
{a1, a2, b1, b2}]]}
{(A^2 - Sqrt[-y^2 - 3])*(A^2 + Sqrt[-y^2 - 3]), (A^2 - Sqrt[-y^2 - 3])
*(A^2 + Sqrt[-y^2 - 3]),
(A^2 - Sqrt[2]*(y^2 + 3)^(1/4)*A + Sqrt[y^2 + 3])*(A^2 + Sqrt[2]*(y^2
+ 3)^(1/4)*A + Sqrt[y^2 + 3]),
(A^2 - I*Sqrt[2]*(y^2 + 3)^(1/4)*A - Sqrt[y^2 + 3])*(A^2 + I*Sqrt[2]*
(y^2 + 3)^(1/4)*A -
Sqrt[y^2 + 3]), (A^2 - I*Sqrt[2]*(y^2 + 3)^(1/4)*A - Sqrt[y^2 + 3])*
(A^2 + I*Sqrt[2]*(y^2 + 3)^(1/4)*A - Sqrt[y^2 + 3]),
(A^2 - Sqrt[2]*(y^2 + 3)^(1/4)*A + Sqrt[y^2 + 3])*(A^2 + Sqrt[2]*(y^2
+ 3)^(1/4)*A + Sqrt[y^2 + 3])}
ExpandAll[%]
{A^4 + y^2 + 3, A^4 + y^2 + 3, A^4 + y^2 + 3, A^4 + y^2 + 3, A^4 +
y^2 + 3, A^4 + y^2 + 3}
Andrzej Kozlowski
Tokyo, Japan
On 6 Nov 2006, at 16:52, ab_...@prontomail.com wrote:
> Along the same lines, we can define an extended SolveAlways function
> taking a third argument that specifies which parameters to solve for:
>
> mySolveAlways[$Leq_, $Lvar_, $Lpar_ : {}] := Module[
> {Leq = $Leq, Lvar = $Lvar, Lpar = $Lpar, ans},
> {Leq, Lvar, Lpar} = If[ListQ@ #, #, {#}]& /@
> {Leq, Lvar, Lpar};
> ans = Solve[!Eliminate[!And @@ Leq, Lvar], Lpar];
> Select[ans, FreeQ[#, Alternatives @@ Lvar]&] /;
> Head@ ans =!= Solve
> ]
>
> In[2]:= (A^2 + a1*A + b1)*(A^2 + a2*A + b2) /.
> Last@ mySolveAlways[
> A^4 + 3 + y^2 == (A^2 + a1*A + b1)*(A^2 + a2*A + b2),
> A, {a1, b1, a2, b2}]
>
> Out[2]= (A^2 - Sqrt[2]*A*(3 + y^2)^(1/4) + Sqrt[3 + y^2])*(A^2 +
> Sqrt[2]*A*(3 + y^2)^(1/4) + Sqrt[3 + y^2])
>
> Maxim Rytin
> m...@inbox.ru
>
> dh wrote:
In[2]:= expr = A^4 + 3 + y^2 - (A^2 + a1*A + b1)*(A^2 + a2*A + b2);
In[3]:= Lsol1 = Solve[expr + O[A]^5 == 0, {a1, b1, a2, b2}];
Lsol2 = List@ ToRules@ Reduce[expr + O[A]^5 == 0, {a1, b1, a2, b2},
Backsubstitution -> True];
Lsol3 = mySolveAlways[expr == 0, A, {a1, b1, a2, b2}];
SameQ @@ Map[Sort, {Lsol1, Lsol2, Lsol3}, 2]
Out[6]= True
I suppose the advantage of the algebraic method is that you don't have
to work out the expansion order. Also sometimes it will succeed when a
series expansion isn't possible, as with mySolveAlways[x^p == x, x]. On
the other hand, the series method is useful for working out identities
like Sin[x] == a1*E^(b1*x) + a2*E^(b2*x).
Maxim Rytin
m...@inbox.ru