algebra – Simplify simple symbolic expression with KroneckerDelta

Suppose I have an expression like

A(b) B(d) KroneckerDelta(b, d + 1)

I would like to simplify this expression to get

A(d + 1) B(d)

(or vice versa). In my case, lowercase letters are integers ${0, …,infty }$.

EDIT 1: I know the two expressions seems incompatible, but the fact is that the are inside a double summations over $b,d$. I do not want to deal with this summation explicitly, I just want the expression for a single (complicated) term after summing over e.g. $n$.

symbolic – Meaning of the following output?

I got the following as an eigenvalue:

Root(-γ^4 ν^5 σ^3 - 
    4 γ^3 ν^6 σ^3 - 
    6 γ^2 ν^7 σ^3 - 
    4 γ ν^8 σ^3 - ν^9 σ^3 - 
    4 γ^4 ν^4 ξ σ^3 - 
    16 γ^3 ν^5 ξ σ^3 - 
    24 γ^2 ν^6 ξ σ^3 - 
    16 γ ν^7 ξ σ^3 - 
    4 ν^8 ξ σ^3 - 
    6 γ^4 ν^3 ξ^2 σ^3 - 
    24 γ^3 ν^4 ξ^2 σ^3 - 
    36 γ^2 ν^5 ξ^2 σ^3 - 
    24 γ ν^6 ξ^2 σ^3 - 
    6 ν^7 ξ^2 σ^3 - 
    4 γ^4 ν^2 ξ^3 σ^3 - 
    16 γ^3 ν^3 ξ^3 σ^3 - 
    24 γ^2 ν^4 ξ^3 σ^3 - 
    16 γ ν^5 ξ^3 σ^3 - 
    4 ν^6 ξ^3 σ^3 - γ^4 ν ξ^4 
σ^3 - 4 γ^3 ν^2 ξ^4 σ^3 - 
    6 γ^2 ν^3 ξ^4 σ^3 - 
    4 γ ν^4 ξ^4 σ^3 - ν^5 ξ^4 
σ^3 + β γ^3 ν^4 σ^4 - 
    4 γ^4 ν^4 σ^4 + 
    3 β γ^2 ν^5 σ^4 - 
    16 γ^3 ν^5 σ^4 + 
    3 β γ ν^6 σ^4 - 
    24 γ^2 ν^6 σ^4 + β ν^7 σ^4 - 
    16 γ ν^7 σ^4 - 4 ν^8 σ^4 + 
    4 β γ^3 ν^3 ξ σ^4 - 
    13 γ^4 ν^3 ξ σ^4 + 
    12 β γ^2 ν^4 ξ σ^4 - 
    55 γ^3 ν^4 ξ σ^4 + 
    12 β γ ν^5 ξ σ^4 - 
    87 γ^2 ν^5 ξ σ^4 + 
    4 β ν^6 ξ σ^4 - 
    61 γ ν^6 ξ σ^4 - 
    16 ν^7 ξ σ^4 + 
    6 β γ^3 ν^2 ξ^2 σ^4 - 
    15 γ^4 ν^2 ξ^2 σ^4 + 
    18 β γ^2 ν^3 ξ^2 σ^4 - 
    69 γ^3 ν^3 ξ^2 σ^4 + 
    18 β γ ν^4 ξ^2 σ^4 - 
    117 γ^2 ν^4 ξ^2 σ^4 + 
    6 β ν^5 ξ^2 σ^4 - 
    87 γ ν^5 ξ^2 σ^4 - 
    24 ν^6 ξ^2 σ^4 + 
    4 β γ^3 ν ξ^3 σ^4 - 
    7 γ^4 ν ξ^3 σ^4 + 
    12 β γ^2 ν^2 ξ^3 σ^4 - 
    37 γ^3 ν^2 ξ^3 σ^4 + 
    12 β γ ν^3 ξ^3 σ^4 - 
    69 γ^2 ν^3 ξ^3 σ^4 + 
    4 β ν^4 ξ^3 σ^4 - 
    55 γ ν^4 ξ^3 σ^4 - 
    16 ν^5 ξ^3 σ^4 + β γ^3 ξ^4 
σ^4 - γ^4 ξ^4 σ^4 + 
    3 β γ^2 ν ξ^4 σ^4 - 
    7 γ^3 ν ξ^4 σ^4 + 
    3 β γ ν^2 ξ^4 σ^4 - 
    15 γ^2 ν^2 ξ^4 σ^4 + β ν^3 
ξ^4 σ^4 - 13 γ ν^3 ξ^4 σ^4 - 
    4 ν^4 ξ^4 σ^4 + 
    3 β γ^3 ν^3 σ^5 - 
    6 γ^4 ν^3 σ^5 + 
    9 β γ^2 ν^4 σ^5 - 
    24 γ^3 ν^4 σ^5 + 
    9 β γ ν^5 σ^5 - 
    36 γ^2 ν^5 σ^5 + 3 β ν^6 σ^5 - 
    24 γ ν^6 σ^5 - 6 ν^7 σ^5 + 
    9 β γ^3 ν^2 ξ σ^5 - 
    15 γ^4 ν^2 ξ σ^5 + 
    30 β γ^2 ν^3 ξ σ^5 - 
    69 γ^3 ν^3 ξ σ^5 + 
    33 β γ ν^4 ξ σ^5 - 
    117 γ^2 ν^4 ξ σ^5 + 
    12 β ν^5 ξ σ^5 - 
    87 γ ν^5 ξ σ^5 - 
    24 ν^6 ξ σ^5 + 
    9 β γ^3 ν ξ^2 σ^5 - 
    12 γ^4 ν ξ^2 σ^5 + 
    36 β γ^2 ν^2 ξ^2 σ^5 - 
    69 γ^3 ν^2 ξ^2 σ^5 + 
    45 β γ ν^3 ξ^2 σ^5 - 
    138 γ^2 ν^3 ξ^2 σ^5 + 
    18 β ν^4 ξ^2 σ^5 - 
    117 γ ν^4 ξ^2 σ^5 - 
    36 ν^5 ξ^2 σ^5 + 
    3 β γ^3 ξ^3 σ^5 - 
    3 γ^4 ξ^3 σ^5 + 
    18 β γ^2 ν ξ^3 σ^5 - 
    27 γ^3 ν ξ^3 σ^5 + 
    27 β γ ν^2 ξ^3 σ^5 - 
    69 γ^2 ν^2 ξ^3 σ^5 + 
    12 β ν^3 ξ^3 σ^5 - 
    69 γ ν^3 ξ^3 σ^5 - 
    24 ν^4 ξ^3 σ^5 + 
    3 β γ^2 ξ^4 σ^5 - 
    3 γ^3 ξ^4 σ^5 + 
    6 β γ ν ξ^4 σ^5 - 
    12 γ^2 ν ξ^4 σ^5 + 
    3 β ν^2 ξ^4 σ^5 - 
    15 γ ν^2 ξ^4 σ^5 - 
    6 ν^3 ξ^4 σ^5 + 
    3 β γ^3 ν^2 σ^6 - 
    4 γ^4 ν^2 σ^6 + 
    9 β γ^2 ν^3 σ^6 - 
    16 γ^3 ν^3 σ^6 + 
    9 β γ ν^4 σ^6 - 
    24 γ^2 ν^4 σ^6 + 3 β ν^5 σ^6 - 
    16 γ ν^5 σ^6 - 4 ν^6 σ^6 + 
    6 β γ^3 ν ξ σ^6 - 
    7 γ^4 ν ξ σ^6 + 
    24 β γ^2 ν^2 ξ σ^6 - 
    37 γ^3 ν^2 ξ σ^6 + 
    30 β γ ν^3 ξ σ^6 - 
    69 γ^2 ν^3 ξ σ^6 + 
    12 β ν^4 ξ σ^6 - 
    55 γ ν^4 ξ σ^6 - 
    16 ν^5 ξ σ^6 + 
    3 β γ^3 ξ^2 σ^6 - 
    3 γ^4 ξ^2 σ^6 + 
    21 β γ^2 ν ξ^2 σ^6 - 
    27 γ^3 ν ξ^2 σ^6 + 
    36 β γ ν^2 ξ^2 σ^6 - 
    69 γ^2 ν^2 ξ^2 σ^6 + 
    18 β ν^3 ξ^2 σ^6 - 
    69 γ ν^3 ξ^2 σ^6 - 
    24 ν^4 ξ^2 σ^6 + 
    6 β γ^2 ξ^3 σ^6 - 
    6 γ^3 ξ^3 σ^6 + 
    18 β γ ν ξ^3 σ^6 - 
    27 γ^2 ν ξ^3 σ^6 + 
    12 β ν^2 ξ^3 σ^6 - 
    37 γ ν^2 ξ^3 σ^6 - 
    16 ν^3 ξ^3 σ^6 + 
    3 β γ ξ^4 σ^6 - 
    3 γ^2 ξ^4 σ^6 + 
    3 β ν ξ^4 σ^6 - 
    7 γ ν ξ^4 σ^6 - 
    4 ν^2 ξ^4 σ^6 + β γ^3 ν 
σ^7 - γ^4 ν σ^7 + 
    3 β γ^2 ν^2 σ^7 - 
    4 γ^3 ν^2 σ^7 + 
    3 β γ ν^3 σ^7 - 
    6 γ^2 ν^3 σ^7 + β ν^4 σ^7 - 
    4 γ ν^4 σ^7 - ν^5 σ^7 + β 
γ^3 ξ σ^7 - γ^4 ξ σ^7 + 
    6 β γ^2 ν ξ σ^7 - 
    7 γ^3 ν ξ σ^7 + 
    9 β γ ν^2 ξ σ^7 - 
    15 γ^2 ν^2 ξ σ^7 + 
    4 β ν^3 ξ σ^7 - 
    13 γ ν^3 ξ σ^7 - 
    4 ν^4 ξ σ^7 + 
    3 β γ^2 ξ^2 σ^7 - 
    3 γ^3 ξ^2 σ^7 + 
    9 β γ ν ξ^2 σ^7 - 
    12 γ^2 ν ξ^2 σ^7 + 
    6 β ν^2 ξ^2 σ^7 - 
    15 γ ν^2 ξ^2 σ^7 - 
    6 ν^3 ξ^2 σ^7 + 
    3 β γ ξ^3 σ^7 - 
    3 γ^2 ξ^3 σ^7 + 
    4 β ν ξ^3 σ^7 - 
    7 γ ν ξ^3 σ^7 - 
    4 ν^2 ξ^3 σ^7 + β ξ^4 σ^7 - 
γ ξ^4 σ^7 - ν ξ^4 σ^7 + (γ^3 
ν^2 ξ σ^2 + 3 γ^2 ν^3 ξ σ^2 + 
       3 γ ν^4 ξ σ^2 + ν^5 ξ σ^2 
+ 2 γ^3 ν ξ^2 σ^2 + 
       6 γ^2 ν^2 ξ^2 σ^2 + 
       6 γ ν^3 ξ^2 σ^2 + 
       2 ν^4 ξ^2 σ^2 + γ^3 ξ^3 σ^2 + 
       3 γ^2 ν ξ^3 σ^2 + 
       3 γ ν^2 ξ^3 σ^2 + ν^3 ξ^3 
σ^2 + β γ^2 ν^2 σ^3 + 
       3 β γ ν^3 σ^3 + 
       2 β ν^4 σ^3 + 
       2 β γ^2 ν ξ σ^3 + γ^3 ν 
ξ σ^3 + 7 β γ ν^2 ξ σ^3 + 
       4 γ^2 ν^2 ξ σ^3 + 
       5 β ν^3 ξ σ^3 + 
       6 γ ν^3 ξ σ^3 + 
       3 ν^4 ξ σ^3 + β γ^2 ξ^2 
σ^3 + γ^3 ξ^2 σ^3 + 
       5 β γ ν ξ^2 σ^3 + 
       6 γ^2 ν ξ^2 σ^3 + 
       4 β ν^2 ξ^2 σ^3 + 
       11 γ ν^2 ξ^2 σ^3 + 
       6 ν^3 ξ^2 σ^3 + β γ ξ^3 
σ^3 + 
       2 γ^2 ξ^3 σ^3 + β ν ξ^3 
σ^3 + 5 γ ν ξ^3 σ^3 + 
       3 ν^2 ξ^3 σ^3 + β γ^2 ν 
σ^4 + 4 β γ ν^2 σ^4 + 
       3 β ν^3 σ^4 + β γ^2 ξ 
σ^4 + 
       7 β γ ν ξ σ^4 + γ^2 ν 
ξ σ^4 + 7 β ν^2 ξ σ^4 + 
       4 γ ν^2 ξ σ^4 + 
       3 ν^3 ξ σ^4 + 
       3 β γ ξ^2 σ^4 + γ^2 ξ^2 
σ^4 + 5 β ν ξ^2 σ^4 + 
       6 γ ν ξ^2 σ^4 + 
       6 ν^2 ξ^2 σ^4 + β ξ^3 σ^4 + 
       2 γ ξ^3 σ^4 + 
       3 ν ξ^3 σ^4 + β γ ν σ^5 
+ β ν^2 σ^5 + β γ ξ σ^5 + 
       2 β ν ξ σ^5 + γ ν ξ 
σ^5 + ν^2 ξ σ^5 + β ξ^2 σ^5 + 
γ ξ^2 σ^5 + 
       2 ν ξ^2 σ^5 + ξ^3 σ^5) #1 + 
(γ^2 ν σ + 3 γ ν^2 σ + 
       2 ν^3 σ + γ^2 ξ σ + 
       4 γ ν ξ σ + 
       3 ν^2 ξ σ + γ ξ^2 σ + ν 
ξ^2 σ + γ^2 σ^2 + β ν σ^2 + 
       4 γ ν σ^2 + 
       3 ν^2 σ^2 + β ξ σ^2 + 
       2 γ ξ σ^2 + 
       4 ν ξ σ^2 + ξ^2 σ^2 + γ 
σ^3 + ν σ^3 + ξ σ^3) #1^2 + #1^3 &, 
  1)/(σ (γ ν + ν^2 + γ ξ + ν 
ξ + γ σ + ν σ + ξ σ))

