# Taylor expansion in Symbolics

**URL:** <https://discourse.julialang.org/t/taylor-expansion-in-symbolics/74309>\
**Category:** General Usage\
**Tags:** symbolics\
**Created:** [January 9, 2022, 10:18pm UTC](https://discourse.julialang.org/t/taylor-expansion-in-symbolics/74309 "2022-01-09T22:18:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Post date:** [January 10, 2022, 12:01am UTC](https://discourse.julialang.org/t/taylor-expansion-in-symbolics/74309/3 "2022-01-10T00:01:16Z")

</div>

No success.

```julia
println(SymbolicUtils.substitute(df,2))

```

`ERROR: LoadError: MethodError: no method matching haskey(::Int64, ::Num)  
Closest candidates are:  
haskey(::DataStructures.SwissDict, ::Any) at /home/briand/.julia/packages/DataStructures/ixwFs/src/swiss\_dict.jl:534

looking at the documentation, it seems to me like substitute is meant to substitute a different expression, not to evaluate an expression numerically.

FYI, i have tried using build\_function in various ways without success, thinking that I might be able to get that to return something that could be used to evaluate at a value.

edit:  
The answer is…  
` println(SymbolicUtils.substitute(df,Dict(x=>2.0)))`

My goal is to of course generate a function which is compiled in as code, but give me some time to get through the documentation 🙂

---

_[View the full topic](https://discourse.julialang.org/t/taylor-expansion-in-symbolics/74309)._
