Solve multivariate equations

I would like to be able to solve systems of equations in at least two, but ideally more variables.

I assume you mean finding a numerical solution like <solveEquations> does for a single equation? (The docs seem to incorrectly state it can solve a system of multiple equations.)

In this case, I assume it would just find a single solution using a starting point declared by the author. (As opposed to the current single-equation behavior, where it attempts to find all solutions within a given interval.) Is this what you are looking for?

Yes, though really what I need is a more abstract solver. For a recent activity, I needed to solve a system in terms of a bunch of parameters. As one example, this is what I plugged into sage: solve([u==(a*s+b)/(s-c)^2+s,r==(a*q+b)/(q-c)^2+q],a,b). In the end, each of those parameters was replaced with a module attribute in Doenet. If I could do the algebraic solving in Doenet, I could then write a single module that would create a function of a given form that goes through some number of points. For now, I have to write a new module for each function form I want.

Ah, yes. To create that feature would be a big lift. We would need to find a better mathematical library to use that does better symbolic manipulations that what we are currently using.

I created an issue to track this request, though I don’t expect it is something we will be able to support in the near future.

I think I know what you were trying to do based on our conversations. IIRC, you were trying to have a function with two different horizontal asymptotes. My idea was to create a simple hyperbola of the form y=a/(x-h)+k and solve for the values of a, h, and k based on two points. One of the points would be somewhat fixed to the left (or right) of h. That part isn’t too hard.

The tricky bit is if you want to add a second asymptote and want to force a U shaped or S shaped curve between two vertical asymptotes. I ended up using GenAI to help with this. This isn’t exactly a solution to your feature request, but maybe it helps with the issue you were having. I know your issue was further complicated by a button to add a vertical asymptote.

I thought I would share this here because it does have some of the features that you wanted.