acer

32622 Reputation

29 Badges

20 years, 44 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

That Example unfortunately shows only how to have text use the current Style that is set for Hyperlinks, rather than an actual hyperlink.

There is a Hyperlink constructor exported from DocumentTools:-Layout, but it is not documented. It's also not a package export, so its name is not rebound by with. But it can still be called by its full name.

with(DocumentTools):
with(DocumentTools:-Layout):
F := Font("Official NORAD Santa Tracker", size=12, color=blue, style=:-Hyperlink):
H := DocumentTools:-Layout:-Hyperlink(F,linktarget="https://www.noradsanta.org/"):
InsertContent(Worksheet(Group(Input(Textfield("Track Santa at the ",H))))):

It is not a bug. But it is a commonly asked question.

for i from 1 to n do a[i] := unapply( b[i](u), u); od;

I consider it safe to assume that you've given us a toy example merely for the purpose of illustration, and that your actual examples are more involved. Otherwise you could assign more directly from b to a, or b[i] to a[i]. I assume that you are not working with this trivial task.

If you have a more involved example for which the above approach does not work as you want then show us the full example. There are too many variants to guess thoroughly.

Eg, you might want the i in  b[i] to be resolved in the body of the new operator/procedure -- while neither b[i] nor the call b[i](u) are yet resolved explicitly or executed. That could be done as follows, which also handles even more complicated cases,

for i from 1 to 2 do
   a[i] := subs(__dummy=b[i],(u->__dummy(u)));
end do;

Such subtleties might not matter to your workflow. It could conveniently allow you to change any or all of the definitions of the b[i] without having to reassign the a[i]. That might well not matter to you.
 

Substitute for 1-gamma first, using e_nsp2. Then you can substitute for gamma using e_nsp1 (without interfering with the original 1-gamma terms).

(You could also separately freeze the relevant terms 1-gamma and gamma, and then do the substitutions together. But your example seems unambiguous and so this may not be necessary here.)

e_nsp1 := nsp_1 = gamma*L/(sigma*alpha);

nsp_1 = gamma*L/(sigma*alpha)

e_nsp2 := nsp_2 = (1 - gamma)*L/(sigma*alpha);

nsp_2 = (1-gamma)*L/(sigma*alpha)

set_3 := {sigma*alpha = tau*w^(sigma - 1)*mu_11*w*gamma*L
                        + w^(sigma - 1)*mu_12*s*(1 - gamma)*L/tau,
          sigma*w*alpha = mu_11*w*gamma*L + mu_12*s*(1 - gamma)*L};

{sigma*alpha = tau*w^(sigma-1)*mu_11*w*gamma*L+w^(sigma-1)*mu_12*s*(1-gamma)*L/tau, sigma*w*alpha = mu_11*w*gamma*L+mu_12*s*(1-gamma)*L}

subs([1-isolate(e_nsp2,gamma)], set_3);

{sigma*alpha = tau*w^(sigma-1)*mu_11*w*gamma*L+w^(sigma-1)*mu_12*s*nsp_2*sigma*alpha/tau, sigma*w*alpha = alpha*mu_12*nsp_2*s*sigma+L*gamma*mu_11*w}

subs(isolate(e_nsp1,gamma), %);

{sigma*alpha = tau*w^(sigma-1)*mu_11*w*nsp_1*sigma*alpha+w^(sigma-1)*mu_12*s*nsp_2*sigma*alpha/tau, sigma*w*alpha = alpha*mu_11*nsp_1*sigma*w+alpha*mu_12*nsp_2*s*sigma}

 

Download question_1_ac.mw

You are missing a comma between the 3rd and 4th equation in the definition of Inter.

Also, did you realize that Inter contains lambda[1], etc, while the eqs and Sol contain lambda__1, etc? I'm not sure which you want, but I've changed them to match, here. tes_ac.mw

I suspect that the real lesson to learn here is: Do not evalf non-constant expressions before it is necesary! Doing so can easily result in loss of accuracy when doing subsequent numeric computations, due to roundoff error in the approximated coefficients.

Leave coefficients as exact values as late as you can. It may prevent roundoff error from hiding roots, or finding true extrema, and it might even allow useful symbolic simplification.

In this example it looks as if the supplied expression contains a mix of exact names (ie, x) and floating-point coefficients. It seems possible that some (earlier) representation or characterization might be possible in which a wealth of multiple roots could be ascertained.

Below I use Maple 2019.1.

restart