What I don’t understand is the following:

#1 + (γ^2 ν σ + 3 γ ν^2 σ + 
       2 ν^3 σ + γ^2 ξ σ + 
       4 γ ν ξ σ + 
       3 ν^2 ξ σ + γ ξ^2 σ + ν 
ξ^2 σ + γ^2 σ^2 + β ν σ^2 + 
       4 γ ν σ^2 + 
       3 ν^2 σ^2 + β ξ σ^2 + 
       2 γ ξ σ^2 + 
       4 ν ξ σ^2 + ξ^2 σ^2 + γ 
σ^3 + ν σ^3 + ξ σ^3) #1^2 + #1^3 &, 
  1)/(σ (γ ν + ν^2 + γ ξ + ν 
ξ + γ σ + ν σ + ξ σ))

What is the meaning of the hashtags?

They didn’t appear in any other solution to other models I considered.

regionmeasure – Symbolic computation of a region boundary

Consider the three disk regions plotted here, where of course I had to set a single radius (scale) to make an actual plot:

enter image description here

But in my actual problem, the scale is not set. For instance, we can set the radius of the large green disk to be $x>0$, and without loss of generality place its center at the origin.

I’m interested in the area of the dark orange wedge, as well as the length of its perimeter.

Thus I define the regions symbolically as follows:

