# Question:what is the better way to simplificar the equation?

## Question:what is the better way to simplificar the equation?

Maple 2023

Anteriorly, I had done a question that you answered in the forum and it basically it was about the simplification of a equation. I'm posting the print of the screen and the code because the question of today is similarly, but not completely, because there are something that make more complicate the code that I devolved.

```restart; Hi := -Delta*S1^2 - J*S1*S2; R1 := S1*exp(-beta*Hi); R1 := add(R1, S1 = [--1, 0, 1]); R2 := exp(-beta*Hi); R2 := add(R2, S1 = [-1, 0, 1]); S := R1/R2; S := convert(S, trig, {J*S2}); S := simplify(S); S := convert(S, exp, {Delta});```

`and`

In this case I had to put in evidence the therm exp(Delta beta), where I simplified the expression. Now, we have more 2 variables (+2 and -2) to substitute in the equation. The code is:

```restart; Hi := -Delta*S1^2 - J*S1*S2; R1 := S1*exp(-beta*Hi); R1 := add(R1, S1 = [-2, -1, 0, 1, 2]); R2 := exp(-beta*Hi); R2 := add(R2, S1 = [-2, -1, 0, 1, -2]); S := R1/R2; S := convert(S, trig, {J*S2}); S := simplify(S); S := convert(S, exp, {Delta});```

In the last line we had the final equation

What should I change in the code for that my exponential function continue in evidence? This is, for my expression  be

`(4*sinh(2*J*S2*beta) + 2*sinh(J*S2*beta)*exp(-3*Delta*beta))/(2*cosh(2*J*S2*beta) + 2*cosh(J*S2*beta)*exp(-3*Delta*beta) + exp(-4*Delta*beta))`

﻿