## Calculate the Derivative of a polynomial in C. (with dynamic allocation)

I feel difficult to make a question of a list of the university. It is requested that a function that calculates the derivative of a polynomial be implemented. and in the case that it is an error, since it is incomplete. (The libraries are already included).

void drift (double * poly, int degree, double * out) {

``````int i;
}
/ **
(i = 0, i <degree, i ++) {
October[i] = poly[i];
} * /
``````

}

int main () {} ()

``````setlocale (LC_ALL, "Portuguese");
int i, coefficient, degree;

printf ("DIGEST THE DEGREE OF POLYNOMIUM:"); // How many coefficients does (ax ^ 4 + bx ^ 3 + cx ^ + ... + nx ^ n).
scanf ("% d", & degree);

double = poly = (double *) malloc (grade * sizeof (double)); // Assigning the "poly" vector to store the coefficients.
if (poli == NULL) {
printf ("Assignment failed!");
of exit (1);
}
printf ("DIGIT COEFFICIENTS OF POLYNOMIUM:");
(i = 0; i) < grau; i++){
scanf("%d", &poli[i]);
}
double* out = (double*) malloc(grau* sizeof(double));
if(out == NULL){
printf("Erro de Alocação2!");
exit(1);
}
deriva(poli, grau, out);

for(i = grau; i >= 0; i = 1).
printf ("% d", poly);
}
free (poly);
free (out);
``````

return 0;
}

## Calculation and analysis – Using rule with derivative.

You can give `Derivative` a `UpValues` for `a`:

``````a /: Derivative[n_, 1][a]    : = Derived[n, 0][b]
``````

So:

