acer

32303 Reputation

29 Badges

19 years, 308 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

You've used the terms "mathematically" (incorrect) and "present", but not defined those.

So what precisely is the mathematical meaning of using a structural test here? The has command is a structural query.

Consider the two Maple expressions, I*(a^(1/2))^k and I*a^(k/2), for unassigned and unspecified k. The subexpression a^(1/2) is present structurally in only one of them. For which would you consider a^(1/2) as being mathematically "present"?

ps. Your or of two has calls can be made into a single call,
   has(%,{a^(1/2),a^(-1/2)})
as is documented in the second bullest point of the has Help page.

@Ariathm In a followup comment you wrote, "...because kappa approaches to infinity".

So, given the form of your p__3, why not take kappa=infinity (and implying J=1), so that r=1?

[edit] That is the primary issue in your original Question (with kappa->infinity followup). One can get there by either considering the original form of p__3, or the the form of the RootOf form as dharr solved. After that, numerical regression is very easy.

restart

r := proc () options operator, arrow; 1 end proc

p__eng1 := proc (C__10, C__01, kappa, lambda) options operator, arrow; ((2*C__01*(lambda^2/r(C__10, C__01, kappa, lambda)^(2/3)+2*r(C__10, C__01, kappa, lambda)^(1/3)/lambda)+2*C__10)*lambda^2/r(C__10, C__01, kappa, lambda)^(5/3)-2*C__01*lambda^4/r(C__10, C__01, kappa, lambda)^(7/3)+kappa*(r(C__10, C__01, kappa, lambda)-1)-(1/3)*(2*lambda^2/r(C__10, C__01, kappa, lambda)^(2/3)+4*r(C__10, C__01, kappa, lambda)^(1/3)/lambda)*C__10/r(C__10, C__01, kappa, lambda)-(1/3)*(8*lambda/r(C__10, C__01, kappa, lambda)^(1/3)+4*r(C__10, C__01, kappa, lambda)^(2/3)/lambda^2)*C__01/r(C__10, C__01, kappa, lambda))*r(C__10, C__01, kappa, lambda)/lambda end proc

obj := factor(simplify(p__eng1(C__10, C__01, kappa, lambda)))

(4/3)*(lambda-1)*(lambda^2+lambda+1)*(C__10*lambda+C__01)/lambda^3

Data := ImportMatrix(cat(kernelopts(homedir), "/mapleprimes/mapp/UniaxialTestData-TBUCNT-1.5.csv"))

X := `~`[`+`](Vector(LinearAlgebra[Column](Data, 1)), 1)

Y := Vector(LinearAlgebra[Column](Data, 2))

ans := CodeTools:-Usage(Statistics:-NonlinearFit(obj, X, Y, lambda, parameternames = [C__10, C__01], output = parametervalues, parameterranges = [C__10 = 0 .. 1000, C__01 = 0 .. 1000]))

[C__10 = HFloat(1.3973743901289102), C__01 = HFloat(5.315128152250993)]

plots:-display(plot(`<|>`(X, Y), color = black, style = point), plot(eval(obj, ans), lambda = 1 .. 3, color = blue))

NULL

Download testacc.mw

[edit] It is largely irrelevant here whether you use NonlinearFit or LinearFit for this simplified objective form (which is obviously linear in C__10 and C__01); the resulting rational polynomial solutions from them will correspond when expanded, and the computational time here is very small regardless.

@janhardo Your call,

   FSimp(e3, 15,2, 0 <= u)

does not make sense, given the parameter specification of that section's version of FSimp.

That problematic call is passing 0<=u for the sort_by_complexity parameter of FSimp, which is likely not what you intended. You likely intended it for the assumption parameter, but you omitted arguments for some earlier positional parameters and so it was misplaced.

That parameter specification of FSimp using positional parameters is poor, ie. it's confusing and awkward enough that it even confused its own author. Why not use keyword parameters for options?

Does the GUI lock up for this large output with typesetting=standard, and without any timelimit call?

