Let's consider any parametrizable curve $g : R \rightarrow C$
For that I thought of creating Fourier series $g(t)=\sum_{n=-\infty}^{\infty} c_ne^{int}$ which can possibly cover any curve on $C$ plane.
For the sake of optimization problem I have a differentiable loss function
$F: C^m \rightarrow R$
$F(c_{-n},...,c_{-1}, c_{0}, c_{1}, ..., c_{n})$
It takes the parameters of $g$ and returns some real value.
I would like to adjust $c_{n}$ with gradient descent to find the optimal path $g$ (reach the minimum of $F$).
The problem starts when the boundary conditions come in.
A curve must start at $g(0) = z_0$ and end on $g(t_0) = z_1$. Can the Fourier series represent any curve starting meeting these conditions? If that's the case, how?
What are the other approaches to this problem not necessarily using Fourier series?
One solution is create a polynomial instead of Fourier series as @TravorLZH stated.
$W(t) = F(t) + P(t)$
$F$ would regulate the conditions $W(0) = z_0, W(t_0) = z_1$
and $P$ would be the one to optimize on, but it has to keep the requirement
$t \epsilon \{0, t_0\} \rightarrow P(t) = 0 $
To solve this, first I'll start with $f$. It can be a simple linear function such that:
$F(t) = ax+b F(0) = z_0$ thus $b = z_0$ and $F(t_0) = z_1$ thus $a = \frac{z_1 - z_0}{z1}$
Then when it comes to $P(t)$, I divided it into
$P(t) = (t)(t-t_0)P_1(t)$
I'd create a random polynomial $P_t(t) = c_0*t^0 + c_1*t^1+ ... + c_n*t^n$, on which I can optimize the problem by manipulating $c_0, c_1, ..., c_n$ Note that by adjusting these coefficients we can preserve the boundary conditions.
The final polynomial is the $W(t)=F(t)+P(t) = (\frac{z_1 - z_0}{z1}t^2 +z_0t) + (t)(t-t_0)(c_0*t^0 + c_1*t^1+ ... + c_n*t^n)$.