Solve a set of equations

In my app I need to solve a set of 3 equations. But I really struggle, because these 3 equations contain 4 unknown. So the result would be some function of a fith variable.

Very simple Example:
u = cos(s)
v = sin(s)
1 = t

I really don‘t know a method how to solve it. I think it can‘t be solved numerically ,because the result is a function. I thought about to convert the this functions into Fourier series and solve than the set of equations. But I am not sure if this works either. Does anyone know any framework for this. I have looked on the the internet but found nothing.

Does uu + vv = 1 or uu + vv = t help?

u and v are points on a unit circle on the u and v axes.

What are the unknown ? u, s, v, t ?

If so, no way to solve. What are you really searching for ?

  • As formulated, t is totally independent here, and it is already known !

Note: I usually write t = 1 and not 1 = t

  • If you know any of u, v, you essentially know the other (at some π value variation)
  • So I suspect there is some other information you did not provide.

Formulation is uncommon.

So I make three functions with one of them as the parameter. I hope it is more clear now.

Not so clear. What are the 3 functions ? The ones below ?

cos(u) = t ; 
sin(u) = 3 sin(s) ; 
v = 3 cos(s)

Equations 1 and 3 just set t and v directly. Unless you know something more on t or v.

Equation 2 let you write:

u = ArcSin(3 sin(s))

From 1 and 2, you get

t t + 9 sin(s) sin(s) = 1

But not much help.

Could you tell what those equation represent "physically" ?

I guess there is an information you are not exploiting. Otherwise, this cannot be solved.

So you want to express all variables (except one) as a fonction of one var ? You do not want to solve.

Which var do you want to use as parameter ? t ?

if so

  • cos(u) = t ;
  • sin(u) = 3 sin(s) ;
  • v = 3 cos(s)

yields to:

  • u = arccos(t)
  • s = arcsin(sin(arccos(t))/3)
  • v = 3 cos ( arcsin(sin(arccos(t))/3) )

if you prefer to use u yields to:

  • t = cos(u)
  • s = arcsin(sin(u)/3)
  • v = 3 cos ( arcsin(sin(u)/3) )

You did not answer my questions, that makes discussion pretty hard:

  • So you want to express all variables (except one) as a fonction of one var ? You do not want to solve.
  • Which var do you want to use as parameter ? t ?Sorry, I cannot really understand the question.

You said:

func with two faces as a parameter 

What are exactly those 2 faces ? Planes ? Surfaces ? How are they defined ?

those equations out of the two surfaces is very easy.

Please show those equations

But how do I get my app solve them.

What do you mean exactly ?

More Information

I want my programm to intersect two surfaces.

These surfaces are given in a prametric form. A Surface contains three mathematical functions. Those are x(u,v), y(u,v), z(u,v) . So for every u and v you can compute a point in 3D-Space. (When I set up my set of equations I above, I used s and t for the second face)

Some pseudo code so you can understand the Problem better. (When wrote that I want a func with two surfaces as the input I meant a function in my code)

func intersect(s1: Surface, s2: Surface) {
// The lines below are a mathematical notation 
s1.x = s2.x
s1.y = s2.y
s1.z = s3.z
// This created a set of three equations. (like the one I shared with you in a comment)
setofequations.solve() //Now the programm has to solve this set of equations
}

The really tricky part is that there are more parameteres than equations, so the result are mathematical functions for the unknown insteed of values.

I hope could explain my problem better.

Intersect may be many things:

  • an empty intersect
  • a 1D intersect (like when 2 planes intersect)
  • a 2D intersect (if s1 = s2 for instance)

Which means resolution cannot be generic. It does depend on s1 and s2 equation.

It will also depend on what u, v are.

For instance, for a sphere, u and v could be longitude and latitude.

  • Or simply expressed as a constraint: x x + y y + z z = R R
  • then you intersect a plane ax + by + cz = d

So, this is a really complex problem, with no easy generic solution (except if you have a specific definition or each surface).

May have a look here, which points to interesting resources.

https://stackoverflow.com/questions/71157905/intersection-of-parametric-surfaces

And specially this:

https://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/mathe.html

with §5.8 for surface / surface intersection

https://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/node99.html

Good luck.

Solve a set of equations
 
 
Q