TL;DR Problem: Given scalar functions $f(x,y,z,t), g(x,y,z,t)$, and vector function $h(x,y,z,t)$, how do I "solve always" for their parameters/coefficients $r,a,b,c,d,e$ such that if $f,g,h$ are evaluated at some given points then f==0 && g==0 && Norm[h]==0
. These given points are $(x,y,z)=(r\cos[\theta],r\sin[\theta],z) \enspace \forall t \ge 0$ and $z \ge 0$, where $z$ is a non-zero distance up to a known length $m$ i.e. $0 \le z < m$, and $R$ is a known length i.e. $R > r \ge 0$, and $\theta$ is an angle $2\pi > \theta > 0$. Any values of the parameters which also satisfy the conditions, will work for me.
I tried the following but Mathematica simply returns the same input:
points = {x^2+y^2->r^2,x->r*Cos[\[Theta]],y->r*Sin[\[Theta]]};
Minimize[{f /. points, 0 < z <= 200 && 0 <= \[Theta] < 2\[Pi] && t > 0}, {\[Theta],t,z}]
Edit: a much smaller example for the functions is included below. Here, I would be seeking r, a, b and d such that at the points $(x,y,z)=(r\cos[\theta],r\sin[\theta],z)$, and for all $t \ge 0$, then f==0 && g==0 && Norm[h]==0
.
f = 1/2 a^2 E^(-2 d^2 t) (E^(2 a x)+E^(2 a y)+E^(2 a z)+2 E^(a (y+z)) Cos[d x+a z] Sin[a x+d y]+2 E^(a (x+y)) Cos[a y+d z] Sin[d x+a z]+2 E^(a (x+z)) Cos[a x+d y] Sin[a y+d z]);
g = (a^2+b^2+ab)*Exp[2*(a^2+b^2+(a+b)^2)*t]*(Exp[a*(x-y)+b*(x-z)] + Exp[a*(y-z)+b*(y-x)] + Exp[a*(z-x)+b*(z-y)]);
h = {a E^(-d^2 t) (E^(a z) Cos[a x+d y]+E^(a x) Sin[a y+d z]),a E^(-d^2 t) (E^(a x) Cos[a y+d z]+E^(a y) Sin[d x+a z]),a E^(-d^2 t) (E^(a y) Cos[d x+a z]+E^(a z) Sin[a x+d y])};
Please note that this smaller example may not have a solution, but the actual functions have one - though they are too long and complicated to paste here. I am mostly seeking pointers or approaches to use here.
Full description: I have 3 functions in 3D space and time $f(x,y,z,t)$, $g(x,y,z,t)$, $h(x,y,z,t)$ obtained from multiple steps of calculations in Mathematica where $x,y,z,t \in \mathbb{R}$ and $t > 0$. These are functions of sines, cosines and exponentials (and also combinations such as exponentials of sines, sines of cosines, etc). I could paste one here but they are rather long.
Each function has some parameters $r,a,b,c,d,e$ such that at some points parametrized in $0 \le z < m$ and $0 \le \theta < 2\pi$ as $(x,y,z)=(r\cos[\theta],r\sin[\theta],z) \enspace \forall t \ge 0$ then the three functions are numerically equal to zero. I need to find the values of these parameters that create those zeros. Here is what I have tried:
fpoints = Simplify[f, {x^2 + y^2 -> r^2, x->r*Cos[theta], y->r*Sin[theta]}];
gpoints = Simplify[g, {x^2 + y^2 -> r^2, x->r*Cos[theta], y->r*Sin[theta]}];
hpoints = Simplify[h, {x^2 + y^2 -> r^2, x->r*Cos[theta], y->r*Sin[theta]}];
SolveAlways[fpoints==0 && gpoints == 0 && hpoints == 0 && t >= 0 && 0 <= theta < 2*Pi && m > z >= 0,{x,y,z,t}]
This isn't working, probably because the functions are never exactly zero. Then I tried using e.g. Abs[f]<epsilon
where epsilon is a tiny number but this has been running forever.
I also tried using Reduce
, but that gave errors because of the unknown parameters.
Next I tried fixing some parameters, evaluating the functions and using FindMinValue
and FindMaxValue
for all t and z e.g. where $m$ is a defined number,
FindMinValue[{fpoints /.{r->1,a->1,b->1,c->1/10,d->-1/100,e->25}, {0 <= z < m && 0 <= theta < 2*Pi}}, {theta,t,z}
FindMaxValue[{fpoints /.{r->1,a->1,b->1,c->1/10,d->-1/100,e->25}, {0 <= z < m && 0 <= theta < 2*Pi}}, {theta,t,z}
(For $h$ I do the FindMinValue
on Norm[hpoints]
after the ReplaceAll). By randomly changing the parameters manually, I can occasionally obtain cases in which FindMinValue
and FindMaxValue
give me numerical zeros e.g. $-6.07768*10^{-7}$ and FindMaxValue
gives me $5.52429*10^{-8}$. Then I move on to the other functions and see if I get numerical zero for $g$ and $h$ as well at those same parameters - this isn't always working out so far. Since I am changing parameters manually I am sure I am definitely missing something in between.