acer

32313 Reputation

29 Badges

19 years, 312 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

On a related note, in Maple 2020 (but not earlier) I can get the following,

solve(x*ln(x)=ln(1/2*2^(1/2)));

       1/2, 1/4

I mention that because Maple 2023 (and Maple 2018.2) can get the following,

eq := x^x=1/sqrt(2);

x^x = (1/2)*2^(1/2)

solve( map(log[x], eq) );

1/2, 1/4

Download solve_lgx.mw  (That also attains if some condition like x>0 is included...)

Did you delete an earlier version of this Question (from about Dec 23rd?)

That earlier Question of yours had this worksheet, with problematic usage: streamline_Help.mw

And my Answer worksheet was: streamline_Help_ac.mw. I had to guess at figuring out what you might have meant, in the presence of muddle and very little expanation, about the intended roles of names eta and x.

You eventually attached to that Question thread the exact same worksheet as you've attached here. Unfortunately the explanation of what you intended related to x=0 was still unclear.

The intent is not made any clearer to me merely by your repeating it.

@emendes Your newly described, additional problem with width and formatting seems like a different matter.

The code in my Answer is just a programmatic approach to the originally described page-break issue. That's not going to do anything for width&line-breaking (if data in some row is too wide, at default).

It's possible to construct&embed such a data collection by forcing a smaller font size, so that all the entries in any row can fit in a standard page width if printing/exporting in portrait mode. (Is print-to-file in landscape an option?)

But maybe you could attach your actual worksheet, so that we might test ideas without guesswork or back-and-forth?

@Carl Love I'd interpreted that sentence by the OP as being a well-intentioned comment to provide extra detail. The OP might not be aware that the static export Tabulate of a DataFrame does nothing more than pass along arguments to DocumentTools:-Tabulate.
 

Side note: Does anyone think that DocumentTools:-Tabulate should be made into a top-level command? Does the user-friendliness outweigh robbing it from the global name-space? I see more people here use Tabulate than the command dataplot (added as top-level in 2015).

Please put your followups here, instead of spawning yet more separate new Question threads for this.

@Nicole Sharp Please don't spawn a wholly separate new Question/Post thread for this.

I will submitting a bug report: combine(...,units) pulls the units into Quantity, and convert(...,unit_free) and combine(...,unit) together cannot pull such out so as to cancel, etc.

But it is not helpful to split the topic and details.

(I have deleted that, using a delete-as-duplicate facility.)

@sand15 One can use the numframes option of Explore for that, yes.

Eg,  numframes=300  will make it run slower, at a finer granularity.

(Also, the checkboxes can toggle on/off the animation of either parameter. There are other Explore calling sequences, eg. to have any parameter not have such a toggle, or to flip on recording of the frames, etc.)

An example with recording (after the exploration gets played):
Explore_anim_ex2.mw

@Carl Love Is it the case that the assumptions might be passed to the call, here, rather than being baked into the procedure?

restart;

 

Simp:= (q::`=`)-> local e:= factor((lhs-rhs)(q));
    `if`(e::`*`, remove(f-> is(f<>0), e), e) = 0
:

 

eq:= diff(v(x),x,x)*exp(x^2) = 0;

(diff(diff(v(x), x), x))*exp(x^2) = 0

Simp(eq) assuming real;

diff(diff(v(x), x), x) = 0

eq2:= diff(v(x),x,x)*exp(abs(x)) = 0;

(diff(diff(v(x), x), x))*exp(abs(x)) = 0

Simp(eq2);

diff(diff(v(x), x), x) = 0

Download simpprodzero.mw

@dharr Your approach may be modified for 2D Input,

restart

M := Matrix(4, 3, {(1, 1) = 34, (1, 2) = 67, (1, 3) = 1, (2, 1) = 35, (2, 2) = 80, (2, 3) = 1, (3, 1) = 45, (3, 2) = 45, (3, 3) = 2, (4, 1) = 56, (4, 2) = 99, (4, 3) = 2})

Search column 3 for values 2 and return corresponding rows