@Andiguys I you run solve without assumptions you get a parametric result showing conditions under which the simpler forms of the inequality (with isolated target name) attain.

You might figure out whether the conditions for those agree with your assumptions. If not then a single sign/direction of the the simpler isolated inequality might not hold for your given assumptions. I don't know what you'd want in such a case.

Please attach your actual code to reproduce in full.

Your example works smoothly for me using Maple 2022.2 (no initialization file, no extra libraries...).

@mmcdara By the time it gets the `minimize/solve` the problem's been reformulated in exact rationals. However some RootOf's with float-range specifiers can still be generated.

The code-flow is slightly different, but in M2022 it's running into this (fwiw):

allvalues({x = 1/3*RootOf(7*_Z^3-279*_Z^2+2943*_Z-5049,14.92337354 .. 14.92337355), y = 1/3*RootOf(7*_Z^3-279*_Z^2+2943*_Z-5049,14.92337354 .. 14.92337355)},implicit)
Error, (in RootOf/RootOf:-algnum_in_range) invalid input: RootOf/RootOf:-rootof_in_range expects its 1st argument, rt, to be of type 'RootOf'(polynom(rational,_Z),identical(index) = posint), but received RootOf(7*_Z^3-93*_Z^2+327*_Z-187)

The _EnvExplicit=true makes it take a different code-path.

@mmcdara The Question was marked as Maple 2022.

fwiw, one may also use "" the empty string, i.e., a pair of double-quotes.

(I consider it a very slight advantage to use here something which might not be assigned a value.)

@Ronan That's right. I did not suggest placing the "\n" inside capitalized Typeset call.

As I mentioned, the lowercase typeset serves to allow math and text together (without a new comma visibly appearing to separate them). It doesn't even do anything by itself, but plotting commands turns its unevaluated function calls into a slightly differently named plotting substructure that the plot renderers (without added commas or text quote marks).

The "\n" is simply an example of such a string. It just happens to only contain a newline character in this example. Some other example might be, say,

  typeset("The integral is,\n", int(f(x),x=a..b))

In contrast a call Typesetting:-Typeset is one way to turn a name or math expression into a form that renders the same but won't later evaluate to some value. There are other ways to do that, eg. using the documented InertForm:-Display, or the undocumented `tools/gensym` to produce a new local instance of a name.

The lowercase word `typeset` was not a great design choice. It bothers me more that (by itself) it offers no evaluation prevention, and that it's Help page doesn't explain all this.

@Ronan Could you perhaps get some extra vertical spacing using newline characters, ie. with something simple like,

  typeset("\n", gamma2)

or,

  typeset(gamma2, "\n")

(or both above and below), though I'm away from a machine and forget whether the quote marks might show.

@Andiguys Sorry, I don't have time to fix so many worksheets.

I notice that several of your mistakes keep cropping up, despite previous corrections.

I suggest that you strive to properly understand what's been shown so far, so that you can correct most of these problems yourself.

You have,

exact_solution := (t, x_i) -> 2*Pi*p*sum(etan(n)*exp(-n^2*Pi^2*p*t)*n*sin(n*Pi*x), n = 1 .. infinity)/(eta0 + sum(etan(n)*exp(-n^2*Pi^2*p*t)*cos(n*Pi*x), n = 1 .. infinity))

What does the `x` mean in that, inside sin(n*Pi*x) and cos(n*Pi*x) ?

Did you instead intend, say,
   sin(n*Pi*x_i) and cos(n*Pi*x_i)
?

@janhardo 

expr := 2*sin(beta)^2+4*cos(alpha+beta)*sin(alpha)*sin(beta)+cos(2*(alpha+beta));

2*sin(beta)^2+4*cos(alpha+beta)*sin(alpha)*sin(beta)+cos(2*alpha+2*beta)

combine(expr);

cos(2*alpha)

First 32 33 34 35 36 37 38 Last Page 34 of 591