## Simplifying expressions: simplify \$ w ^ {3n}, w ^ {6n}, w ^ {3 + 3n}, w ^ {4 + 3n} \$, etc. using \$ w ^ 3 = 1 \$

I have an expression that contains terms that are powers of $$w$$. How can I simplify these terms using the assumption? $$w ^ 3 = 1$$?

``````Simplify[expr, w^3==1 && n ∈ PositiveIntegers]
``````

it does not work for terms that have a symbolic variable, for example, $$n$$, in the exponent.

EDIT:
Example expression:

``````(-a * w ^ 3 + b * (n + 1) * w ^ 6 + 9 * w ^ (3 + 3 * n) * Sum[d[i], {i, 1, n}]^ 2 - w ^ (3 + 6 * n) * Sum[c[i], {i, 1, n}]) / (s ^ 2 * w ^ (4 + 3 * n))
``````

## Simplifying expressions: How to express a function in terms of a new variable?

I have

``````In[57]: = g[a_, x_, y_] =
Simplify[Limit[f4
Sqrt[-1]*Simplify[Limit[f5
3 + 3 a + a^2) + (I (1 + a x + 2 a y + a^2 y))/(
3 + 3 a + a^2), (x | y) [Element] Realities && a> 0]
``````

Now I want to express the `Sun[t,z]` in terms of a new variable

``````z = x + Sqrt[-1] Y;
``````

I was looking for an expression like this

## Translate java code into expressions / mathematical formulas

I would like to convert my Java code into expressions / mathematical formulas and algorithmic pseudo codes, as well as in research work in computer science. Is there a tool that does it (for example, Eclipse Plugins)?

Thank you

## simplifying expressions – Calculate defined sums of rational functions

I'm trying to calculate a pretty complicated sum, $$S_n$$, which in the end satisfies the relationship. $$(S_n + T_n) m ^ 3 = ( frac {(n + 1) ^ 2 – 1} {n + 1}) m ^ 3$$. I should keep in mind that $$T_n$$ It is also unknown. There are many intermediate sums in this calculation, for example:

``````summand = ((3 + i + 8 j + 4 j ^ 2 - m) (-2 + 2 j - n) (5 i + 8 i j + 2 i j ^ 2 -
5 m - 8 j m - 2 j ^ 2 m - i n - i j n + m n + j m n)) / (4 (1 + 2 j) ^ 2 (3 + 2 j) ^ 2)
``````
``````Sum[summand, {j, r, n/2-3,2}, Assumptions-> Mod[n,4]== 0 && Mod[r,2]== 1]// FullSimplify
``````

The output is a collection of PolyGamma functions:

``````- (1/512) (i - m) (-32 - 32 n + 24 n ^ 2 - 64 n r + 32 r ^ 2 +
8 (9 - 3 m - n (2 m + n) + i (3 + 2 n)) PolyGamma[0,
1/4 (-1 + n)] -
8 (5 i - 5 (5 + m) + 2 i n - 2 m n + n ^ 2) PolyGamma[0, (1 + n)/
4] + 8 (-9 - 3 i + 3 m - 2 i n + 2 m n + n ^ 2) PolyGamma[0,
1/4 + r/2] +
8 (5 i - 5 (5 + m) + 2 i n - 2 m n + n ^ 2) PolyGamma[0,
3/4 + r/2] + (i - m) (-9 + n ^ 2) PolyGamma[1,
1/4 (-1 + n)] + (-i + m) (-25 + n ^ 2) PolyGamma[1, (1 + n)/
4] + (-i + m) (-9 + n ^ 2) PolyGamma[1,
1/4 + r/2] + (i - m) (-25 + n ^ 2) PolyGamma[1, 3/4 + r/2])
``````

Unfortunately there are many of these sums on the way to computing $$S_n$$ and, finally, tracking the PolyGamma term collection becomes too difficult for Mathematica to handle and computing stops.

I am curious about the possibility that there are other methods to evaluate definite sums of rational functions like mine that can produce cleaner results. I've been looking at some of the software libraries that use the Gosper algorithm and the telescopic creative libraries described here, https://www3.risc.jku.at/research/combinat/software/ergosum/RISC/fastZeil.html, but until now It has not been possible to produce a solution in a closed form.

I would expect a rational expression of closed form exists for $$S_n$$ Based on the previous relationship, then, is there a way to find a rational expression for these intermediate sums?

## Make a function of a list of expressions.

I have a family of functions, each of which takes a long time to build the expression. However, once the functional form is determined, the calculations are very fast. So I want to build a function table programmatically. Something like:

``````exprList = Table[buildExpr[a, b, x], {a, 1, 5}, {b, 1, 100}]exprFunc[a_, b_, x_] : = Evaluate[exprList[[a, b]]]
``````

However, the above throws a part error, saying that I can not use `a` Y `second` partly in a function. I have tried several other things from related questions on the Internet, but I have not had any luck yet.

## simplifying expressions – On simplification of polynomials in several variables

Let us consider a polynomial

``````expr = Expand[(x - 2*y + 1)^9 - x*(x + y)^8];
``````

Mathematica does her best, simplifying it by

``````FullSimplify[expr]
``````

$$x ^ 8 (9-26 y) +4 x ^ 7 (y (29 y-36) +9) -28 x ^ 6 (2 y (y (13 y-18) +9) -3) + 14 x ^ 5 (y (y (y (139 y-288) +216) -72) +9) -14 x ^ 4 (2 y (2 y (y (y (73 y-180) +180) – 90) +45) -9) +28 x ^ 3 (y (y (y (y (y (191 y-576) +720) -480) +180) -36) +3) -4 x ^ 2 ( 2 y (y (y (y (y (y (577 y-2016) +3024) -2520) +1260) -378) +63) -9) + x (y (y (y (47 y-96) +72) -24) +3) (y (y (y (49 y-96) +72) -24) +3) – (2 y-1) ^ 9$$

Are there general algorithms to reduce the above to $$(x – 2y + 1) ^ 9 – x (x + y) ^ 8$$?

## schema.org – interpretation of regular expressions for additional properties of a json

The syntax highlighting begins to show its error. You are missing an appointment after `rope` for you `First name` property:

``````name ": {" type ":" string},
``````

You also do the same after `lastname & # 39 ;:

``````"lastname": {"type": "string}
``````

And your regex is missing an initial appointment:

``````"pattern": ^ (string | (a | b (\ \<[a-z]|(-?d+)\)\$,[09]\>))) "
``````

It also has an invalid regular expression, since it is an additional parenthesis and needs an additional bar before ` d +`:

``````^ (string | (a | b (\ \<[a-z]|(-?\d+)\)\$,[09]\>))
``````

And finally also have an extra lock. `}`

``````{
"type": "object",
"properties": {
"First name": {
"type": "chain"
}
"surname": {
"type": "chain"
}
}
"necessary": ["firstname", "lastname"],
"kind": ["integer", "number", "null",
"boolean", "object", "array"
],
"pattern": "^ (string | (a | b (\ \<[a-z]|(-?\d+)\)\$,[09]\>)) "
}
}
``````

Much of this, the regular expression being the only exception, was easily solved by basic problem solving. The first thing you should do is format your code, in this case your JSON string. It is easier to read and then detect errors. Take your time and review your work. You will go faster but you will move more slowly.

## Split a text with regular expressions in Java

I need to get a split text with regular expressions in Java (the length of each substring minus and about 10 characters (including space and special) and no words would be split). For example, "James has gone out to eat." it would be "James ha", "it came out", "for a meal", ".

## simplifying expressions – a simple question about trigonometric functions simplifies

There is a trigonometric function: `Cos[m x]^ 2 Cos[n y]^ 2 sin[m x] Sin[n y]`

I want to transform it to the following form:

`1/16 sin[m x] Sin[n y] + 1/16 Sin[3 m x] Sin[n y] + 1/16 Sin[m x] Sin[3 n y] + 1/16 Sin[3 m x] Sin[3 n y]`

This is what I do:

`In: = Cos[m x]^ 2 sin[m x] // TrigReduce Out: = 1/4 (Without[m x] + Sin[3 m x])`

