# \#calculus

**URL:** https://discourse.julialang.org/tag/calculus/374.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [How to continue (vector calculus) abuse of notation in Julia?](https://discourse.julialang.org/t/how-to-continue-vector-calculus-abuse-of-notation-in-julia/135593)

<div class="topic-metadata">

**Author:** [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Replies:** 2\
**Last updated:** [February 13, 2026, 6:24pm UTC](https://discourse.julialang.org/t/how-to-continue-vector-calculus-abuse-of-notation-in-julia/135593 "2026-02-13T18:24:47Z")

</div>

Is there an idiomatic way to get the curl of a symbolic vector field using Symbolics.jl? I’m trying the following using Symbolics, LinearAlgebra @variables x y z @variables A₁(x,y,z) A₂(x,y,z) A₃(x,y,z) ∇ = \[Differentia…

---

## [A question about implementing double integral](https://discourse.julialang.org/t/a-question-about-implementing-double-integral/111914)

<div class="topic-metadata">

**Author:** [@swsw](https://discourse.julialang.org/u/swsw)\
**Replies:** 3\
**Last updated:** [March 22, 2024, 3:59am UTC](https://discourse.julialang.org/t/a-question-about-implementing-double-integral/111914 "2024-03-22T03:59:37Z")

</div>

I’d like to calculate the following double integral Integrate\[exp(-x)Integrate\[exp(-y),{y,0,x}\],{x,0,∞}\] I try the following in julia but i think i probably get it wrong. using QuadGK inner\_function(y) = exp(-y) …

---

## [How to compute integral of multivariate normal with bounds defined by lines](https://discourse.julialang.org/t/how-to-compute-integral-of-multivariate-normal-with-bounds-defined-by-lines/104160)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 13\
**Last updated:** [September 25, 2023, 8:10am UTC](https://discourse.julialang.org/t/how-to-compute-integral-of-multivariate-normal-with-bounds-defined-by-lines/104160 "2023-09-25T08:10:16Z")

</div>

Hi all, I would like to use Distributions.jl and HCubature.jl (or suitable alternative) to compute an integral over part of the domain of a multivariate normal distribution. The image below provides an example. In the i…

---

## [Definition of an integral function whose argument is the upper limit of integration](https://discourse.julialang.org/t/definition-of-an-integral-function-whose-argument-is-the-upper-limit-of-integration/103946)

<div class="topic-metadata">

**Author:** [@aburousan](https://discourse.julialang.org/u/aburousan)\
**Replies:** 2\
**Last updated:** [September 18, 2023, 2:01pm UTC](https://discourse.julialang.org/t/definition-of-an-integral-function-whose-argument-is-the-upper-limit-of-integration/103946 "2023-09-18T14:01:55Z")

</div>

Hi, I want to define a function let’s say, $$ f(x) = \\int\_0^x u^2 du /(e^{u^2+16} +1)^{\\frac{3/2}}$$ How can I do this?, A naive approach is to use a loop and just each time calculate the whole thing. But is there any…

---

## [Gradient vector of a matrix of geographical extent](https://discourse.julialang.org/t/gradient-vector-of-a-matrix-of-geographical-extent/87318)

<div class="topic-metadata">

**Author:** [@ManuelFossa](https://discourse.julialang.org/u/ManuelFossa)\
**Replies:** 3\
**Last updated:** [September 19, 2022, 12:48pm UTC](https://discourse.julialang.org/t/gradient-vector-of-a-matrix-of-geographical-extent/87318 "2022-09-19T12:48:24Z")

</div>

I have a geographical matrix M of dimensions nLat=181 and nLon=221 , with lats = 30:0.25:90 and lons=-30:0.25:25. I want to compute the gradient vector of M w.r.t to lats , lons. I have tried ForwardDiff , Iterations …

---

## [Calculating Jacobian from two matrices](https://discourse.julialang.org/t/calculating-jacobian-from-two-matrices/78966)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 4\
**Last updated:** [April 5, 2022, 10:48am UTC](https://discourse.julialang.org/t/calculating-jacobian-from-two-matrices/78966 "2022-04-05T10:48:09Z")

</div>

Hi everyone, I would like to compute a Jacobian for one of my problem for a PDE, but I don’t have a function linking the unknown to my function. So I only have 2 matrices, 1 with the values of the function and 1 with th…

---

## [Plot integrals](https://discourse.julialang.org/t/plot-integrals/54087)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 6\
**Last updated:** [January 27, 2021, 11:27pm UTC](https://discourse.julialang.org/t/plot-integrals/54087 "2021-01-27T23:27:53Z")

</div>

I can plot derivatives using ForwardDiff and Plots using ForwardDiff using Plots f(x)=x^2 df(x)=ForwardDiff.derivative(f(x), x) plot(df) but QuadGK.jl gives two answers so this method won’t work. Is there a way to pl…

---

## [How to debug ODE](https://discourse.julialang.org/t/how-to-debug-ode/50576)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 14\
**Last updated:** [December 10, 2020, 6:59am UTC](https://discourse.julialang.org/t/how-to-debug-ode/50576 "2020-12-10T06:59:22Z")

</div>

Hello, I have a set of ODEs to model a bacterial infection: function kinInfect!(du, u, p, t) μ , φ, η, β, ω, χ, ε = p H = h = 0 #= du\[1\] = susceptible du\[2\] = infected du\[3\] = phages μ…

---

## [Not sure how to generate ForwardDiff function](https://discourse.julialang.org/t/not-sure-how-to-generate-forwarddiff-function/51030)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 1\
**Last updated:** [December 1, 2020, 6:01am UTC](https://discourse.julialang.org/t/not-sure-how-to-generate-forwarddiff-function/51030 "2020-12-01T06:01:21Z")

</div>

I try to run this, but it says there is a format problem, I think with line 3 (fp(x)) using ForwardDiff f(x)=x^6-2 fp(x) = x-\>ForwardDiff.derivative(f, x) x=1.5 x=x-(f(x)/fp(x))

---

## [Using NL solver to find zeros](https://discourse.julialang.org/t/using-nl-solver-to-find-zeros/50323)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 9\
**Last updated:** [November 20, 2020, 5:17pm UTC](https://discourse.julialang.org/t/using-nl-solver-to-find-zeros/50323 "2020-11-20T17:17:51Z")

</div>

I was using Roots.jl for this sort of problem, and wanted to use ModelingTookit.jl or NLsolver.jl (the former uses the later). using ModelingToolkit ∂xf(x)=(2 \* x) \* inv(2 \* sqrt(3 + (x ^ 2))) nl\_f = @eval eval(∂xf\[.01\]…

---

## [Hello. May someone explain me this expression? N = Int(1e3)](https://discourse.julialang.org/t/hello-may-someone-explain-me-this-expression-n-int-1e3/50520)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 4\
**Last updated:** [November 21, 2020, 12:51am UTC](https://discourse.julialang.org/t/hello-may-someone-explain-me-this-expression-n-int-1e3/50520 "2020-11-21T00:51:55Z")

</div>

I tryed reproduce this using 1\\euler3 unicode, without success. May someone help me to understand this expression?

---

## [Substituting state and parameter values in jacobian of DifferentialEquations.jl system using ModelingToolkit](https://discourse.julialang.org/t/substituting-state-and-parameter-values-in-jacobian-of-differentialequations-jl-system-using-modelingtoolkit/50264)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 2\
**Last updated:** [November 17, 2020, 11:48pm UTC](https://discourse.julialang.org/t/substituting-state-and-parameter-values-in-jacobian-of-differentialequations-jl-system-using-modelingtoolkit/50264 "2020-11-17T23:48:31Z")

</div>

So I would like to explicitly evaluate the R\_0 of an epidemiological model written in DifferentialEquations.jl using ModelingToolkit.jl. Here is a simple SIRD model: using DifferentialEquations, ModelingToolkit # Mode…

---

## [Error doing Implicit Derivatives in ModelToolkit I think it's trying to divide by 0](https://discourse.julialang.org/t/error-doing-implicit-derivatives-in-modeltoolkit-i-think-its-trying-to-divide-by-0/50240)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 2\
**Last updated:** [November 16, 2020, 7:22pm UTC](https://discourse.julialang.org/t/error-doing-implicit-derivatives-in-modeltoolkit-i-think-its-trying-to-divide-by-0/50240 "2020-11-16T19:22:40Z")

</div>

when I try to run let ex = Differential(x)(f(x, y)) func\_ex = build\_function(expand\_derivatives(ex), x, y) @eval ∂xf(x, y) = ($func\_ex)(x,y) end I get an error ERROR: type Int64 has no fi…

---

## [Plotting Implicit Functions using ImplicitEquations.jl](https://discourse.julialang.org/t/plotting-implicit-functions-using-implicitequations-jl/49708)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 28\
**Last updated:** [November 11, 2020, 2:44am UTC](https://discourse.julialang.org/t/plotting-implicit-functions-using-implicitequations-jl/49708 "2020-11-11T02:44:31Z")

</div>

I’m trying to plot an implicit function using Plots, ImplicitEquations f(x,y)= sqrt((x^2+144)+(y^2+144)) and I get ERROR: Cannot convert Num to series data for plotting perhaps it’s because I have x and y as symbols …

---

## [Package for limits](https://discourse.julialang.org/t/package-for-limits/49286)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 23\
**Last updated:** [October 31, 2020, 9:37pm UTC](https://discourse.julialang.org/t/package-for-limits/49286 "2020-10-31T21:37:36Z")

</div>

What is a package that can be used to find the limit of a function? I thought ForwardDiff.jl might have this feature but I couldn’t find it in the documentation.

---

## [Visualizing Jacobians/Gradients(?) - How's this?](https://discourse.julialang.org/t/visualizing-jacobians-gradients-hows-this/36799)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 3\
**Last updated:** [April 29, 2020, 7:22pm UTC](https://discourse.julialang.org/t/visualizing-jacobians-gradients-hows-this/36799 "2020-04-29T19:22:08Z")

</div>

I’ve been studying calculus and in the online course I’m following, the instructor says (in relation to a plot of a particular function): the Jacobian is simply a vector that we can calculate for each location on this …