M[[seq(`if`(M[i, 3] = 2, i, NULL), i = 1 .. upperbound(M)[1])]]

Matrix(%id = 36893627990679325620)

Search row 3 for values 45 and return corresponding columns

M[() .. (), [seq(`if`(M[3, i] = 45, i, NULL), i = 1 .. upperbound(M)[2])]]

Matrix(%id = 36893627990679308516)

Download search_2d.mw

The behavioral difference you show is not due specifically to Specialize, but rather to the fact that you're using distinct random variables (albeit with common distribution).

restart

with(Statistics):

 

X := RandomVariable(Normal(-3, 1)):
Y1 := RandomVariable(Normal(3, 1)):
Y2 := RandomVariable(Normal(3, 1)):
B1 := RandomVariable(Bernoulli(1/2)):
B2 := RandomVariable(Bernoulli(1/2)):

Mix2 := B1*X + (1-B2)*Y1;

_R2*_R+(1-_R3)*_R0

Variance(Mix2);
Histogram(Sample(Mix2, 10^4), size=[300,200])

11/2

 

Mix1 := B1*(X - Y1) + Y2;

_R2*(_R-_R0)+_R1

Variance(Mix1);
Histogram(Sample(Mix1, 10^4), size=[300,200])

11

 

Download Specialize_ac.mw

I have deleted a duplicate of this Question thread.

In future please put your followup queries for this in Replies here, instead of spawning wholly separate new Question threads for such.

If you want to plot a compound expression involving the functions in the S1 solution you can use the same technique as you've already been shown in the prior Answer below. For example,

   expr := u[0](y) + varepsilon*exp(`&omega;t`)*u[1](y);
   odeplot(S1,[y,eval(expr, parameters)],0..inf);

New_2_ac2.mw

If you need a re-usable procedure which you can call for numeric y-values (outside of odeplot, say), then you could do something like this: New_2_ac.mw

@fnavarro This problematic example has been reported on the Maplesoft Beta forum and entered into the bug database.

Preben, if I'm not mistaken then in Maple 2023.2 the following causes the plot command to behave as if adaptive=true were default; ie. avoid adaptive=geometric unless it is explicitly supplied as option.

   _EnvUsePlotThing := false:

I mention it because IIRC you previously had some interest in an override, eg. something that could go in a personal initialization file.

(I found that environment variable set in the source of `plots/animate`, I suppose for construction speed.)

@WD0HHU AFAIK there is no property of a slider (even hidden) which controls the size of the font of the mark values on a Slider.

@dharr I agree it's special (only three distinct roots), but I'm not sure how far the coincidence runs. I was wondering whether any of the special-ness relates to allvalues(u1) going awry.

(Also, it isn't clear to me whether the OP's image is complete or chopped, nor why/how the OP might consider the root in the image to be The One.)

For interest,

restart;

u1 := RootOf(4*_Z^2 + (4*RootOf(60*_Z^3 - 60*_Z^2 + 15*_Z - 1) - 4)*_Z
             + 4*RootOf(60*_Z^3 - 60*_Z^2 + 15*_Z - 1)^2
             - 4*RootOf(60*_Z^3 - 60*_Z^2 + 15*_Z - 1) + 1):

 

evalc([solve(evala(Minpoly(u1, x)), x)]);

[(1/3)*cos((1/3)*arctan(3/4))+1/3, -(1/6)*cos((1/3)*arctan(3/4))+1/3-(1/6)*3^(1/2)*sin((1/3)*arctan(3/4)), -(1/6)*cos((1/3)*arctan(3/4))+1/3+(1/6)*3^(1/2)*sin((1/3)*arctan(3/4))]

evalf(%);

[.6590276223, .1090390090, .2319333686]

 

p := evala(Minpoly(u1, x));

x^3-x^2+(1/4)*x-1/60

solve(p, x, explicit=false); # that friend

RootOf(60*_Z^3-60*_Z^2+15*_Z-1)

Download RO_exB.mw

First 50 51 52 53 54 55 56 Last Page 52 of 591