eq := 0.8112000000e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2-0.9063407407e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2+0.8112000000e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2-0.9063407407e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2+0.951407407e-3*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2-0.951407407e-3*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2-0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*(9.869604404+0.4056000000e-2*x^2)^(3/2)-0.9063407407e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.9063407407e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2+0.951407407e-3*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.951407407e-3*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.951407407e-3*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2+0.9063407407e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2-0.8112000000e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2-0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2+0.951407407e-3*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.8112000000e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2+0.9063407407e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2+0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2+0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*sqrt(9.869604404+0.4056000000e-2*x^2)-0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*(9.869604404+0.4056000000e-2*x^2)^(3/2)+0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2-0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2+0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2+0.8112000000e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2+0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2-0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2+0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2+0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*sqrt(9.869604404+0.4056000000e-2*x^2)+0.8112000000e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2-0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*sqrt(9.869604404+0.4056000000e-2*x^2)+0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2+0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*sqrt(9.869604404+0.4056000000e-2*x^2)+0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*(9.869604404+0.4056000000e-2*x^2)^(3/2)-0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2+0.9063407407e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2+0.951407407e-3*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*x^2-0.9063407407e-2*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2+0.951407407e-3*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*(9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2-0.8112000000e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sqrt(9.869604404+0.5007407407e-2*x^2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2-0.8112000000e-2*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*(9.869604404+0.5007407407e-2*x^2)^(3/2)*cosh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*x^2+0.1001481481e-1*sin(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*x^2*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(-9.869604404+0.4056000000e-2*x^2)*(9.869604404+0.4056000000e-2*x^2)^(3/2)+0.9063407407e-2*(-9.869604404+0.5007407407e-2*x^2)^(3/2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*cos(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*sinh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*sqrt(9.869604404+0.4056000000e-2*x^2)*x^2-0.951407407e-3*sqrt(-9.869604404+0.5007407407e-2*x^2)*cos(.25*sqrt(-9.869604404+0.5007407407e-2*x^2))*sinh(.25*sqrt(9.869604404+0.5007407407e-2*x^2))*sin(.25*sqrt(-9.869604404+0.4056000000e-2*x^2))*tan(sqrt(-9.869604404+0.4056000000e-2*x^2))*tanh(sqrt(9.869604404+0.4056000000e-2*x^2))*cosh(.25*sqrt(9.869604404+0.4056000000e-2*x^2))*(-9.869604404+0.4056000000e-2*x^2)^(3/2)*x^2

identify(9.869604404)

Pi^2

eeq := identify(subs([0.5007407407e-2 = `0.005007407407`, 0.4056000000e-2 = `0.004056000000`], eq))

indets(eeq, float)

{-0.1001481481e-1, -0.9063407407e-2, -0.8112000000e-2, -0.951407407e-3, 0.951407407e-3, 0.8112000000e-2, 0.9063407407e-2, 0.1001481481e-1}

new := subs([`9.869604404` = identify(9.869604404), -`9.869604404` = -identify(9.869604404)], convert(subs([9.869604404 = `9.869604404`, -9.869604404 = -`9.869604404`], eq), rational, exact))

length(new); newer := `assuming`([simplify(radnormal(expand(new)))], [x >= 250*sqrt(6)*Pi*(1/39)]); length(newer)

4900

newest := `assuming`([simplify(simplify(convert(newer, exp), exp), size)], [x >= 250*sqrt(6)*Pi*(1/39)]); length(%)

3371

L1 := [fsolve(eq, x = 250*sqrt(6)*Pi*(1/39) .. 0.1e4, maxsols = 40)]

[68.93033111, 106.9740567, 151.0624354, 198.3826228, 245.3396183, 291.3108383, 338.9649000, 387.6858395, 434.8734817, 481.5561049, 530.0902992, 578.7535343, 672.8961648, 816.8060827]

L2a := [fsolve(new, x = 50 .. 0.1e4, maxsols = 40)]; L2b := [fsolve(newest, x = 50 .. 0.1e4, maxsols = 40)]

[68.93033111, 106.9740567, 151.0624354, 198.3826228, 245.3396183, 291.3108383, 338.9649000, 387.6858395, 434.8734817, 481.5561049, 530.0902992, 578.7535343, 625.6264792, 672.8961648, 721.8803254, 770.1143869, 816.8060827, 864.7242000, 913.8322870, 961.4962365]

NULL

plot(newest, x = 250*sqrt(6)*Pi*(1/39) .. 0.1e4)

plot(Im(newest), x = 250*sqrt(6)*Pi*(1/39) .. 0.1e4, thickness = 5)

Digits := 30; plot(newest, x = 500 .. 600, discont); Digits := 10

Digits := 30; plot(eq, x = 500 .. 600, discont); Digits := 10

``

Download solve_equation_ac.mw

Calling fsolve with a maxsols option (alas, undocumented) is just a hook to NextZero. It's an alternative to Student:-Calculus1:-Roots(...,numeric) which calls fsolve recursively.

Also, we can note that a 10-digits approximation to an actual root can possibly produce a large residual (forward error). That can happen simply due to the fact that the root (or the coefficients) have been already rounded. 

In Maple 2015 you'll need to account for the special-evaluation rules which Explore has on its first procedural parameter (ugh).

Here is one way that seems to handle your posted example, in a procedure. I used Maple 2015.2. Here I deliberately stuck to your original approach.
Explore_Procedure_ac1.mw

ps. I mean no offence, but I have reservations about this whole approach, including picking apart RVs. (I don't understand what great convenience that brings over passing around a distribution name and parameter names, at the risk of complicated and IMO hazy mechanisms.) And to go to such efforts, while global :-x must still be unassigned, etc, seems awkward to me. Perhaps I don't properly understand how this OBSERVE procedure is intended for use.

 

The command with is not intended to work inside a procedure body. It's Help pages documents that clearly, with examples. That is the primary cause of the error.

I have changed your definition of PR to utilizes the uses syntax instead.

does_not_evaluate_ac.mw

Since you're using Maple 2019 you might find its new Calendar package easier for those computations (eg. date differences).

 

It is undocumented and not widely known that the caption string of a Button Component can be set using a reasonably convenient subset of HTML.

This attachment shows font size control in two such ways. I used Maple 2019.1.

restart;

with(DocumentTools):

 

First, let's use the size attribute of the HTML font tag.

 

mk:=proc(s::string, fs::posint)
  sprintf("<html><font size=\"%ld\">%s</font></html>",
          fs,s);
end proc:

 

for i from 1 to 6 do
  Threads:-Sleep(0.5);
  SetProperty("Button0", ':-caption',
              mk("foo",i), ':-refresh');
end do:

 

Or we could use an Internal CSS and the font-size property.

 

mkcss:=proc(s::string, fs::posint)
  sprintf("<html><style> h1 { font-size: %ldpx; } </style><h1>%s</h1></html>",
          fs,s);
end proc:

 

for i from 8 to 20 by 2 do
  Threads:-Sleep(0.5);
  SetProperty("Button0", ':-caption',
              mkcss("foo",i), ':-refresh');
end do:

 

Download caption_html.mw

You can use similar techniques to control qualities such as text color, bold and italic, etc.

I am not sure what is the extent of this functionality.

If you pass the inequalities to solve in an And call (as opposed to the more usual set)  then the result will be a RealRange which pretty-prints in a traditional manner with brackets.

Here's your example, as well as some conversions back and forth.

restart;

a1 := solve( And(-1 < x, 0 < 2*x/(x^2 - 1), x < 1), x );

RealRange(Open(-1), Open(0))

lprint(a1);

RealRange(Open(-1),Open(0))

op(map(op,a1));

-1, 0

 

You may also find these conversions useful.

 

convert(x::a1, relation);

And(-1 < x, x < 0)

a2 := solve({-1 < x, 0 < 2*x/(x^2 - 1), x < 1}, {x});

{-1 < x, x < 0}

b2 := And(op(a2));

And(-1 < x, x < 0)

convert(b2,RealRange);

x::(RealRange(Open(-1), Open(0)))

lprint(%);

x::RealRange(Open(-1),Open(0))

 

Download solve_RealRange.mw

Your question is unclear.

Are you asking for axis labels and axis bars but with no axis tickmarks?

Or are you asking for axis labels with neither axis tickmarks nor axis bars? That is not possible in the strict sense, since the labels are part of the axes (as a whole, to the GUI renderer) and there is no syntax for omitting only the axis bars.

While you may not be able to get rid of the axis bars themselves while retaining axis labels, but you can make the axis bars thin and white and less apparent under no light model.

Personally, I don't see much point to having axis labels without any axis bars since in that situation it is visually unclear as to where the labels lie spatially, upon rotation. Without the axis bars there's little visual cue (apart from what the surface might convey...)

restart;

plot3d(sin(x)*y, x = -2*Pi .. 2*Pi, y = -2*Pi .. 2*Pi,
       axis=[tickmarks=[],location=low],
       axes=normal, lightmodel=none,
       labels=[X,Y,Z]);

plot3d(sin(x)*y, x = -2*Pi .. 2*Pi, y = -2*Pi .. 2*Pi,
       axis=[color=white, thickness=0.001, tickmarks=[],location=low],
       axes=normal, lightmodel=none,
       labels=[`#mi("X",mathcolor="black")`,
               `#mi("Y",mathcolor="black")`,
               `#mi("Z",mathcolor="black")`]);

 

Download axis_suppr.mw

Alternatively you could give up on axis labels and get rid of the axes bars altogether. But if you instead utilize textplot to mimic labels then they won't always jump to the fore (as axis labels do) upon rotation. I haven't shown this.

Below I am talking about the dimensions of the inlined plotting window in which the plot appears (who's borders one can drag manually with the mouse pointer, to resize).

In unmodified Maple 2019 and earlier it cannot be done using the size option directly (in 3d plotting commands).

But it can be applied to the plot after the fact. For example,

restart;
setsize:=proc(P,sz::[posint,posint])
  op(0,P)(remove(type,[op(P)],'specfunc(ROOT)')[],
          ROOT(BOUNDS_X(0),BOUNDS_Y(0),
               BOUNDS_WIDTH(sz[1]),BOUNDS_HEIGHT(sz[2])));
end proc:

foo := plot3d(cos(x/10+y/10));

setsize(foo, [600,600]);

Is that good enough? An alternatve is a code snippet that could go in your personal initialization file, the effect of which is that the option size might be used directly from within plot3d, plots:-display for 3d plot, etc. (I recently figured a small number of modifications that might allow this...)

[edit] Another variant on the above code snippet might be,

setsize:=proc(P,sz::[posint,posint])
  op(0,P)(op(subsindets(P,'specfunc(ROOT)',()->NULL)),
          ROOT(BOUNDS_X(0),BOUNDS_Y(0),
               BOUNDS_WIDTH(sz[1]),BOUNDS_HEIGHT(sz[2])));
end proc:

One could also qualify the parameter P of that procedure with a type, eg. specfunc({PLOT,PLOT3D,_PLOTARRAY})

You won't be able to do another computation in this same worksheet while this clock code is running.

restart;

 

The code utilizes this functionality from Maple 2019.

 

Calendar:-Format(Calendar:-Today(),"hh:mm:ss a");

"12:20:34 PM"

 

First execute this code. (Or stick it in the Startup Code region, or whatever.)

 

Start:=proc()
  local status,T;
  uses DocumentTools;
  status:=parse(GetProperty("StartStop",value));
  if status=false then
    SetProperty("StartStop",':-caption',"start",':-refresh');
    return;
  elif status = true then
    while parse(GetProperty("StartStop",value))=true do
      Threads:-Sleep(1.0);
      T := Calendar:-Format(Calendar:-Today(),"hh:mm:ss a");
      SetProperty("StartStop",':-caption',T,':-refresh');
    end do:
  end if;
end proc:

 

 

Click on the Button to start the clock. Click on it again to stop it.

 

 

Download clock.mw

Use the so-called 2-argument calling sequence of the eval command.

The purpose of that functionality is to allow you to evaluate a formula (in your case, simply L) at the values denoted by the equations.

eq := L = 2/3:
eval(L, eq);

                      2/3

eqs := {L = 2/3, x1=blah, x2=foo, x3=bar}):
eval(L, eqs);

                      2/3

eval(x1, eqs);
                      blah

eval([L,x1,x2,x3], eqs);
    
              [2/3, blah, foo, bar]

eval((L+x1)/x2, eqs);

                    2/3 + blah
                    ----------
                       foo

This is a common programmatic operation and, as you've noted, an important one.

This is superior to calling assign on eqs (which assigns the values to the names but prevents immediate, subsequent use of those names as unassigned parameters unless you subsequently unassign them).

This use of eval is also superior to picking off the right-hand side of any of the equations in a set by its position (which can change if you choose different names for the variables). Ie,

op(1,eqs);

                   L = 2/3
rhs(op(1,eqs));

                      2/3

You can plot a surface with an image on it, which is the closest to "texture mapping" for Maple of which I'm aware.

In recent versions you can, for example, use the image option on a plotting call like plot3d.

In some versions for which the image option is not yet available, you can do this sort of thing manually. (The implementation in that old Post are very similar to what the image option does, in essence. There are several links there to yet more old Posts, on related topics. The newer colorscheme option's implementation is also related.)

I do not know the specifics of how the Standard GUI renders plots (jogl, opengl, etc) so I cannot state specifics about "texture mapping" technically.

(As an example, this site had this recent post on the image option.)

Your problematic example with discont was fixed in Maple 2018.0.

restart;

kernelopts(version);

`Maple 2015.2, X86 64 LINUX, Dec 20 2015, Build ID 1097895`

f := x -> piecewise(x>10,undefined,x):

plots:-polarplot(f(3/(1-1.5*sin(theta))),
                 coordinateview = [0 .. 10, 0 .. 2*Pi]);

 

Download polar_pw.mw

First 140 141 142 143 144 145 146 Last Page 142 of 339