Message Boards Message Boards

Issue in the Simplify[ ] function

Posted 9 years ago

I have an issue in the following equation. I just can't figure out why the equation (-a^2 + a^2y - yb^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\)\)\)\)
Attachments:
POSTED BY: Ahmed Younes
4 Replies

How would you imagine -a^2 + a^2y - yb^2 being simplified? You can't factor it...

POSTED BY: Sander Huisman
Posted 9 years ago

Thanks Sander for your reply, but could you explain why Sqrt[(-a^2+a^2y-yb^2)] can't be factored from the following expression?

(Sqrt[s^2b^2(-4* y^2a^2+4y^3a^2-a^2+a^2y-4y^3b^2+4y^2b^2-yb^2)/(-a^2+a^2y-yb^2)]Sqrt[-s^2(-a^2+a^2y-yb^2*)])

POSTED BY: Ahmed Younes
Posted 9 years ago

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))))
POSTED BY: Dana DeLouis

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])
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract