acer

31056 Reputation

29 Badges

19 years, 68 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

For fun, I'll add that you might also be able to use the D form as intermediary. Eg,

ee := diff(diff(w[2](x[1],t),t$2),x[1]);

diff(diff(diff(w[2](x[1], t), t), t), x[1])


I'll do split both steps below into two lines (each), just to illustrate
what's going one.

You might manipulate/work with this form until ready.

convert(ee,D);

temp2 := eval(%,x[1]=L[b1]);

(D[1, 2, 2](w[2]))(x[1], t)

(D[1, 2, 2](w[2]))(L[b1], t)

When ready...

eval(temp2,L[b1]=5);

convert(%,diff);

(D[1, 2, 2](w[2]))(5, t)

eval(diff(diff(diff(w[2](t1, t), t), t), t1), {t1 = 5})


note: name t1 serves the same purposes as does dummy x[1].

Download Eval_eval_D.mw

This way can also be done by extracting the D[1,2,2](w[2]) on it's own. You can then apply that to whatever two arguments you wish; in some cases you could get by above without the evals.

@Gabriel Barcellos With those few additional details it seems as if one place to start is in the speed of evaluation of the equations themselves.

You write that the equations are "really big". But that is not enough information to know whether their evaluation is memory bound (inadequate RAM leading to the OS needing to swap out active memory, etc). The equations could fit in memory and still be very time-consuming to evaluate at numeric values of the unknowns. As yet, we readers cannot know.

You might focus on the performance of a single of those fsolve calls, and then later try to parallelize mutiple such fsolve calls.

Perhaps the equations can be simplified or reduced in size. Perhaps all or parts of them can be evaluated under evalhf or Compiler:-Compile'd. Perhaps they have common subexpressions. And so on.

It's not easy to be more specific without actually seeing the full code to reproduce. Is there a reason why you cannot upload and attach it here (green up-arrow in Mapleprimes editor)?

@Andiguys You can add sliders for other parameters, after removing them from your DATA list.

It turns out that you can get an explicit formula for that A12=1 intercept. (But even if not easily found explicitly, you could construct a simple proc that fsolve'd for it...) You can even add it to the plot.

question_plot_slider_acc.mw

@lemelinm Yes, or put it in,

   "C:\Users\userid\maple.ini"

if you want it to work for you in other versions. Naturally, edit the "userid" appropriately.

@lemelinm You have mistakenly tried to put the commands into the GUI's stored preferences file.

Instead, put the Maple commands into an user initialization file at one of these locations (for MS-Windows, choice 3)  is common).

The mistake is quite understandable and common, since the two kinds of file unfortunately can have the same filename on MS-Windows.

The Help page for initialization files is pretty clear. It has sections explaining the choices, for each of MS-Windows, Linux, and OSX (Mac). Many people are able to figure it out by merely reading this page, ie. without a video.

@salim-barzani You can enter the mu__3 and mu__4 directly into your expressions, in 2D Input mode.

You don't have to assign to mu[3] and mu[4] at all. In fact continuing to do so doesn't seem to have much point, except that it's confusing you.

Why do you claim that the LaTeX is not OK?

restart

U1 := lambda*(1+sqrt(-lambda)*(cosh(xi*sqrt(-lambda))*B[2]+sinh(xi*sqrt(-lambda))*B[1])*`&+-`(sqrt(lambda/(lambda^2*B[1]^2-lambda^2*B[2]^2-mu^2))))*beta[0]*exp(I*(d*x+e*y+f*t^beta/beta))/(B[1]*cosh(xi*sqrt(-lambda))*lambda+B[2]*sinh(xi*sqrt(-lambda))*lambda+mu)

lambda*(1+(-lambda)^(1/2)*(cosh(xi*(-lambda)^(1/2))*B[2]+sinh(xi*(-lambda)^(1/2))*B[1])*`&+-`((lambda/(lambda^2*B[1]^2-lambda^2*B[2]^2-mu^2))^(1/2)))*beta[0]*exp(I*(d*x+e*y+f*t^beta/beta))/(B[1]*cosh(xi*(-lambda)^(1/2))*lambda+B[2]*sinh(xi*(-lambda)^(1/2))*lambda+mu)

V1 := -`μ__4`*b*lambda^2*(1+sqrt(-lambda)*(cosh(xi*sqrt(-lambda))*B[2]+sinh(xi*sqrt(-lambda))*B[1])*`&+-`(sqrt(lambda/(lambda^2*B[1]^2-lambda^2*B[2]^2-mu^2))))^2*beta[0]^2/((B[1]*cosh(xi*sqrt(-lambda))*lambda+B[2]*sinh(xi*sqrt(-lambda))*lambda+mu)^2*a*`μ__3`)

-mu__4*b*lambda^2*(1+(-lambda)^(1/2)*(cosh(xi*(-lambda)^(1/2))*B[2]+sinh(xi*(-lambda)^(1/2))*B[1])*`&+-`((lambda/(lambda^2*B[1]^2-lambda^2*B[2]^2-mu^2))^(1/2)))^2*beta[0]^2/((B[1]*cosh(xi*(-lambda)^(1/2))*lambda+B[2]*sinh(xi*(-lambda)^(1/2))*lambda+mu)^2*a*mu__3)

