Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a question on simplification: Given that

    Kxx1=-((π^2 (x - x0) Cosh[π (x - x0)])/(
      2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) + (π^2 (x - 
        x0) Cosh[π (x - x0)])/(
     2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])) + (π^2 (x -
         x0) Sinh[π (x - x0)]^2)/(
     2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) - (π^2 (x - 
        x0) Sinh[π (x - x0)]^2)/(
     2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2)

    Kxy1=-((π^2 (x - x0) Cos[π (y - y0)])/(
      2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) - (π^2 (x - 
        x0) Cos[π (-1 + y + y0)])/(
     2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])) + (π^2 (x -
         x0) Sin[π (y - y0)]^2)/(
     2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) + (π^2 (x - 
        x0) Sin[π (-1 + y + y0)]^2)/(
     2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2)

But

    M1 = Collect[Kxx1 (Dxx - Dyy)/2 + Kxx1 (Dxx + Dyy)/2 + Kxy1 (Dyy - Dxx)/2 + 
       Kxy1 (Dyy + Dxx)/2, FullSimplify]

gives me the result

1/2 (-Dxx + 
    Dyy) (-((π^2 (x - x0) Cos[π (y - y0)])/(
     2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) - (π^2 (x -
        x0) Cos[π (-1 + y + y0)])/(
    2 (-Cos[π (-1 + y + y0)] + 
       Cosh[π (x - x0)])) + (π^2 (x - 
       x0) Sin[π (y - y0)]^2)/(
    2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) + (π^2 (x -
        x0) Sin[π (-1 + y + y0)]^2)/(
    2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2)) + 
 1/2 (Dxx + 
    Dyy) (-((π^2 (x - x0) Cos[π (y - y0)])/(
     2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) - (π^2 (x -
        x0) Cos[π (-1 + y + y0)])/(
    2 (-Cos[π (-1 + y + y0)] + 
       Cosh[π (x - x0)])) + (π^2 (x - 
       x0) Sin[π (y - y0)]^2)/(
    2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) + (π^2 (x -
        x0) Sin[π (-1 + y + y0)]^2)/(
    2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2)) + 
 1/2 (Dxx - 
    Dyy) (-((π^2 (x - x0) Cosh[π (x - x0)])/(
     2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) + (π^2 (x -
        x0) Cosh[π (x - x0)])/(
    2 (-Cos[π (-1 + y + y0)] + 
       Cosh[π (x - x0)])) + (π^2 (x - 
       x0) Sinh[π (x - x0)]^2)/(
    2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) - (π^2 (x -
        x0) Sinh[π (x - x0)]^2)/(
    2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2)) + 
 1/2 (Dxx + 
    Dyy) (-((π^2 (x - x0) Cosh[π (x - x0)])/(
     2 (-Cos[π (y - y0)] + Cosh[π (x - x0)]))) + (π^2 (x -
        x0) Cosh[π (x - x0)])/(
    2 (-Cos[π (-1 + y + y0)] + 
       Cosh[π (x - x0)])) + (π^2 (x - 
       x0) Sinh[π (x - x0)]^2)/(
    2 (-Cos[π (y - y0)] + Cosh[π (x - x0)])^2) - (π^2 (x -
        x0) Sinh[π (x - x0)]^2)/(
    2 (-Cos[π (-1 + y + y0)] + Cosh[π (x - x0)])^2))

But actually Dxx - Dyy == -(Dyy - Dxx) and Dxx + Dyy (in the second term of the result) == Dxx + Dyy (in the fourth term). How to further simplify the result? Is there any method to directly obtain the correct simplified result? I tried Assumptions -> {Dxx - Dyy > 0 && Dxx + Dyy > 0}, but it didn't work.

share|improve this question

closed as unclear what you're asking by Michael E2, rasher, Jens, Öskå, b.gatessucks Jul 5 at 17:42

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I think the usage you want is Collect[expr, vars, FullSimplify]. Which variables did you mean to collect? –  Michael E2 Jul 4 at 19:20
    
Yes, you are right, I forgot to declare the vars. –  Hao Wu Jul 5 at 12:10

1 Answer 1

Kxx1 = -((\[Pi]^2 (x - 
          x0) Cosh[\[Pi] (x - x0)])/(2 (-Cos[\[Pi] (y - y0)] + 
          Cosh[\[Pi] (x - x0)]))) + (\[Pi]^2 (x - 
        x0) Cosh[\[Pi] (x - x0)])/(2 (-Cos[\[Pi] (-1 + y + y0)] + 
        Cosh[\[Pi] (x - x0)])) + (\[Pi]^2 (x - 
        x0) Sinh[\[Pi] (x - x0)]^2)/(2 (-Cos[\[Pi] (y - y0)] + 
         Cosh[\[Pi] (x - x0)])^2) - (\[Pi]^2 (x - 
        x0) Sinh[\[Pi] (x - x0)]^2)/(2 (-Cos[\[Pi] (-1 + y + y0)] + 
         Cosh[\[Pi] (x - x0)])^2);

Kxy1 = -((\[Pi]^2 (x - 
          x0) Cos[\[Pi] (y - y0)])/(2 (-Cos[\[Pi] (y - y0)] + 
          Cosh[\[Pi] (x - x0)]))) - (\[Pi]^2 (x - 
        x0) Cos[\[Pi] (-1 + y + y0)])/(2 (-Cos[\[Pi] (-1 + y + y0)] + 
        Cosh[\[Pi] (x - x0)])) + (\[Pi]^2 (x - 
        x0) Sin[\[Pi] (y - y0)]^2)/(2 (-Cos[\[Pi] (y - y0)] + 
         Cosh[\[Pi] (x - x0)])^2) + (\[Pi]^2 (x - 
        x0) Sin[\[Pi] (-1 + y + 
           y0)]^2)/(2 (-Cos[\[Pi] (-1 + y + y0)] + 
         Cosh[\[Pi] (x - x0)])^2);

M1 = Collect[
  Kxx1 (Dxx - Dyy)/2 + Kxx1 (Dxx + Dyy)/2 + Kxy1 (Dyy - Dxx)/2 + 
   Kxy1 (Dyy + Dxx)/2,
  {Dxx, Dyy}, FullSimplify]

(Dxx*Pi^2*(x - x0)*Cos[Pi*y]* Cos[Pi*y0]* (Cosh[Pi*(x - x0)]* (-3 + Cos[2*Pi*y] + Cos[2*Pi*y0] + Cosh[2*Pi*(x - x0)]) + 4*Sin[Pi*y]*Sin[Pi*y0]))/ (2*(Cos[Pi*(y - y0)] - Cosh[Pi*(x - x0)])^2* (Cos[Pi*(y + y0)] + Cosh[Pi*(x - x0)])^2) + (1/2)*Dyy*Pi^2*(x - x0)* (1/(1 - Cosh[Pi*(x - x0)]* Sec[Pi*(y - y0)]) + 1/(1 + Cosh[Pi*(x - x0)]* Sec[Pi*(y + y0)]) + Sin[Pi*(y - y0)]^2/ (Cos[Pi*(y - y0)] - Cosh[Pi*(x - x0)])^2 + Sin[Pi*(y + y0)]^2/ (Cos[Pi*(y + y0)] + Cosh[Pi*(x - x0)])^2)

share|improve this answer
    
Thanks a lot :) –  Hao Wu Jul 5 at 12:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.