acer

33141 Reputation

29 Badges

20 years, 189 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

Fwiw, you could also do that with the command,

    Matrix(9, (i, j) -> ifactor(j*i))

There is no attachment.

Note the a substitution involving, say,   sec(I*x)  would get turned back into the sech form upon an evaluation.

It should be possible to do a substitution by the "inert"  %sec, etc, but it's not clear whether that would help you; it depends on what further symbolic manipulation/solving you'd want to do with it remaining (or not!) in that form.

nb. There are three patterns, for the collection of relevent functions, with/without additional factors of I&-I. But there's little point in coding up the substitutions if the %-forms won't serve you adequately. So, it really might make a big difference what you need to do with it subsequently. Note the simplify as well as value could also revert them.

@EdmondR Does this edit of your first .flow file do any better, or does it open all blank?

Statik_ac01.zip

(There seems to be a corrupted `MapleFlow-Image` substructure in your first file, which I've removed; if we're lucky then that is enough to make the rest of the document accessible.)

And here's an edited version of your second .flow file (again, with a corrupted `MapleFlow-Image` substructure removed):

Statik_ac02.zip

@EdmondR I don't think that this site like files with file-name extension .flow , which is why I suggest to first zip up the file. That is, the compress them into .zip file(s).

If you Upload that file in the Editor of this site, using the green up-arrow in its toolbar, then you also have to choose Insert Link before closing the popup.

Are the sizes of the files zero bytes as stored in the OS, or is it just that no contents at all appear when opened in the program? (Do you still have them? Could they be zipped up and attached here?)

Is this just Maple Flow, or are you also using Maple with issues?

Do you have a non-English internationalization in use here (language pack)?

@FDS_ERT You didn't actually answer any of my particular queries, which I suspect may be key to answering better. Also, details are absent of what it would mean to "clean up" this file.

Parts of your .txt file have 5 columns of float data per line, and parts have only 3 (or 1).

How do you want that imported?

Do you want such differing blocks to be imported into separate Matrices? Or into a single Matrix, with fill-in?

This seems like of one those situations for which a proper specification of the goal would be better.

@nm What do you think of the following, using your sol_1:

odetest(simplify(sol_1),[ode,IC]) assuming t>Pi/2, t<Pi;

  [0, 0, 1/2*Pi]

Issues can also arise if you take other (different) directional limits.

Why do you believe that choosing any arbitrary direction (to approach [0,0] in limit) is valid, even in this context of odes? Do you believe that your two odetest calls above demonstrate a sound and robust approach, ather than your getting lucky?

The answer to your multivariate limit example is undefined, and not the expression you obtained by taking the limits separately.

Consider your approach of taking limits wrt single variables separately. Which do you do first?

eval(limit(limit(sol, _C3=0), _C4=0), t=3*Pi/4);

  -1/16*Pi*2^(1/2)

eval(limit(limit(sol, _C4=0), _C3=0), t=3*Pi/4);

  3/16*Pi*2^(1/2)

Also, consider the limit as _C3 and _C4 approach zero along the line _C4=3*_C3 (ie. after doing a substitution). And now along _C4=7*_C3.  Evaluate as t=3*Pi/4. Those produce different results. See also here.

Now, you might have some other purpose in mind, that you didn't state in your original Question. And that might not even need a correct result for the multvariate limit computation. If that's the case then your Question would be better if it stated its purpose.