(ScriptCapitalR)left = Disk({0, x/2}, x/2);
(ScriptCapitalR)top = Disk({x/2, x}, x/2);
(ScriptCapitalR)big = Disk({0, 0}, x);
(ScriptCapitalR)goal = 
  RegionDifference(
   RegionIntersection((ScriptCapitalR)top, (ScriptCapitalR)big), 
(ScriptCapitalR)left);
Assuming(x > 0, RegionMeasure((ScriptCapitalR)goal))

I get the RegionMeasure (i.e., area) just as I seek… in terms of $x$:

$$frac{1}{8} x^2 left(-2+pi -tan ^{-1}left(frac{44}{117}right)right)$$

Fine.

Now I try to find its perimeter. First I define its boundary:

(ScriptCapitalR)goalBoundary = 
  Assuming(x > 0, RegionBoundary((ScriptCapitalR)goal));

Now, I try to find the length of its perimeter:

ArcLength((ScriptCapitalR)goalBoundary)

or

RegionMeasure((ScriptCapitalR)goalBoundary)

and I get no answer.

However, if I set a particular value for $x$, I get the perimeter fine:

ArcLength((ScriptCapitalR)goalBoundary) /. x -> 1

$$frac{1}{4} left(pi +2 sin ^{-1}left(frac{3}{5}right)+4 sin
^{-1}left(frac{4}{5}right)right)$$

(Of course I can plot and visualize the boundary only if I set a value for $x$, as in: RegionPlot((ScriptCapitalR)goalBoundary /. x -> 1). Again, fine.)

How do I compute the perimeter symbolically for arbitrary $x>0$?

Of course I could solve for $x to 1$ and then exploit my knowledge that the perimeter scales as $x$, but I’m looking for a more general solution (applicable to other problems) that relies on symbolic computation, not my “human understanding” of dimensional scaling.

calculus and analysis – Get derivation of symbolic matrix equations

I want to use Mathematica to infer kinematics equations (derivate position equations to speed equations).

begin{equation}
vec{c}=vec{t}_{m}+R_{b m} vec{c^{m}}
end{equation}

begin{equation}
vec{d}=vec{t}_{m}+R_{b m} vec{t_{s}}+R_{b m} R_{m s} vec{d^{s}}
end{equation}

where $R_i$ means the rotation matrix, the $vec{c^m},vec{d^s}$ are constant, and others are relative to time $t$

I want to use Mathematica to get the symbolic form of $frac{text{d}vec{c}}{text{d}t}frac{text{d}vec{d}}{text{d}t}$. The answer I get by hand is this (for convenience, I don’t write the vector hat $vec{}$ in the equations below):

$$
begin{array}{c}
v_{c}=frac{d c}{d t}=R_{b m}^top dot{t_{m}}+R_{b m}^top Sleft(w_{m}right) R_{b m} c^{m}=R_{b m}^top dot{t_{m}}+Sleft(R_{b m}^top w_{m}right) c^{m} \
=R_{b m}^top dot{t_{m}}-Sleft(c^{m}right) R_{b m}^top w_{m} \
v_{d}=frac{d d}{d t}=dot{t_{s}}+R_{b m}^top dot{t_{m}}+R_{b m}^top Sleft(w_{m}right) R_{b m} t_{s}+R_{b m}^top Sleft(w_{m}right) R_{b m} R_{m s} d^{s} \
quad+R_{b m}^top R_{b m}left(Sleft(w_{s m}right) R_{m s} d^{s}right) \
=dot{t_{s}}+R_{b m}^top dot{t_{m}}-Sleft(t_{s}right) R_{b m}^top w_{m}-Sleft(R_{m s} d^{s}right) R_{b m}^top w_{m}+left(Sleft(w_{s m}right) R_{m s} d^{s}right) \
left.=dot{t_{s}}+R_{b m}^top dot{t_{m}}-Sleft(t_{s}right)right) R_{b m}^top w_{m}-Sleft(R_{m s} d^{s}right) R_{b m}^top w_{m}-left(Sleft(R_{m s} d^{s}right) w_{s m}right)
end{array}
$$

where $S(vec{a})$ means the (antisymmetric) skew matrix form of vector $vec{a}$. How could I get the result?

By the way, what bothers me most is how could I represent a symbolic matrix with a number?

The problem source:
(1) Y. Cai, S. Zheng, W. Liu, Z. Qu和J. Han, 《Model Analysis and Modified Control Method of Ship-Mounted Stewart Platforms for Wave Compensation》, IEEE Access, 卷 9, 页 4505-4517, 2021, doi: 10.1109/ACCESS.2020.3047063.

Symbolic Computation with Summation – Mathematica Stack Exchange

With the help of the community, I have writen the following formula $a,d$ into mathematica. However I want to do symbolic computation with respect to $T,n$.

$a,d$ is defined as follows:

begin{multline*}
a=sum_{t=0}^{T-1}f_1^2(t)+11sum_{t=0}^{T-1}f_2^2(t)+\
sum_{t=0}^Tmathbb{I}(n_{t+1}>0)sum_{tau =0}^{n_{t+1}-1}g_1^2(t,tau)+11sum_{t=0}^{T}mathbb{I}(n_{t+1}>0)sum_{tau=0}^{n_{t+1}-1}g_2^2(t,tau),
end{multline*}

begin{multline*}
d=10Tcdot operatorname{logit}^2left(frac{alpha}{alpha+beta}right)+2cdot operatorname{logit}left(frac{alpha}{alpha+beta}right)cdot left(sum_{t=0}^{T-1}f_3(t)right)+\10cdot operatorname{logit}^2left(frac{alpha}{alpha+beta}right)cdot left(sum_{t=0}^{T}n_{t+1}right) +2cdot operatorname{logit}left(frac{alpha}{alpha+beta}right)cdot left(sum_{t=0}^{T}n_{t+1}cdot f_2(t)right),
end{multline*}

where $mathbb{I}(cdot)$ is the indicator function, $n$ is a vetor, $n_{t}$ means the t-th element of $n$, which starts from 0, and $T$ is a integer.

$f_1(t), f_2(t), g_1(t,tau), g_2(t,tau)$ are defined below:

begin{align*}
f_1(t) &= operatorname{logit}left(frac{alpha+t}{alpha+beta+(sum_{tau=0}^{t}n_{tau+1})+t}right)\
f_2(t) &= operatorname{logit}left(frac{alpha+t}{alpha+beta+t}right)\
g_1(t,tau)&=operatorname{logit}left(frac{alpha+t}{alpha+beta+(sum_{t’=1}^{t}n_{t’})+t+tau}right)\
g_2(t, tau)&=operatorname{logit}left(frac{alpha}{alpha+beta+(sum_{t’=0}^{t}n_{t’})+tau}right),
end{align*}

where $alpha, beta$ are integer, $n_0$ is defined as 0 to make the formula more clean, and $operatorname{logit}(x)=operatorname{log}(frac{x}{1-x})$.

Code is as follows:

logit(x_) := Log(x/(1 - x));

f1(t_, (Alpha)_, (Beta)_, n_List) := 
  logit(((Alpha) + t)/((Alpha) + (Beta) + 
      Sum(n(((Tau) + 1)), {(Tau), 0, t}) + t));

f2(t_, (Alpha)_, (Beta)_, n_List) := 
  logit(((Alpha) + t)/((Alpha) + (Beta) + t));
g1(t_, (Tau)_, (Alpha)_, (Beta)_, n_List) := 
  logit(((Alpha) + t)/((Alpha) + (Beta) + 
      Sum(n((tt)), {tt, 1, t}) + t + (Tau)));

g2(t_, (Tau)_, (Alpha)_, (Beta)_, n_List) := 
  logit((Alpha)/((Alpha) + (Beta) + 
      Sum(n((tt)), {tt, 1, t}) + (Tau)));

a(T_, n_List) := (Sum(f1(t, (Alpha), (Beta), n)^2, {t, 0, T - 1}) + 
    11 Sum(f2(t, (Alpha), (Beta), n)^2, {t, 0, T - 1}) + 
    Sum(If(n((t + 1)) > 0, 
      Sum(g1(t, (Tau), (Alpha), (Beta), n)^2, {(Tau), 0, 
        n((t + 1)) - 1}), 0), {t, 0, T}) + 
    11 Sum(If(n((t + 1)) > 0, 
       Sum(g2(t, (Tau), (Alpha), (Beta), n)^2, {(Tau), 0, 
         n((t + 1)) - 1}), 0), {t, 0, T}));

d(T_, n_List) := 
 10 T*logit((Alpha)/((Alpha) + (Beta)))^2 + 
  2*logit((Alpha)/((Alpha) + (Beta)))*
   Sum(f3(t, (Alpha), (Beta), n), {t, 0, T - 1}) + 
  10*logit((Alpha)/((Alpha) + (Beta)))^2*
   Sum(n((t + 1)), {t, 0, T}) + 
  2*logit((Alpha)/((Alpha) + (Beta)))*
   Sum(n((t + 1))*f2(t, (Alpha), (Beta), n), {t, 0, T})

