# How to use partial derivate in my code?

**URL:** https://discourse.julialang.org/t/how-to-use-partial-derivate-in-my-code/134176
**Category:** General Usage
**Tags:** question
**Created:** [November 28, 2025, 2:10am UTC](https://discourse.julialang.org/t/how-to-use-partial-derivate-in-my-code/134176 "2025-11-28T02:10:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mr.Fool](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Mr.Fool](https://discourse.julialang.org/u/Mr.Fool)
#### Post date: [November 28, 2025, 2:10am UTC](https://discourse.julialang.org/t/how-to-use-partial-derivate-in-my-code/134176/1 "2025-11-28T02:10:45Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/e/0/e03008942e941d486a57439561f8cf369ceb9cdd.png)  
I want to use the partial marked red in the figure to write my own code. The code I want to write is like figure below.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/8/28634a87b7ab3eb1f4a3af20ecfad326ddf93458.png)  
But an error occurred.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/2/c292aab4a412d240d935999e005da8e79f3b1871.png)  
How can I achieve my code? Thank you for your answer.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [November 28, 2025, 2:41am UTC](https://discourse.julialang.org/t/how-to-use-partial-derivate-in-my-code/134176/2 "2025-11-28T02:41:20Z")

</div>

Welcome to the Julia forum!

Two remarks:

1. Please do share code as text enclosed in triple backticks like ``` and not as screenshots.
2. Please share a complete example, including the using statements and example input data.

This makes it much easier for others to reproduce your problem.

Also helpful: the output of:

```julia-auto
versioninfo()

```

---

<div class="post-metadata">

### Author: ![WalterMadelim](https://avatars.discourse-cdn.com/v4/letter/w/3e96dc/32.png) [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)
#### Post date: [November 28, 2025, 3:12am UTC](https://discourse.julialang.org/t/how-to-use-partial-derivate-in-my-code/134176/3 "2025-11-28T03:12:37Z")

</div>

The main issue here is

```julia-auto
julia> ∂
ERROR: UndefVarError: `∂` not defined in `Main`
Suggestion: check for spelling errors or missing imports.

```

So you need to figure out where is the API `∂` from.

> [@Mr.Fool](#):
>
> The code I want to write is like figure below.

If you want to imitate some standard reference, you need to have a better understanding of it. (I have no idea where is the simplified-Chinese-Annotated code snippet from. It appears to be not self-contained.)

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [November 28, 2025, 4:47am UTC](https://discourse.julialang.org/t/how-to-use-partial-derivate-in-my-code/134176/4 "2025-11-28T04:47:01Z")

</div>

> [@Mr.Fool](#):
>
> I want to use the partial marked red in the figure to write my own code.

If you just want to know how to _type_ it, the REPL help tells you:

```julia-auto
help?> ∂
"∂" can be typed by \partial<tab>

```

This kind of tab completion is supported in the REPL and can also be configured in most modern editors.

But by default, `∂` doesn’t have any definition in Julia, and is just another possible identifier, like `x` or `f`. It is up to you to assign a meaning to it.
