pagan

5127 Reputation

23 Badges

16 years, 58 days

 

 

"A map that tried to pin down a sheep trail was just credible,

 but it was an optimistic map that tried to fix a the path made by the wind,

 or a path made across the grass by the shadow of flying birds."

                                                                 - _A Walk through H_, Peter Greenaway

 

MaplePrimes Activity


These are replies submitted by pagan

1) It's a hand-wavy way to consider the dy and the dx as separate symbols. In college students are taught that dy/dx is not merely a fraction in the usual sense, but a notation for a concept of differentiation. But then later on they are shown some slick notational abuses/shoftcuts (eg. implicit differentiation) involving "separation" of those symbols. Because it helps solve some examples.

2) Because we're using 1D input mode.

3) There are an untold number of things one can do with maple and a full programming language. The hard-coded palettes and context-menus can only ever be a small portion of that. (Consider, the palettes have no add, just sum, as one trivial case.) you've asked for something nonstandard, so we're pushing the limits.

You wrote that you followed Joe's way, but really you did a mix. You used diff(F(x),x) while Joe deliberately used just the plain ol' fraction dy/dx where the dy and the dx were no special calculus notation (except in our minds' eye).

As shown in my attempt, the `assume positive` can be replaced with `assume x[1]>0 and x[2]>x[1]`. But in order for the RHS (when containing that proper `diff` you and I both used) to integrate Maple likes know that the integrand is continuous. Unfortunately, the 2D input form does not allow the use of extra options to the `int` command. So you might be stuck with the text form int(...,continuous) for the RHS, although the bit inside that could still be in 2D form.

int_v_dsolve-p.mw

@PatrickT Consider this Comment, which relates to making an image look like a plot by inserting axes, etc.

One place we could go with this is to write a pair of 2D & 3D plot->gif drivers (and optionally expression->gif/plt while bypassing the PLOT/PLOT3D data structures altogether.

It's not just a question of correctness and functionality (like underlaying a plot with a background image). Extra functionality would be very nice, of course. But it's also because the external-file plot->gif and plots->animated/gif drivers are memory hogs.

Another approach is to export a plot as a gif, then import that into maple, then import the background image file, and then to overlay (merge and elementwise replace) the two images, then export again to gif. I have a faint memory of Robert I. doing something like this at one point.

@PatrickT Consider this Comment, which relates to making an image look like a plot by inserting axes, etc.

One place we could go with this is to write a pair of 2D & 3D plot->gif drivers (and optionally expression->gif/plt while bypassing the PLOT/PLOT3D data structures altogether.

It's not just a question of correctness and functionality (like underlaying a plot with a background image). Extra functionality would be very nice, of course. But it's also because the external-file plot->gif and plots->animated/gif drivers are memory hogs.

Another approach is to export a plot as a gif, then import that into maple, then import the background image file, and then to overlay (merge and elementwise replace) the two images, then export again to gif. I have a faint memory of Robert I. doing something like this at one point.

@Markiyan Hirnyk

I was trying to make it be closer to what the poster had in his hand-written note, as opposed to say how Joe had it.

But I see the point.

@Markiyan Hirnyk

I was trying to make it be closer to what the poster had in his hand-written note, as opposed to say how Joe had it.

But I see the point.

@Markiyan Hirnyk I mostly use the commandline interface, and often have no worksheet to upload. It seems more onerous for all parties, to have to upload & download a plaintext .mpl file. But often I have no .mpl file either, just a scrollable terminal window of executed plaintext commands. But I will try to conform to the norm more often on this for posting.

A programming question for the experts: can substitution of valid values of the _Bx and _Zx parameters returned by solve be well automated? Can it be done much better, rather than generating (many) and then sieving out by using the original constraints? What about getassumptions?

Given that 2D Math is acting odd here, maybe it would be simpler first to strip off the tildes in the solution. Using StringTools!?

@Markiyan Hirnyk I mostly use the commandline interface, and often have no worksheet to upload. It seems more onerous for all parties, to have to upload & download a plaintext .mpl file. But often I have no .mpl file either, just a scrollable terminal window of executed plaintext commands. But I will try to conform to the norm more often on this for posting.

A programming question for the experts: can substitution of valid values of the _Bx and _Zx parameters returned by solve be well automated? Can it be done much better, rather than generating (many) and then sieving out by using the original constraints? What about getassumptions?

Given that 2D Math is acting odd here, maybe it would be simpler first to strip off the tildes in the solution. Using StringTools!?

@Markiyan Hirnyk You're not using the same 1D code as what I posted.

Your second uploaded worksheet (with 1D code in it) lacks the trailing tidles on the _B1~ and _Z1~ names used in the 2-argument eval calls.

I'm guessing that you tried right-click context-menu action to convert from 2D to 1D. But that too will not work properly, if you have pasted the posted 1D code in as 2D Math input. It may be just the same 2D Math parser bug at work here.

@Markiyan Hirnyk You're not using the same 1D code as what I posted.

Your second uploaded worksheet (with 1D code in it) lacks the trailing tidles on the _B1~ and _Z1~ names used in the 2-argument eval calls.

I'm guessing that you tried right-click context-menu action to convert from 2D to 1D. But that too will not work properly, if you have pasted the posted 1D code in as 2D Math input. It may be just the same 2D Math parser bug at work here.

@Markiyan Hirnyk The code posted for 2-argument eval to substitute B1~ and Z1~ is problematic in 2D Math input. The trailing tildes are being dismissed by the 2D Math parser.

I posted 1D Maple notation (plaintext) code. It is not always appropriate to paste such into the Standard GUI as 2D Math input. This is an example of that.

1D and 2D Maple are two different programming languages.

@Markiyan Hirnyk The code posted for 2-argument eval to substitute B1~ and Z1~ is problematic in 2D Math input. The trailing tildes are being dismissed by the 2D Math parser.

I posted 1D Maple notation (plaintext) code. It is not always appropriate to paste such into the Standard GUI as 2D Math input. This is an example of that.

1D and 2D Maple are two different programming languages.

@PatrickT That kind of thing is what Doug Harder's "Warnings Powertool" on the Application Center is about.

@PatrickT That kind of thing is what Doug Harder's "Warnings Powertool" on the Application Center is about.

What a great explanation.

I'd like to offer a few alternative lines, if I may. Using Vectors, some of the syntax is terser. The same for using the plot command itself instead of pointplot. And, in this way, the ln command need only be called once and do half the work, instead of 4 times (twice for the pointplot generation, and twice for the CurveFitting).

restart:

qdata := <892.,1012.,1060.,987.,680.,739.,809.,1275.,946.,874.,720.,1096.>:
pdata := <1.23,1.15,1.10,1.20,1.35,1.25,1.28,.99,1.22,1.25,1.30,1.05>:

lnpqdata := ln~( <pdata|qdata> ):

yfit := CurveFitting:-LeastSquares( lnpqdata, xfit );

              yfit := 7.15275353612720 - 1.92731508260193 xfit

plot1 := plot( lnpqdata, style=point ):
plot2 := plot( yfit, xfit = ln(min(pdata)) .. ln(max(pdata)) ):

plots:-display( plot1, plot2, labels = [x=ln(p),y=ln(q)] );

What a great explanation.

I'd like to offer a few alternative lines, if I may. Using Vectors, some of the syntax is terser. The same for using the plot command itself instead of pointplot. And, in this way, the ln command need only be called once and do half the work, instead of 4 times (twice for the pointplot generation, and twice for the CurveFitting).

restart:

qdata := <892.,1012.,1060.,987.,680.,739.,809.,1275.,946.,874.,720.,1096.>:
pdata := <1.23,1.15,1.10,1.20,1.35,1.25,1.28,.99,1.22,1.25,1.30,1.05>:

lnpqdata := ln~( <pdata|qdata> ):

yfit := CurveFitting:-LeastSquares( lnpqdata, xfit );

              yfit := 7.15275353612720 - 1.92731508260193 xfit

plot1 := plot( lnpqdata, style=point ):
plot2 := plot( yfit, xfit = ln(min(pdata)) .. ln(max(pdata)) ):

plots:-display( plot1, plot2, labels = [x=ln(p),y=ln(q)] );

First 15 16 17 18 19 20 21 Last Page 17 of 81