mu := 0

0

U1

lambda*(1+(-lambda)^(1/2)*(cosh(xi*(-lambda)^(1/2))*B[2]+sinh(xi*(-lambda)^(1/2))*B[1])*`&+-`((lambda/(lambda^2*B[1]^2-lambda^2*B[2]^2))^(1/2)))*beta[0]*exp(I*(d*x+e*y+f*t^beta/beta))/(B[1]*cosh(xi*(-lambda)^(1/2))*lambda+B[2]*sinh(xi*(-lambda)^(1/2))*lambda)

V1

-mu__4*b*lambda^2*(1+(-lambda)^(1/2)*(cosh(xi*(-lambda)^(1/2))*B[2]+sinh(xi*(-lambda)^(1/2))*B[1])*`&+-`((lambda/(lambda^2*B[1]^2-lambda^2*B[2]^2))^(1/2)))^2*beta[0]^2/((B[1]*cosh(xi*(-lambda)^(1/2))*lambda+B[2]*sinh(xi*(-lambda)^(1/2))*lambda)^2*a*mu__3)

latex(V1)

-\frac{\mu_{4} b \,\lambda^{2} {\left(1+\sqrt{-\lambda}\, \left(\cosh \! \left(\xi  \sqrt{-\lambda}\right) B_{2}+\sinh \! \left(\xi  \sqrt{-\lambda}\right) B_{1}\right) \left(\pm \sqrt{\frac{\lambda}{\lambda^{2} B_{1}^{2}-\lambda^{2} B_{2}^{2}}}\right)\right)}^{2} \beta_{0}^{2}}{\left(B_{1} \cosh \! \left(\xi  \sqrt{-\lambda}\right) \lambda +B_{2} \sinh \! \left(\xi  \sqrt{-\lambda}\right) \lambda \right)^{2} a \mu_{3}}

 

Download tester_ac.mw

@fnavarro Suppose that the nm is the string denoting the filename.

Suppose that the text file already exists.

Then, in any subsequent Maple session you can do the following, to add additional content to the end of the file, ie. to append to it:

  FileTools:-Text:-Open(fn,':-append'):
  FileTools:-Text:-WriteLine(fn, "%a\n",  some_new_thing ):

See the Open command's Help page, which documents choices of mode in which to open the file.

@sidyly1211 What do the three colored sections of your 2D plot represent?

Your worksheet has three functions, LE,ME,NE. How do they relate to the three areas in your attached image?

For example, does that 2D image represent something like which of the three is greatest (or least). Or...?

Please don't spawn wholly separate new Question threads for this same system (esp. just trying to use the same code in an Answer here).

Duplicate Question threads get flagged as such, and may be deleted.

You could add a close followup query here.

Or (if it's really a significantly different variant) you can use the Branch button at the bottom of this Question's body and so spawn a new Question that automatically has cross-reference links. Otherwise it's not helpful for readers to not have the full context, when reading either.

The NAG and CUBA sources are compiled from C source to shared objects. For each there is also a C bridging function.

The bridging functions are accessed from Maple via its external-calling mechanism.

The integrands are turned into Maple procs, which are passed out to the bridging functions and there set up as C functions (which can do call-back into Maple) which are passed as handles to the NAG/CUBA function.

There are two flavors of call-back, evalhf mode (tried first) and evalf mode (fallback).

@Carl Love I did that so that the Variable palette gets updated. I just wanted it at the top-level, and didn't have time to get fancier.

I didn't look at whether I could use anything from the _UIUtils package.

To the OP: I didn't mention it, but naturally the getassumptions command could also be used to programmatically work with the assumptions in some other way, eg. put them all in a nice Table, having the RealRanges typeset, etc. It was the OP who mentioned the Variable palette, so I tried for just that.

@salim-barzani It's unclear what you are trying to convey.

You expression is not a (nonconstant) polynomial in x. It is also not a polynomial in xi.

You have not explained what you mean by "find parameter", or "change parameters".

It's not just that your explanation is still missing merely a few parts. It's that an explanation is still missing.

@Ronan Sorry, I misread part of that followup as a request to allow a few (hard-coded) misspellings.

@Ronan Does this do more of what you're after?

I've added some alternate spellings for the index keys. And your type checks seem ok.

2024-11-22_Q_Projective_Vector_Format_ac_Rc_ac.mw


ps. That is not the only way to do that type. And it's certainly not the most graceful. But I'd like to point out that you can pretty much always use type,satifies to do pretty much any arbitrary predicate check.

Next time could plese use the Branch button right below your previous Question's body?

That automatically inserts cross-reference URLs into both the new and the old Question. It's not so helpful if readers of either Question thread don't know that it's part of a multi-thread discussion.

1 2 3 4 5 6 7 Last Page 1 of 570