ayounes2
(Ahmed Younes)
October 30, 2015, 11:54pm
1
I have an issue in the following equation. I just can’t figure out why the equation (-a^2 + a^2y - y b^2) is not getting simplified from T?
In[1]:= T=(s^3*b(-a+2*
a*y+4*b*y^2-2*b*y))/(Sqrt[s^2*b^2*(-4*
y^2*a^2+4*y^3*a^2-a^2+a^2*y-4*y^3*b^2+4*y^2*
b^2-y*b^2)/(-a^2+a^2*y-y*b^2)]*Sqrt[-s^2*(-a^2+a^2*y-y*b^2)])
Out[1]= \!\(\((b\ s\^3\ \((\(-a\) + 2\ a\
y - 2\ b\ y + 4\ b\ y\^2)\))\)/\((\@\(\(-
s\^2\)\ \((\(-a\^2\) + a\^2\ y - b\^2\ y)\)\)\ ?\((\(b\^2\
s\^2\ \((\(-a\^2\) + a\^2\ y - b\^2\ y - 4\ a\^2\ y\^2 + 4\ b\^2\ y\^2 \
+ 4\ a\^2\ y\^3 - 4\ b\^2\ y\^3)\)\)\/\(\(-
a\^2\) + a\^2\ y - b\^2\ y\))\))\)\)
In[2]:= Assuming[a>0,Assuming[ b>0 ,Assuming[ s>0 ,Assuming[ y>0,Simplify[T]]]]]
Out[2]= \!\(\(s\ \((\(-1\) + 2\ y)\)\ \((a + 2\ b\ y)\)\)\/\(\@\(\(-a\^2\)\ \((\(-1\) \
+ y)\) + b\^2\ y\)\ \@\(\(b\^2\ \((1 - 2\ y)\)\^2\ y - a\^2\ \((\(-1\) + y - \
4\ y\^2 + 4\ y\^3)\)\)\/\(\(-a\^2\)\ \((\(-1\) + y)\) + b\^2\ y\)\)\)\)
sghuisman
(Sander Huisman)
October 31, 2015, 12:15pm
2
How would you imagine -a^2 + a^2y - yb^2 being simplified? You can’t factor it…
ayounes2
(Ahmed Younes)
October 31, 2015, 6:47pm
3
Thanks Sander for your reply, but could you explain why Sqrt[(-a^2+a^2y-y b^2)] can’t be factored from the following expression?
(Sqrt[s^2b^2 (-4* y^2a^2+4 y^3a^2-a^2+a^2 y-4y^3 b^2+4y^2 b^2-yb^2)/( -a^2+a^2 y-y b^2***)]Sqrt[-s^2 (-a^2+a^2 y-y b^2 **)])
dana01
(Dana DeLouis)
October 31, 2015, 8:48pm
4
Hi. You have two Sqrt functions. The larger one is the same concept as the smaller one, and easier for posting here…
For a Real solution, the function inside a Sqrt function should be >= 0. If it’s negative, we switch to complex.
Sqrt[-s^2*(-a^2+a^2*y-y*b^2)];
equ = -s^2 (-a^2+a^2 y-b^2 y);
As you can see, the relationships may be more complex then just “assuming” a>0, etc.
Mathematica does not know which of the assumptions you need.
Reduce[equ>=0,{a,b,s,y},Reals]//FullSimplify
(a==0&&(b==0||s==0||y>=0))||(a!=0&&(Sqrt[a^2]==b||Sqrt[a^2]+b==0||s==0||(Abs[a]>b&&b+Abs[a]>0&&a^2/(a^2-b^2)>=y)||(a^2/(a^2-b^2)<=y&&(Abs[a]<b||b+Abs[a]<0))))
sghuisman
(Sander Huisman)
October 31, 2015, 8:56pm
5
I’m not sure if I understand your question. The expression -a^2+a^2y-yb^2 is not positive under the conditions you defined (a,b,s, and y >0). But if you are sure that this somehow is I would suggest you to try:
Assuming[-a^2 (-1 + y) + b^2 y > 0, Simplify[T]]
giving:
(b s^3 (-1+2 y) (a+2 b y))/(Sqrt[s^2] Sqrt[s^2 (b^2 (1-2 y)^2 y-a^2 (-1+y-4 y^2+4 y^3))] Abs[b])