Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [calculus]

Calculus is the study of change of one or more variables with respect to another variable. Calculus has two main operators: differentiation and integration. Differentiation can be used to study the change of one variable with respect to another. Integration can be used to find the area bounded by a function.

0 votes
0 answers
53 views

What is causing these mathematical inaccuracies in my code? [duplicate]

After learning that the function representing the velocity of an object with respect to time is the derivative of the function representing the position of the object with respect to time, I made this ...
JoeTheGreatest616's user avatar
0 votes
0 answers
11 views

How to prove expected residual time formula

Can anyone help me to show that for a general random variable X with a fixed distribution to model the time interval between the independent events. The expected residual time, which is the time one ...
Pique's user avatar
  • 11
1 vote
2 answers
76 views

How to calculate the Area of a sin wave with intersections

I want to generate a sine wave from 2 data points, tmin and tmax. where tmin is where the sin wave starts, and the tmax is the top most point of the sine wave. Then I want to find where tbase and ...
X3R0's user avatar
  • 6,134
1 vote
2 answers
145 views

Integrations for Two Body Problem in python

I am trying to create as the first stage of a larger project goal a two body Sim in python with pygame to display on screen the objects. My main problem at the moment is that the orbiting satellite is ...
Nzjeux's user avatar
  • 23
0 votes
0 answers
29 views

Why is the matrix transposed when calculating the gradient in a multiple linear regression?

I am taking an online machine learning course and when talking about multivariable linear regression they used the following function to calculate the gradient: def gradient(X, Y, w): return 2 * np....
Gabriel Marinho's user avatar
2 votes
1 answer
53 views

Getting a function to call an equation

I am creating a function to create an approximate solution for differential equations using Euler's method. I can get the code to work, but ran into trouble when trying to convert this into a ...
Botanical Amy's user avatar
0 votes
1 answer
59 views

SymPy - Can't calculate derivative wrt expression, is there an alternative for intermediate expressions?

I am going through Andrej Karpathy's video "The spelled-out intro to neural networks and backpropagation: building micrograd", and in the "manual backpropagation example #1: simple ...
Erik Paulson's user avatar
0 votes
1 answer
29 views

Is this solvable using sympy? - no output after 1 day

The original question: My approach: The electric field is already given in the textbook as \begin{equation} E(x, y, z) = \frac{q}{4\pi\epsilon_0} \left[ \frac{\hat{x}x + \hat{y}y + \hat{z}(z - z_0)...
Joy Jin's user avatar
  • 111
1 vote
1 answer
98 views

How to calculate correct normals on a deformed plane with fractal brownian motion

Using OpenGL, I am vertically displacing vertices in a flat horizontal plane by the function to simulate water waves. I then calculate the normal vectors to each vertex by using the partial ...
William Redding's user avatar
0 votes
2 answers
61 views

Float overflow in scipy quadrature

I am trying to calculate the following function: For every point x I need to evaluate the integral numerically since it can't be solved analytically. (At least sympy and WolframAlpha can't do it) I ...
Raphael's user avatar
  • 1,123
0 votes
1 answer
196 views

Why not Back propagate through time in LSTM , similar to RNN [closed]

I'm trying to implement RNN and LSTM , many-to-many architecture. I reasoned myself why BPTT is necessary in RNNs and it makes sense. But what doesn't make sense to me is, most of resources I went ...
Amith Adiraju's user avatar
0 votes
0 answers
74 views

Why is my code returning all zeros for one of my arrays?

I am trying to write a code in matlab that will help me figure out the value of a variable in an equation. It is much too difficult to isolate that variable and solve for it, so I decided to try and ...
jt5172's user avatar
  • 11
0 votes
0 answers
82 views

How can I solve my 1D finite volume heat transfer problem using the Crank-Nicolson method?

I was hoping to get some help solving the heat transfer equation using the Crank-Nicolson method. I have my heat transfer equation in linear form: Equation 1 \frac{\partial T}{dt}=\omega \left ( A\...
Robin Hartley's user avatar
0 votes
1 answer
75 views

Can't find out how to compute derivative

Yo, guys, I got a question, is there any way to improve this or maybe better way to calculate it? Because the only way to calculate derivative very accurate I can think of is this.. lol, its just ...
frogl8's user avatar
  • 19
1 vote
3 answers
121 views

How to numerically approximate solutions to a set of two second order two-variable PDEs using a python script (boundary value problem)?

I have a set of two PDEs like so (pseudo-code): r'' = (s')^2 * r - G*M*r^-2 r' = -(r*s'')/(2*s') s and r are functions of time, ' the derivative, G and M are constants. They were obtained from the ...
AtomProgrammer's user avatar

15 30 50 per page
1
2 3 4 5
40