``````re[a[t, r], r]+ D[RE[D[RE[D[a[t, r], r], r]+ D[RE[D[RE[D[a[t, r], t], r]// TeXForm
``````

$$b ^ {(0,1)} (t, r) + b ^ ((1,0)} (t, r) + b (t, r)$$

Another possibility is:

``````Clear[a]
re[a[t, r], r]+ D[RE[D[RE[D[a[t, r], r], r]+ D[RE[D[RE[D[a[t, r], t], r]/. a-> Derivative[0,-1][b]    // TeXForm
``````

$$b ^ {(0,1)} (t, r) + b ^ ((1,0)} (t, r) + b (t, r)$$

## Differential equations – pde coupled with second order spatial derivative.

I am trying to solve a PDE system using NDsolve but the following error accents.

NDSolveValue :: femcmsd: the spatial derived order of the PDE can not
exceed two.

Equations

Qm and Q are constants.

``````                pde1 = {
re[qr[r, x, t], t]+ tq * D[RE[D[RE[D[qr[r, x, t], t], t]==
alpha * D[(1/r)*(D[r*qr[r, x, t], r]+ D[r*qx[r, x, t], X]), r]+
alpha * ta *
re[RE[D[RE[D[(1/r)*(D[r*qr[r, x, t], r]+ D[r*qx[r, x, t], X]), r], t]+
alpha * wrc * D[Te[r, x, t], r]+ alpha * wrc * ta * D[RE[D[RE[D[Te[r, x, t], t], r]};

pde2 = {
re[qx[r, x, t], t]+ tq * D[RE[D[RE[D[qx[r, x, t], t], t]==
alpha * D[(1/r)*(D[r*qr[r, x, t], r]+ D[r*qx[r, x, t], X]), X]+
alpha * ta *
re[RE[D[RE[D[(1/r)*(D[r*qr[r, x, t], r]+ D[r*qx[r, x, t], X]), X], t]+
alpha * wrc * D[Te[r, x, t], X]+ alpha * wrc * ta * D[RE[D[RE[D[Te[r, x, t], t], X]};

pde3 = {
ro * c * D[Te[r, x, t],
t]== - (1 / r) * (D[r*qr[r, x, t], r]+ D[r*qx[r, x, t], X]) +
wrc * (Tb - Te[r, x, t]) + Qm
};

sol = NDSolveValue[{pde1, pde2, pde3, BC1, BC2, BC3, BC4, BC5, IC1,
IC2, IC3, IC4, IC5, IC6},
Tea[r, x, t], {t, 0, 5}, {r, x} [Element] [CapitalOmega]];
``````

Is there any way to handle this error?

## Functional analysis. How can we make the derivative for this equation w.r.t.to time t> 0

Leave $$x en[0,L]$$ and consider the following equation,
$$varepsilon left (t right) = frac {1} {2} int_ {0} ^ {L} {({{ rho} _ {1}} {{ left | {{vari} } _ {t}} right |} ^ {2}} + {{ rho} _ {2} {{ left | {{ varphi} _ {t}} right |} ^ {2}} + {{ rho} _ {1}} {{ left | {{ omega} _ {t}} right |} ^ {2}}} + b {{ left | {{ psi} _ { x}} right |} ^ {2}} + k {{ left | {{ varphi} _ {x}} + psi + lw right |} ^ {2}} + {{k} _ { 0}} {{ left | {{ omega} _ {x}} – l varphi right |} ^ {2}} + theta _ {1} ^ {2} + theta {2} ^ {2}) dx$$

where $$varphi$$, $$psi$$ Y $$omega$$ they are functions whereas θ1 and θ2 are constants. Further, $$k_0$$,$$k$$,$$b$$ Y $${{ rho} _ {1}}, {{ rho} _ {2}}$$ with $$l = 1 / R$$ are all positive constants where $$R$$ is the radius of curvature

In this task we are interested in finding the derivative of $$varepsilon (t)$$ w.r.t on time $$t> 0$$ .
First I think I use Leibtiz's rule to make this derivative that is presented in this Leibniz integral, this leads me to something wrong and it is not similar to the result I have in this document. Page 2

$$frac {d varepsilon} {dt} = – {{ int_ {0} ^ {L} {({{ gamma} _ {1}} {{ left | {{left ({{ varphi} _ {x} + psi + l omega right)} _ {t}} right |} ^ {2}} + {{ gamma} _ {2}} {{ left | {{ psi} _ {xt}} right |} ^ {2}} + {{ gamma} _ {0}} {{ left | {{ omega} _ {xt}} – l {{ varphi} _ {t}} right |} ^ {2}} + left | {{ theta} _ {1}} _ {x} right |}} ^ {2}} + {{ left | {{ theta} 2x}} right |} ^ {2}}) dx$$
where everyone $$gamma$$They are the viscosity coefficients. How did you derive it to obtain the previous result?

## partial derivative: particle that moves along the unit circle centered on the origin of the xy plane

A particle moves along the unit circle centered on the origin of the xy plane. Find the address of $$nabla times mathbf v$$.

My intent:

I found that $$displaystyle frac { partial v_x} { partial and}> 0$$ Y $$displaystyle frac { partial v_y} { partial x} <0$$. As $$v_z equiv 0$$, its partial derivatives with respect to $$x$$ Y $$and$$ They are also zero. But how do I find the signs of $$displaystyle frac { partial v_x} { partial z}$$ Y $$displaystyle frac { partial v_y} { partial z}$$?

## Functions – Which version of DiracDelta became the derivative of HeavisideTheta of the UnitStep?

The mathematical version of my co-workers is 5.0, they use `Unit step` To derive the formula, however, I also want to use the parallel So used features of the latest version 11.3. Then I found `Unit step` In both versions it is different, the `Unit step`The derivation in 5.0 is `DiracDelta`, but not in 11.3. In version 11.3, `DiracDelta` becomes `HeavisideTheta`derivation of. I want to know, what is the first version that made the difference? I can replace `Unit step` to `HeavisdeTeta`?
Thank you!

In version 5.0

In version 11.3

## statistics – Management of negative variations in the derivative of Gaussian processes

The variance of the derivative of a Gaussian process, $$f$$, is given by (9.1):

$$Var ( frac { partial f} { partial x}) = frac { partial ^ 2 k (x, x)} { partial x ^ 2},$$

where $$k (·, ·)$$ it is both a definite-positive quantity and the covariance function of $$f$$. But when evaluating the error corresponding to $$frac { partial f} { partial x}$$, we observe that it is not necessarily positive everywhere. Therefore, it is the previous definition for $$Var ( frac { partial f} { partial x})$$ really correct? Is it valid to simply take the absolute value of this quantity when calculating the error or should this variation be handled differently?

As a simple case, if we consider a modified square exponential core centered on $$x_a$$ Y $$x_b$$, so $$k (x_i, x_j) = exp (- (x_i-x_a) ^ 2 – (x_j-x_b) ^ 2)$$. This is positive defined. But $$frac { partial k (x_i, x_j)} { partial x_i} = -2 (x_i – x_a) k (x_i, x_j)$$ Y $$frac { partial k (x_i, x_j)} { partial x_i partial x_j} = 4 (x_i – x_a) (x_j – x_b) k (x_i, x_j)$$, which can be negative. Therefore, is (9.1) itself a valid covariance function? To obtain the variance, is it appropriate to take the absolute value of the values ​​along the diagonal of the covariance matrix?

## partial derivative – Ge the canonical form of the equation

Dice $$x ^ 2u_ {xx} + 2xyu_ {xy} – 3y ^ 2u_ {yy} – 2xu_x + 4yu_y + 16x ^ 4u = 0$$
I have to find the canonical form. The determinant is the following $$D = 16x ^ 2y ^ 2$$
I considered cases when $$x$$ Y $$and$$ can be $$0$$. When calculating for the remaining case (where both $$x$$ Y $$and$$ It is not $$0$$ and the type is hyperbolic), I'm not getting its canonical form. I'm receiving this
$$(- 3y ^ 2 – 6x ^ 3y + 9x ^ 6) u _ { xi xi} + (-3y ^ 2 + frac {2y} {x} + frac {1} {x ^ 2} ) u _ {eta} + (-6y ^ 2 – 6x ^ 2 + frac {2y (1-3x ^ 4)} x) u _ { eta xi} + ( frac {-4} {x} + 4y) u_ eta + 4yu_ xi + 16x ^ 4u = 0$$
But the point is that this does not meet the requirements for the canonical form of hyperbolic type.
Any help would be appreciated.

## Find the closing and the derivative set of \$ A \$ in a certain topology.

Leave $$X =[0,1] subset mathbb {R}$$, leave $$mathscr {B}$$ Be a base for the topology. $$mathscr {T} 1$$ in $$X$$ given by $$mathscr {B} = { {0 }, {1 } } cup {(0,2 ^ {- k}) ,: , k in mathbb {Z} _ { ge0} },$$and let $$mathscr {T} 2$$ be a topology in $$X$$ given by $$mathscr {T} _ {2} = left {G subset X ,: , frac {1} {2} not in G right } cup {G subset X ,: , (0,1) subset G }.$$Yes $$A = left { left ( frac {1} {4}, frac {1} {2} right) right }$$ it is a subset of the product space $$X ^ { ast} = (X, mathscr {T} _ {1}) times (X, mathscr {T} 2)$$find the closure $$overline {A}$$, and the derived set $$A & # 39;$$ in $$X ^ { ast}$$.

Find $$A & # 39;$$, I looked at $$A = left { frac {1} {4} right } times { frac {1} {2} }$$ and using the formula for $$A & # 39;$$ in the product space as $$A & # 39; = left ( left { frac {1} {4} right } times { frac {1} {2} } right) & # 39; = left (, overline { left { frac {1} {4} right }} times { frac {1} {2} } & # 39; right) cup Left ( left { frac {1} {4} right } & # 39; times overline { { frac {1} {2} }} , right) = left ( left[frac{1}{4}1right)times{frac{1}{2}}right)cupleft(left(frac{1}{4}1right)times{frac{1}{2}}right)=left[frac{1}{4}1right)times{frac{1}{2}}[frac{1}{4}1right)times{frac{1}{2}}right)cupleft(left(frac{1}{4}1right)times{frac{1}{2}}right)=left[frac{1}{4}1right)times{frac{1}{2}}[frac{1}{4}1right)times{frac{1}{2}}right)cupleft(left(frac{1}{4}1derecha)times{frac{1}{2}}derecha)=izquierda[frac{1}{4}1right)times{frac{1}{2}}[frac{1}{4}1right)times{frac{1}{2}}right)cupleft(left(frac{1}{4}1right)times{frac{1}{2}}right)=left[frac{1}{4}1right)times{frac{1}{2}}$$

But, the solution is $$A & # 39; = left ( frac {1} {4}, 1 right) times { frac {1} {2} }$$.

Where am I wrong? Or can not you use that formula for a subset of a point in the product space?

## The derivative in inverse matrix.

I wonder how to calculate the following derivative w.r.t to the array: $$frac {d (x ^ TW ^ {- T} W ^ {- 1} x)} {dW}$$, where $$W$$ is a $$mathbb {R} ^ {d times d}$$ matrix and $$x$$ is a $$mathbb {R} ^ d$$ vector. The result must be a $$mathbb {R} ^ {d times d}$$ matrix.