@C_R In Maple 2025 the substitution of the Intat within the RootOf might be handled slightly differently. (Below I do eval(subs(...)) but one could also do it with subs[eval] .

And the contents of the RootOf may become the simpler 2*cos(_Z)  rather than the equivalent 4*cos(1/2*_Z)^2-2 .

And then the result from allvalues might become simpler, with fewer _Zn parameters with integer assumptions.  The loop isn't really necessary, with the single _Zn parameter and the formula like Pi*(1/2+_Z1) , since I realize that you can directly imagine the concrete values, but I left it in.

nb. I did not change the sign in this author's Eq.1. I've just re-enabled the flow for your version.

Download Not_Only_Pi_ac2025.mw
or, for M2015 by prodding it for that cos simplification (again, without changing the initial sign),
Not_Only_Pi_ac2015.mw

@C_R Please could you give (here) that "integrating twice" bit, but in 1D plaintext Maple code and without any Equation labels?

@janhardo The axis of rotation is the line that passes through [1,1,1] and [2,2,2].

See the Help page for the rotate command, which explains the calling sequence rotate(Cube,phi,[c]) with the bullet-point and sentence,

   "If the calling sequence is of the form rotate(q, alpha, [pt_3d_1, pt_3d_2]),
    then pt_3d_1 and pt_3d_2 define the axis of rotation.
"

You wrote, "...and I must copy and convert each one individually into LaTeX".

The latex command in your Maple 2024 has several options related to directly writing (or appending!) to external files.

And you also have another choice: using the latex command to generate seperate strings of each expression's LaTeX code, and then sprintf'ing that to an external file.

And it's reasonably straightforward to map that latex command across a list of solutions. There is no need to "...copy and convert each one individually".

You've omitted important details of your desired output format. Is it one text file, or several? If it's multiple files, do you want to specify a common part of filenames (like a prefix)? Do you want the text file to include preamble LaTeX likes like \documentclass{}, \begin{document} etc. You should explain precisely the format you want.

Having Maple's own GUI do all the items in your bullet points doesn't sound like a good way to spend resources, since one can write Maple code to do all that in a 1-10 line procedure.

@elemental cinder Please check for mistakes in this attachment, including transcription errors. I think there are some improvements (ie. re-use of values from previous result without cut&paste, less floats where possible/reasonable, etc).

It's not clear how N(r) could attain a purely real value of 66.6 for some r>0.

I didn't check that the symbolic integration step is producing the right result(s) here. That step can take a while (1-2mins in my Maple 2025). I might get time to check its validity against a purely floating-point numeric integrator (for concrete numeric input).

This forum doesn't render all the 2D Input lines below. The essense of the later plots is that N(r) is non-real for r>1/4, and greater than 500 for 0<r<1/4 .

ps. I used Maple 2024.2, as I find 2D Input mode in M2025/2026 more awkward. Pls let me know if these same results don't attain in your Maple 2025.

restart

"h(x):=sqrt(25-(x-4)^(2)):"NULL

x__1 := 4+5

`V__!1` := Pi*(int(h(x)^2, x = 0 .. x__1)) = 162*PiNULL

"cp(x):=5-sqrt(1-(x-1)^(2)):"

sols0 := [solve(h(x) = cp(x))] = [1, 32/17]NULL

x__h_1 := sols0[1]

1

x__h_2 := sols0[2]

32/17

`V__!2` := Pi*(int(h(x), x = x__h_1 .. x__h_2))-Pi*(int(cp(x), x = x__h_1 .. x__h_2)) = Pi*(348/289+(25/2)*arcsin(3/5)-(25/2)*arcsin(36/85))-Pi*(1215/289-(1/2)*arcsin(15/17))NULL

NULL

evalf(`V__!2`)

.36901057

NULL

"`cp1__up`(x):=sqrt(25/(100) r-(x-25/(10))^(2))+2:"

"`cp1__down`(x):=2-sqrt(25/(100) r-(x-25/(10))^(2)):"

x__2 := 25*(1/10)-r

5/2-r

x__3 := 25*(1/10)+r

5/2+r

`V__!3` := `assuming`([simplify(Pi*(int(cp1__up(x), x = x__2 .. x__3))-Pi*(int(cp1__down(x), x = x__2 .. x__3)))], [r > 0])

Pi*(r*(-4*r^2+r)^(1/2)+(1/2)*r*arctan(2*r/(-4*r^2+r)^(1/2))+2*piecewise(And(-r < -(1/2)*r^(1/2), -(1/2)*r^(1/2) < r), (1/8)*r*Pi, 0)+2*piecewise(And(-r < (1/2)*r^(1/2), (1/2)*r^(1/2) < r), (1/8)*r*Pi, 0))

"f(x):=(9/(10)+log[10](x-4))*r:"

"g(x):=(2*(1-(e)^(x-(10)/(3)*r))r)/(3):"``

T := unapply('fsolve(eval(f(x)/:-r = g(x)/:-r, :-r = R), x)', R, numeric)NULL

x__fg := T(2)

4.490892617

sols := [solve(f(x) = 0)] = [{r = r, x = (1/10)*10^(1/10)+4}, {r = 0, x = x}]NULL

evalf(sols)

[{r = r, x = 4.125892541}, {r = 0., x = x}]

x__f0 := eval(x, sols[1]) = (1/10)*10^(1/10)+4NULL

sols2 := [solve(g(x) = 0)] = [{r = 0, x = x}, {r = r, x = (10/3)*r}]NULL

x__g0 := eval(x, sols2[2]) = (10/3)*rNULL

`V__!4` := Pi*(int(f(x)^2, x = x__f0 .. x__fg))+Pi*(int(g(x)^2, x = x__fg .. x__g0)) =
.1795453606*r^2+Pi*(-.2222222222*r^2*exp(8.981785234-6.666666666*r)+.8888888888*r^2*exp(4.490892617-3.333333333*r)-.4444444444*r^2*ln(exp(4.490892617-3.333333333*r))-(2/3)*r^2)
NULL

"N(r):=`V__!1`-`V__!2`-`V__!3`-`V__!4`"

proc (r) options operator, arrow, function_assign; `V__!1`-`V__!2`-`V__!3`-`V__!4` end proc

I don't see how N(r) can attain a value of 66.6
as it appears to only be real-valued in the range r=0..1/4,
and never less than 500.


NULLNULL

NULL 

 

plot(N(r), r = 0 .. .3)

``

alt := N(r); `assuming`([simplify(convert(%, rational))], [r > 0, r < 1/4])

-(1/2)*r*arctan(2*r^(1/2)/(-4*r+1)^(1/2))*Pi-(8/9)*Pi*r^2*exp(49557/11035-(10/3)*r)+(2/9)*Pi*r^2*exp(94183/10486-(20/3)*r)-r^(3/2)*(-4*r+1)^(1/2)*Pi-(1/2)*arcsin(15/17)*Pi+(25/2)*arcsin(36/85)*Pi-(25/2)*arcsin(3/5)*Pi+(1/297945)*(-441400*r^3+793314*r^2+49160925)*Pi-(39089/217711)*r^2

plot(alt, r = 0. .. .4, thickness = 4, size = [500, 200])

plot(Im(alt), r = 0 .. .3, thickness = 4, size = [500, 200])

plot(([Re, Im])(N(r)), r = 0 .. 6)

NULL

Download MATHprobwithV_ac.mw

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