  C RUBY-ON-RAILS MYSQL ASP.NET DEVELOPMENT RUBY .NET LINUX SQL-SERVER REGEX WINDOWS ALGORITHM ECLIPSE VISUAL-STUDIO STRING SVN PERFORMANCE APACHE-FLEX UNIT-TESTING SECURITY LINQ UNIX MATH EMAIL OOP LANGUAGE-AGNOSTIC VB6 MSBUILD # Derivative of a program

## Derivative of a program Tag : development , By : marocchino Date : January 10 2021, 01:47 PM Boards Message : You Must Login Or Sign Up to Add Your Comments .

## How to design mathematical program which calculate the derivative of a function using python?

Tag : python , By : WellBeing
Date : March 29 2020, 07:55 AM
Does that help If I want to create a program which calculate the derivative of functions. , Taking a function is easy... it's just like any other argument.
``````def example(somefunc):
somefunc()

example(someFunction)
example(lambda x: x ** 2)
``````
``````def example2():
return lambda x: x + 1
``````
``````def example3():
def rf(x):
return x + 2
return rf

myfunc = example3()
myfunc(2) #returns 4
``````

## How do I get the nth derivative in my scheme program?

Tag : function , By : Arnaud Goudsmit
Date : March 29 2020, 07:55 AM
With these it helps Your h of .00000000000001 is too small; so small that you are running into rounding errors. Here is a result with another h
``````(define der-of-cube-n (der-n cube 0.0001 2))
> (der-of-cube-n 5)
30.000597917023697
``````
``````> (define der-of-cube-n (der-n cube (/ 10000000000000) 2))
> (der-of-cube-n 5)
150000000000003/5000000000000
> (rationalize (der-of-cube-n 5) 0.01)
3e1
``````

## Program that finds y, derivative, and integral vals of a polynomial (UPDATED)

Tag : c , By : Marcos de Carvalho
Date : March 29 2020, 07:55 AM
hop of those help? I saw some problem with your code:
1> Your derivation function is not correct. should be 2*a*x + b
``````#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void explain();
void math(double a, double b, double c, double x, double xi, double *fx, double *fD, double *A);

int main()
{
double a, b, c;
double xi, xf, xc, x = 0;
double fx = 0, fD = 0, A = 0;

printf("SECOND DEGREE POLYNOMIAL CALCULATOR\n\n");
explain();

printf("\n\nEnter a value for a: ");
scanf("%lg", &a);
printf("Enter a value for b: ");
scanf("%lg", &b);
printf("Enter a value for c: ");
scanf("%lg", &c);

printf("\nYour function is %lgx^2%+-lgx%+-lg", a, b, c);

scanf("%lg", &xi);
scanf("%lg", &xf);
printf("Enter what you would like to increment by: ");
scanf("%lg", &xc);

printf("|   x   |   f(x)   |   f'(x)   |   A   |\n"); //printing table
printf("----------------------------------------\n");

x = xi;
double nextX;
while (x <= xf) {
nextX = x + xc;
math(a, b, c, x, nextX, &fx, &fD, &A);
printf("| %.3lf | %.3lf | %.3lf | %.3lf |\n", x, fx, fD, A);
x = x + xc;
}

return 0;
}
void explain() {
printf("This program computes the integral and derivative of a user inputted second-degree polynomial (f(x)=ax^2+bx+c).\n");
printf("You will be asked to enter the 3 coefficients of your polynomial, followed by your initial x-value, your\n");
printf("final x-value, and the increment value between each x.");
}
void math(double a, double b, double c, double x, double xi, double *fx, double *fD, double *A) {
*fx = (a*(x*x)) + (b*x) + c;  //finding y values
*fD = (2 * a * x) + b;   //finding derivative values
*A = ((a / 3)*pow(x, 3) + (a / 2)*pow(x, 2) + c * x) - ((a / 3)*pow(xi, 3) + (a / 2)*pow(xi, 2) + c * xi);  //finding integral values

return;
}
``````

## Derivative of function of vector-functions based on derivative of vectors in sympy

Tag : python , By : Matt Croydon
Date : March 29 2020, 07:55 AM
seems to work fine I want to calculate the derivative of a function of vector-functions based on derivative of vectors in Python using sympy. For example, if the function is: , The derivative can be calculated with
``````>>> from sympy.abc import t
>>> g = Function('g', commutative=False)
>>> gT = Function('gT', commutative=False)
>>> f = g(t) / sqrt(gT(t) * g(t))
>>> f.diff(t).simplify()
(-g(t)*(gT(t)*g(t))**(-1/2)*(gT(t)*Derivative(g(t), t) + Derivative(gT(t), t)*g(t))*(gT(t)*g(t))**(-1) + 2*Derivative(g(t), t)*(gT(t)*g(t))**(-1/2))/2
``````

## hello, I am trying to write a simple program in python that will calculate the derivative of a polynomial function

Tag : python , By : Amin Amini
Date : March 29 2020, 07:55 AM 