However, when I do

a(T, 9, 1, n)*d(T, 9, 1, n) // Simplify

get

a(T, 9, 1, n) d(T, 9, 1, n)

, which is surely not what I expect.

equation solving – How to locate the real maximizer of a nonlinear symbolic function?

I have a symbolic function:

f(a_)=(((-1+a)^2 b^2+(-1+b) b (-2+a+a b) n-(-1+b)^2 (-1+a b) n^2) ((-2+a) c (-n+b (-1+a+n))-2 (-1+a) (b (-1+n)-n) v))/(2 (-1+a) (-1+b) (b (-1+n)-n) (n-b (-1+a+n))^2)

where 0<a<1, n>1, 0<b<1, v>c>0.

I need to find its maximizer. Numerically, I can see that sometimes a=0 is the maximizer and sometimes a^* is a number between 0 and 1. How can I analytically prove these observations? I examined the first-order condition, but no luck.

How to write a really complicated formula into mathematica and do symbolic computation?

I want write the following formula $a$ into mathematica and do symbolic computation. $a$ is defined as follows:
begin{multline*}
a=sum_{t=0}^{T-1}f_1^2(t)+11sum_{t=0}^{T-1}f_2^2(t)+\
sum_{t=0}^Tmathbb{I}(n_{t+1}>0)sum_{tau =0}^{n_{t+1}-1}g_1^2(t,tau)+11sum_{t=0}^{T}mathbb{I}(n_{t+1}>0)sum_{tau=0}^{n_{t+1}-1}g_2^2(t,tau),
end{multline*}

where $mathbb{I}(cdot)$ is the indicator function, $n$ is a vetor, $n_{t}$ means the t-th element of $n$, and $T$ is a integer.

$f_1(t), f_2(t), g_1(t,tau), g_2(t,tau)$ are defined below:

begin{align*}
f_1(t) &= operatorname{logit}left(frac{alpha+t}{alpha+beta+sum_{tau=0}^{t}n_{tau+1}+t}right)\
f_2(t) &= operatorname{logit}left(frac{alpha+t}{alpha+beta+t}right)\
g_1(t,tau)&=operatorname{logit}left(frac{alpha+t}{alpha+beta+sum_{t’=1}^{t}n_{t’}+t+tau}right)\
g_2(t, tau)&=operatorname{logit}left(frac{alpha}{alpha+beta+sum_{t’=0}^{t}n_{t’}+tau}right),
end{align*}

where $alpha, beta$ are integer, and $operatorname{logit}(x)=operatorname{log}(frac{x}{1-x})$.

An example is shown below: when $T=2,alpha=9,beta=1, n=(0,0,0,1)^T$, $a=180.41$.

I will really appreciate it if anybody could help me out of this problem, which troubles me for a long time. Thanks a lot!

symbolic link – How to create a shadow directory

I want to create a shadow directory of a directory D. The shadow directory D1 should have the same structure as D, but should not share any nodes with D. Each file in D should be represented by a symlink to that file in D1. The idea is that operations on D1 should never modify D, so that I can freely delete anything in D1 without affecting D. How can I achieve this? I could of course do a simple tree copy of D but that would make duplicate copies of the files.

differential equations – Replace in a Symbolic Derivative doesnt work with Pi/2

I was writing some small functions for GR applications, and I was defining a Function that gives me the Geodesic equations. When testing if those worked with the Schwarzschild Metric I came upon a problem when trying to replace the angle $theta$ with $frac{pi}{2}$ this then didn’t properly simplify it when there are derivatives of $theta$.

I have made a simple example to showcase what my problem is:

Sum(D(xx((i))((Tau)), (Tau)), {i, 4}) /. t -> Pi/2

This produces the following output:

$left(frac{pi }{2}right)'(tau )+x'(tau )+y'(tau )+z'(tau )$

What can I do to either prevent this from happening or resolve this issue?