Questions tagged [differentiation]

The process of finding a derivative.

In calculus, a branch of mathematics, the derivative is a measure of how a function changes as its input changes. Loosely speaking, a derivative can be thought of as how much one quantity is changing in response to changes in some other quantity.

The derivative of a function at a chosen input value describes the best linear approximation of the function near that input value. For a real-valued function of a single real variable, the derivative at a point equals the slope of the tangent line to the graph of the function at that point. In higher dimensions, the derivative of a function at a point is a linear transformation called the linearization.[1] A closely related notion is the differential of a function.

236 questions
16
votes
2 answers

What's the best way to calculate a numerical derivative in MATLAB?

(Note: This is intended to be a community Wiki.) Suppose I have a set of points xi = {x0,x1,x2,...xn} and corresponding function values fi = f(xi) = {f0,f1,f2,...,fn}, where f(x) is, in general, an unknown function. (In some situations, we might…
jvriesem
  • 1,859
  • 3
  • 18
  • 40
11
votes
4 answers

Detect OS with python

I was looking around trying to find a solution to my issue, the best I could find was this: from sys import platform if platform == "linux" or platform == "linux2": # linux elif platform == "darwin": # OS X elif platform ==…
Vortetty
  • 129
  • 1
  • 1
  • 11
11
votes
1 answer

What is the Difference between Selenium Webdriver and Selenium Ghostdriver?

I want to know difference between Selenium Webdriver and Selenium Ghostdriver. I am also confused as to why selenium Ghostdriver is used? Please give me a brief idea. Thanks in Advance.
Sagar007
  • 848
  • 1
  • 13
  • 33
7
votes
3 answers

What is differentiable programming?

Native support for differential programming has been added to Swift for the Swift for Tensorflow project. Julia has similar with Zygote. What exactly is differentiable programming? what does it enable? Wikipedia says the programs can be…
joel
  • 6,359
  • 2
  • 30
  • 55
7
votes
3 answers

Type-based templating function in C++

I want to write a function that fail-safe accesses std::map. At many places in my code I want to access a std::map by key, but in case the key does not exist, I want to have a kind of default value instead of an exception (which is a lot of code for…
Schubi Duah
  • 309
  • 1
  • 7
6
votes
1 answer

Automating Winmerge comparison in Python

I require an assistant with coding a comparison between two tables in python, that is currently done in winmerge. The code is as follows import pandas as pd Last week's table df1=pd.read_csv(r"C:\Users\ri0a\OneDrive - Department of Environment,…
Mihan
  • 189
  • 2
  • 15
6
votes
1 answer

non-uniform spacing with numpy.gradient

I'm not sure how to specify non-uniform spacing when using numpy.gradient. Here's some example code for y = x**2. import numpy as np import matplotlib.pyplot as plt x = [0.0, 2.0, 4.0, 8.0, 16.0] y = [0.0, 4.0, 16.0, 64.0, 256.0] dydx = [0.0, 4.0,…
Aaron
  • 85
  • 2
  • 7
6
votes
1 answer

How do I get the derivative of the function?

How do I get the derivative of the following function? g <- expression(x^2) derivg <- D(g, 'x') derivg # 2 * x g1 <- derivg(2) # Error: could not find function "derivg" I want to find the derivative at x = 2.
5
votes
3 answers

Prevent reordering in derivative output?

A recent post on the Wolfram Blog offered the following function to format derivatives in a more traditional way. pdConv[f_] := TraditionalForm[ f /. Derivative[inds__][g_][vars__] :> Apply[Defer[D[g[vars], ##]] &, Transpose[{{vars},…
telefunkenvf14
  • 1,011
  • 7
  • 19
5
votes
0 answers

How to get the first and second derivatives after interpolating with scipy.interpolate.CloughTocher2DInterpolator?

I came across this really cool demonstration of CloughTocher2DInterpolator as part of the response to this question: How to get a non-smoothing 2D spline interpolation with scipy, and am interested in getting the derivatives along the x and y axis.…
annon
  • 63
  • 4
5
votes
1 answer

How do I find the non differentiable operation in my layer?

I am trying to create a rather complex lambda-layer with many operations in keras. After I implemented it, I got a ValueError: No gradients provided for any variable. While I am using only keras operations to transform the data, (except for a…
McLP
  • 140
  • 14
5
votes
2 answers

Implicit Differentiation Sympy

I've been doing derivatives in sympy, and I didn't know how that would syntactically be written. I tried looking it up, but none of the solutions made sense. For example, if I'm trying to differentiate x**5 + y**2 + z**4 = 8xyz by computation, how…
MANA624
  • 986
  • 4
  • 10
  • 34
5
votes
4 answers

Differential Operator usable in Matrix form, in Python module Sympy

We need two matrices of differential operators [B] and [C] such as: B = sympy.Matrix([[ D(x), D(y) ], [ D(y), D(x) ]]) C = sympy.Matrix([[ D(x), D(y) ]]) ans = B * sympy.Matrix([[x*y**2], [x**2*y]]) print…
5
votes
3 answers

OpenCV intrusion detection

For a project of mine, I'm required to process images differences with OpenCV. The goal is to detect an intrusion in a zone. To be a little more clear, here are the inputs and outputs: Inputs: An image of reference A second image from approximately…
user2039318
  • 201
  • 1
  • 3
  • 6
4
votes
3 answers

Looking for a better method to do Quaternion differentiaton

I have a quaternion (4x1) and an angular velocity vector(3x1) and I call a function to calculates the differential quaternion as explained in this web. The code looks like this: float wx = w.at(0); float wy = w.at(1); float wz =…
Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
1
2 3
15 16