# Indexing symbolic array slice does not work as expected / stays unsimplified

**URL:** https://discourse.julialang.org/t/indexing-symbolic-array-slice-does-not-work-as-expected-stays-unsimplified/119907
**Category:** General Usage
**Tags:** question, package, symbolics
**Created:** [September 26, 2024, 10:12am UTC](https://discourse.julialang.org/t/indexing-symbolic-array-slice-does-not-work-as-expected-stays-unsimplified/119907 "2024-09-26T10:12:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![r0uv3n](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/r0uv3n/32/212257_2.png) [@r0uv3n](https://discourse.julialang.org/u/r0uv3n)
#### Post date: [September 26, 2024, 10:12am UTC](https://discourse.julialang.org/t/indexing-symbolic-array-slice-does-not-work-as-expected-stays-unsimplified/119907/1 "2024-09-26T10:12:29Z")

</div>

The code

```julia-repl
julia> using Symbolics
julia> @variables x[1:5]
julia> x[2:4][1]
(x[2:4])[1]

```

seems like it should return `x[2]` instead. Am I missing something here? My use case here is that I want to do something like

```julia-repl
julia> print(x[1:2]...,1,x[4:5]...)
(x[1:2])[1](x[1:2])[2]1(x[4:5])[1](x[4:5])[2]

```

and have it instead return

```julia-repl
x[1]x[2]1x[4]x[5]

```

Is this expected behavior or a bug? In the former case, is there another way to achieve this or should I just do something like the following?

```julia-repl
julia> print([x[i] for i in 1:2]...,1,[x[i] for i in 4:5]...)

```
