# Derivatives of a production function

**URL:** https://discourse.julialang.org/t/derivatives-of-a-production-function/42354
**Category:** Finance and Economics
**Tags:** differentiation
**Created:** [July 1, 2020, 6:54am UTC](https://discourse.julialang.org/t/derivatives-of-a-production-function/42354 "2020-07-01T06:54:07Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [July 1, 2020, 7:04am UTC](https://discourse.julialang.org/t/derivatives-of-a-production-function/42354/2 "2020-07-01T07:04:59Z")

</div>

Zygote will not work for you the way it’s implemented now as you are mutating `L1`. ForwardDiff.jl should work well though

```julia
ForwardDiff.gradient(L2 -> F(L2, A; kwargs...), L2)

```

Note that defining `L1` like this

```julia
 L1 = similar(L2, 2)

```

will be required then

---

_[View the full topic](https://discourse.julialang.org/t/derivatives-of-a-production-function/42354)._
