acer

32333 Reputation

29 Badges

19 years, 325 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@jrive Do you understand that the two forms are not always equal?

Your code's primary issue is that you have no procedure named shoot defined.

So the function call shoot(....) simply returns unevaluated, and isn't a result suitable for passing to odeplot, etc.

@dharr I didn't mean to sound at all harsh, and apologies if I did in any way.

I'm just at a loss to understand what aspects the OP wants to be done less "by hand". If (as you say) the OP knows the form of eq13 then I'm unsure as to the main point of all this rearrangement. But perhaps your approach is exactly what the OP is after.

It just seems a bit like writing down the answer, manually, to me. Or, at most, typeset rearrangement more than actual computation. But maybe that's just me. And (even if so) is fine, naturally, if typeset exposition is a major part of the goal.

It seems to me that this construction gets the effect but is accomplished entirely by hand; no factorization is done programmatically.

@mmcdara Fwiw (using Maple 2023.2 as the OP did),

restart

NULLeq1 := (R2+Rhi)*R1/(R1+R2+Rhi) = RloNULL

(R2+Rhi)*R1/(R1+R2+Rhi) = Rlo

 

NULLeq2 := R1*Rlo/(R1+Rlo)+R2 = RhiNULL

R1*Rlo/(R1+Rlo)+R2 = Rhi

`assuming`([evala({solve({eq1, eq2}, {R1, R2}, explicit, useassumptions)})], [positive, Rhi > Rlo])

{{R1 = ((Rhi-Rlo)*Rhi)^(1/2)*Rlo/(Rhi-Rlo), R2 = ((Rhi-Rlo)*Rhi)^(1/2)}}

Download for_help_jrive_acc.mw

As for queries about using evala, there are lots of examples for which simplify does not rationalize (...radicals in the denominator). Sometimes expand@rationalize gets the desired effect. I usually submit reports about such examples exhibiting weakness in plain simplify.

Simplification is not easy, and has to deal with potential blowups. It uses a different heuristic organization than just trying every hammer.

@jrive I suppose "few" is the wrong term, sorry. Of course there are many elementary and special functions, etc, which can return any unevaluated  call.

All I really meant was that seeing such may be a hint that something's not gone right. (An unevaluated return to implicitplot might mean that plots were not loaded, as another example.)

I don't know of a list of such commands. One is fsolve, whose unevaluated return indicates that no numeric root was found. (That can be slightly awkward to manage, but persists at least for backwards compatibility.)

There are few commands (aside from elementary, special functions, etc) in Maple that can return unevaluated, and solve isn't one of them.

So the apparent return of an unevaluated solve call was a hint.

@jrive From you last image it appears that there is a space between solve and the opening bracket?

That would make it a multiplication, not a function call.

(It'd be more helpful to attach the actual worksheet, in such a situation that the return appeared like your last image.)

You don't need any conversion. Maple's .mw files are already stored as XML.

Just upload and insert a link to the file using the green up-arrow in the Mapleprimes editor.

So far, you haven't provided a link.

@Ronan If your results were itself an expression sequence then you could keep it that way. You don't have to make it a list or Vector to accomplish this kind of thing.

@C_R It is indeed referenced on the ?solve,details Help page -- one of several by links to ancillary methods/functionality.

@C_R If it's of interest, a related parametric solve call is done quite quickly.

(Done with either assumptions or extra inequality conditions.)

restart;

difference_term := (-lambda__1 - lambda__2 - lambda__3)*theta^2
                   + (X__1*lambda__1 + X__2*lambda__2 - X__3*lambda__3
                   + lambda__1*(X__1 + delta__1) + lambda__2*(X__2 + delta__2)
                   - lambda__3*(X__3 + delta__3))*theta;

(-lambda__1-lambda__2-lambda__3)*theta^2+(X__1*lambda__1+X__2*lambda__2-X__3*lambda__3+lambda__1*(X__1+delta__1)+lambda__2*(X__2+delta__2)-lambda__3*(X__3+delta__3))*theta

conds := lambda__1 >0,lambda__2>0, lambda__3>0, theta<>0;

0 < lambda__1, 0 < lambda__2, 0 < lambda__3, theta <> 0

solve(difference_term < 0, #X__1,
      parameters=[lambda__1,lambda__2,lambda__3,theta,delta__1,delta__2,delta__3])
  assuming conds;

piecewise(0 < theta, [[X__3 = X__3, X__2 = X__2, X__1 < -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`)]], theta < 0, [[X__3 = X__3, X__2 = X__2, -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`) < X__1]], [])

solve({difference_term < 0, conds}, #X__1,
      parameters=[lambda__1,lambda__2,lambda__3,theta,delta__1,delta__2,delta__3]);

piecewise(0 < `&lambda;__1` and 0 < `&lambda;__2` and 0 < `&lambda;__3` and 0 < theta, [[X__3 = X__3, X__2 = X__2, X__1 < -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`)]], 0 < `&lambda;__1` and 0 < `&lambda;__2` and 0 < `&lambda;__3` and theta < 0, [[X__3 = X__3, X__2 = X__2, -(2*X__2*`&lambda;__2`-2*X__3*`&lambda;__3`-theta*`&lambda;__1`-theta*`&lambda;__2`-theta*`&lambda;__3`+`&delta;__1`*`&lambda;__1`+`&delta;__2`*`&lambda;__2`-`&delta;__3`*`&lambda;__3`)/(2*`&lambda;__1`) < X__1]], [])

Download inequality_reply_ac.mw

@nl4l1f3 Even without recourse to interpolation, some contour plots can be had.

Afleiding_Euler_knik_met_uitvoer_20240405_accc.mw

Hopefully that might give you some additional ideas about how you might further display the overall situation.

(I didn't attempt animation across, say, A2 values. I also didn't have it store the data for quicker re-use.)

@dharr In Maple 2015.2 plot3d is sometimes passing 1.000000001 instead of 1.0 at the upper end of the ranges. That seems to have been fixed in Maple 2016.2 and onward.

3d_coloring_reply_1_ac.mw

@nl4l1f3 I'm sorry, but it's unclear to me exactly what new things you're trying to accomplish.

I don't understand how you are trying to collate, organize, apportion, or plot the data from four varying parameters.

You could start by clearly explaining the end-goals. If that is plotting then please explain whether you want static plots or animations, and what parameter values would remain fixed at single values while others (on axis[1] and axis[2] say) might take their full sequence of values.

Moreover, there is such a great number of combinations of laying out the data (column-wise) as some parameters are fixed or varying that doing so seems arbitrary -- even if you were to detail it properly.

Sorry again. To me there seems now to be a large gulf between the number of possible requirements and the few hints at details that I have little idea how to proceed.

First 44 45 46 47 48 49 50 Last Page 46 of 592