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
0
votes
2 answers

How to formulate a binary differentiation problem recursively?

I've been hitting my head against the wall for a while now... The problem asks me to formulate this differentiation rule, applied to a byte array (the source should be overwritten), recursively, starting at the end of the array (derive.length - 1)…
0
votes
1 answer

Get differential equation of derivative

I have a differential equation that looks like this: dT/dx = (1+alpha\*M1)\*(T^2)\*S(x) - 4\*(2+gamma\*M2)\*x\*T I want to differentiate this equation let's say over alpha. However, T depends on alpha. How can I get a differential equation that…
0
votes
1 answer

Solving equations using MATLAB

I got an online question which I couldn’t understand. The question is: Create a script to ask the user to create a random number using the following equation : Plot x(t) with customize the figure yellow and red color and dash line. Solve the…
Fatima_Ali
  • 194
  • 9
0
votes
1 answer

How to perform implicit derivative?

I'm going to perform some symbolic calculus for a project and I'm starting with something simple. I'm ttrying to calculate the derivative of L function in respect to variable fi, but using the following code I get the error shown. syms x(t) y(t)…
0
votes
0 answers

Numerical Differentiation in R

I'm currently trying to calculate finite differences in R using the fderiv method from the pracma library. I've developed the method to identify the Lorenz derivatives below: library(deSolve) parameters <- c(s = 10, r = 28, b = 8/3) # Lorenz…
AW27
  • 481
  • 3
  • 15
0
votes
0 answers

Problem in getting rid of false peaks in a signal

I have a PPG signal, and I'm trying to find peaks and troughs using differentiation technique. However along with peaks detection, this method also gives rise to many false peaks in the signal. The code and wave form are given below, but I want to…
0
votes
2 answers

why is 'log' object not callable?

x = Symbol ("x") f = log(x) dif1 = diff(f,x) dif2 = diff(dif1,x) dif3 = diff(dif2,x) dif4 = diff(dif3,x) dif5 = diff(dif4,x) def D11(a,h): return (f.evalf(subs={x:a+h})-f.evalf(subs={x:a}))/h + (h/2)*dif2.evalf(subs={x:a+h/2}) def D12(a,h): …
0
votes
0 answers

Calculating the "derivative" of an array in Python

I have the following problem: I have a 2D-array that looks like this: #Time in Minutes Temperature in °C: 0 15 2 16 4 16 ... I have about 12,000 datapoints, each ~2 minutes apart. I…
Nico
  • 21
  • 3
0
votes
2 answers

How to calculate differentiation with random variables(letters).(details below)

from sympy.parsing.sympy_parser import parse_expr import sympy as sp def differentiate(exp, n): parse = parse_expr(exp) diff = sp.diff(parse, 'x' , n) answer = sp.expand(diff) return answer print(differentiate("x**5 + 4*x**4 +…
0
votes
0 answers

Matrix differentiation

I am reviewing basic matrix differentiation rules and came across 2 contradicting references. Which one is correct? In both 'a' is a constant vector and hence partial and regular derivatives would need to be the same. Given that we might use…
user007
  • 540
  • 5
  • 11
0
votes
1 answer

Find difference between JSON data & update the difference

I've been stuck for hours, and I need your help. The requirement is this. Having two JSON objects, one is always the source and has all the data we need. Second JSON object does not contain all data from source The requirement: This is the source…
Elvis S.
  • 362
  • 1
  • 3
  • 13
0
votes
1 answer

How to use differentiation in a function in Sage

I am trying to create a function that take a function as input that return a tuple with the function and its derivative. In all my attempt the derivative of the function is evaluated to zero or one even if it is a symbolic function: I simplified the…
0
votes
1 answer

Computing the second derivative of interpolated data

I have a 1-D data of 100 (x,y) pairs. Let's call the array of x as data_x and the array of y as data_y. To get f(x): import numpy as np from scipy.interpolate import interp1d f = interp1d(data_x, data_y, bounds_error=False, fill_value=np.nan) To…
Kit
  • 30,365
  • 39
  • 105
  • 149
0
votes
1 answer

Hessian using finite difference approach in Python

Lets say, I have a function z = x^2 + y^2. Now, I want to implement hessian of this function z in python. Till now, I have calculated the derivative using finite-difference method as given below - def derivative(x, y, f, h):     return [(f(x + h,…
Avijit Dasgupta
  • 2,055
  • 3
  • 22
  • 36
0
votes
0 answers

Implicit differentiation in sympy function

I'm trying to perform implicit differentiation to the function Lrdot which is -2*rdot/(1 - 1/r(t)), wrt an affine parameter s, where rdot is dr/ds. The error below pops up and i'm not sure how to debug. from sympy import * from…
user11339690