- #1

- 195

- 5

Can it just be defined somehow globally that {x,y,z} are real only?

- Mathematica
- Thread starter teroenza
- Start date

- #1

- 195

- 5

Can it just be defined somehow globally that {x,y,z} are real only?

- #2

DrClaude

Mentor

- 7,540

- 3,873

Using $Assumptions should work. You will need to give a specific example if you want more help.

- #3

- 195

- 5

Code:

```
Assuming[x \[Element] Reals && y \[Element] Reals && \[Theta] \[Element] Reals,Re[(x + I y)^2 Sin[\[Theta]/2]^2]]
Simplify[Re[(x + I y)^2 Sin[\[Theta]/2]^2],Assumptions -> x \[Element] Reals && y \[Element] Reals && \[Theta] \[Element] Reals]
```

Code:

```
Re[(x + I y)^2 Sin[\[Theta]/2]^2]
Re[(x + I y)^2] Sin[\[Theta]/2]^2
```

- #4

DrClaude

Mentor

- 7,540

- 3,873

Code:

```
Assuming[x \[Element] Reals && y \[Element] Reals && \[Theta] \[Element] Reals,
Simplify[ComplexExpand[Re[(x + I y)^2 Sin[\[Theta]/2]^2]]]]
```

- Replies
- 4

- Views
- 14K

- Replies
- 6

- Views
- 6K

- Replies
- 3

- Views
- 5K

- Last Post

- Replies
- 4

- Views
- 7K

- Replies
- 1

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 5K

- Replies
- 1

- Views
- 7K

- Last Post

- Replies
- 2

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 6K

- Replies
- 8

- Views
- 3K