`In: = Cos[n y]^ 2 sin[n y] // TrigReduce Out: = 1/4 (Without[n y] + Sin[3 n y])`

`In: = 1/4 (sin[m x] + Sin[3 m x]) 1/4 (sin[n y] + Sin[3 n y]) // Expand`

`Out: = 1/16 Sin[m x] Sin[n y] + 1/16 Sin[3 m x] Sin[n y] + 1/16 Sin[m x] Sin[3 n y] + 1/16 Sin[3 m x] Sin[3 n y]`

I have a number of similar trigonometric functions to do the same transformation. So I want to ask if there is any operation that can get the final result in one step.

## Manipulation of expressions – Collection of the derivatives of a sum.

I have an expression where there are many terms that involve the sum of the derivatives of two functions as

$$qquad G ^ {{n}}[lambda]+ q ^ {(n, 0)}[0,lambda]$$

I wanted to use `Collect` to group all these terms, but it seems that I'm missing something. I tried to write a simple example for the second derivatives, but it is not working.

For example:

``````Collect[
Expand[
(1/4)(-Derivative[2][G][λ]    - Derivative[2, 0][q][0, -λ])],
{RE[G[z], {z, 2}]/. z -> λ} + D[q[z, -λ], {z, 2}]/. z -> 0]
``````

I hoped to be

$$qquad – frac {1} {4} left (G & # 39; & # 39; ( lambda) + q ^ {(2,0)} (0, – lambda) right)$$

but instead they give me

$$qquad – frac {1} {4} G & # 39; & # 39; ( lambda) – frac {1} {4} q ^ {(2,0)} (0, – lambda)$$.