## 155 Reputation

5 years, 336 days

## maple 2015...

maple 2015:) thanks!

## you are right...

@Preben Alsholm that is correct. I have now corrected my question!

## Thanks...

@vv
:) I hadn't found that in the maple documentation! Thats really helpful, it also makes solve run faster!

## Thanks...

That was very helpful, I think the most helpful responce I have had on this site! I had to read around a little, but i think I understand your solutions. They are very elegant.

I am working on a set of problems in the feild of structual identifiability; so i am intersted in whether multiple parameterizations of the same model can produce the same output. For example, if a car drives with constant velocity in a horozontal straight line, and the passenger watches only the odometer, they should be able to work out the spead of the car, but if they want to model the cars movement in more detail, they wont be able to work out the direction the car was moving in. If we consider the components of the velocity in the north and west directions to be p and p then the output the passenger would have observed would have been the same for any other parameterization, with q and q having the same meanings and p^2+p^2=q^2+q^2.

Unlike the example with the car most of the parameters I am interested in represent properties of chemicals or chemical interactions so take strictly positive values.

Unfortunatelty, the models I am using have quite large numbers of parameters 6-15, and the equalities that have to be conserved for two separate parameterizations to give the same output are generally very long and complicated. As a result solve takes a long time and often generates output with solutions that aren't physically meaningful like p[i]=0 or p[i]=-q[i].

I am not sure how solve works, but my experience is that adding inequalities like p[i]>0 makes it considerably slower, so my idea was to first create this program and then to create a second program that would iterativly go through these equalities, using GetRidOfDumbSolutions to eliminate them at each stage, so solve would waste time substituting things into sets of equations that have no physical meaning.

This is that code (as it was at lunch time today, I had been trying to iron out the way it handles contradictory equations in the input and apear to have made it worse)

SolveNonZero := proc (ListOfEquations)
local Neqs, Nsols, Npars, SolutionList, i, j, NewSolutionJ, NewSolutionList, TEMP, TEMP2;
Neqs := numelems(ListOfEquations);
SolutionList := [{ListOfEquations}];
NewSolutionList := [];
for i to Neqs-1 do
Nsols := numelems(SolutionList);
for j to Nsols do TEMP := `union`(SolutionList[j], {ListOfEquations[i+1]});
TEMP := {solve(TEMP)};
TEMP2 := convert(TEMP, set);
NewSolutionJ := GetRidOfDumbSolutions(TEMP2);
NewSolutionList := [op(NewSolutionList), op(NewSolutionJ)]
end do;
end do;

NewSolutionList end proc;

Is there any way you could give me some pointers on this too?

## general case...

@Markiyan Hirnyk

I'd like to be able to mark on the graph where the discontinuity is happening, in a general case (i have quite a few similar things to plot) so it might be easiest to use the example you were so helpful with earlier:

sol := dsolve({diff(x(t), t) = piecewise(t <= 500, x(t)+y(t), x(t)-y(t)), diff(y(t), t) = x(t)/y(t), x(0) = 1, y(0) = 1}, {x(t), y(t)}, numeric, output = listprocedure);
plots:-odeplot(sol, [x(t), y(t)], t = 450 .. 550);

I'd like to put an x or a circle on the graph at the (x,y) coordinates that the system occupies when t=500.

## is there any way to know where the syste...

@Markiyan Hirnyk

thanks, that was really helpful.

Is there any way of knowing where the system is when it undergoes the change in state space equations? I'd like to mark that point with a cross or circle so it will be less confusing to anyone looking at the graph.

## Dear Mac Dude...

I appreciate the fact that you have replied. I have updated the above to include the details you have requested.

Are you now abe to answer any of my questions?
Are there other details you want?

@Mac Dude

## This system is a lot freindlier than tha...

This system is a lot freindlier than that. Due to the shared roots of equations I get a solution that is fifth order in y(c[i]) and c[i] if i solve for only three variables.

Also I am interested in the algebraic properties of the system so numerical integration would be entirely unhelpful

## This system is a lot freindlier than tha...

This system is a lot freindlier than that. Due to the shared roots of equations I get a solution that is fifth order in y(c[i]) and c[i] if i solve for only three variables.

Also I am interested in the algebraic properties of the system so numerical integration would be entirely unhelpful 1 2 3 4 Page 4 of 4
﻿