acer

32373 Reputation

29 Badges

19 years, 334 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Alejandro Jakubi That is mostly not applicable in this example, as the components are only used for output and their states/values never needed for computation.

If you object so much to using components, on such general grounds, then you ought to make a post or SCR about it. Mentioning such a very general objection to a very particular solution is, in my opinion, off topic. It is like objecting fundamentally to the internal formats of implicit plot structures just because someone suggested using them to solve some simple example. Your objections are not wrong, but they are so very general that they misplaced here.

@Axel Vogt I agree with Axel.

@Axel Vogt I agree with Axel.

@sabyadg For Maple 15 you could try Preben's routine for resizing all plots in a saved worksheet file, or commands to presize the plot upon insertion. The mechanism for the latter could be improved, but neither would be a perfect solution for exactly what you've described.

There are hints that it might be done more easily, and closer to what you've described, in Maple 17. But I would really like to see a proper user-friendly solution built into the next release of Maple.

@daniel_w_ There is no (global or LinearAlgebra package) command `Inverse` and your call Inverse(P) doesn't do anything, it just returns an unevaluated call to `Inverse` with the very long `P` result as its argument.

That's why it returns so quickly.

What do you plan on doing with the final result? Once you've obtained it, and if it turns out to contain very large symbolic expressions? If you final goal is to evaluate at numeric values then how about instead writing a procedure which admits numeric values for the variables and returns numeric results? Or do you hope to somehow gain qualitative insight into some final lengthy symbolic result?

Do you want to insert a new plot with a particular size, programmatically?

Or do you want to programmatically resize a plot that's already been inserted, and if so then would you be okay with it being in a Plot Component window?

Or do you want to programmatically sweep through a worksheet, setting all plots to a specific size?

Which version are you using?

acer

@verdin The use of execution groups, mentioned in the thread which Alejandro referenced, does sound like it could meet the requirements that you've described so far.

That is to say, large portions of the code which you want executed together might be merged (or, originally, written) in a single execution group. Clicking just once inside such a group will execute that whole group, and when it's finished control is returned. And you can have several such groups.

But you haven't been completely clear about the details of how you wish to operate. For example, you haven't mentioned whether the parts of the code which you want to execute uninterrupted must always run in that way, or whether you want the choice to step through it easily.

Another possibility, which may be appropriate if you have a great deal of code, is to manage the flow control by writing and using procedures. By creating procedures for relevant groups of code you can execute them together and still retain a well-managed work flow. There are several mechanisms for optionally displaying partial results as procedures compute.

@verdin The use of execution groups, mentioned in the thread which Alejandro referenced, does sound like it could meet the requirements that you've described so far.

That is to say, large portions of the code which you want executed together might be merged (or, originally, written) in a single execution group. Clicking on inside such a group will execute just that group, and when its finished control is returned. And you can have several such groups.

But you haven't been completely clear about the details of how you wish to operate. For example, you haven't mentioned whether the parts of the code which you want to execute uninterrupted must always run in that way, or whether you want the choice to step through it easily.

Another possibility, which may be appropriate if you have a great deal of code, is to manage the flow control by writing and using procedures. By creating procedures for relevant groups of code you can execute them together and still retain a well-managed work flow. There are several mechanisms for optionally displaying partial results as procedures compute.

After conversion to LegendreP (and even before separating real and imaginary parts, and with symbolic epsilon assumed nonnegative) does it not fall out that the given integrand is symmetric about theta=Pi/2?

I mean, is this incorrect? (say invalid in the limit...)

restart;
chi:=Pi/2-theta:

Vsi:=-(1/sqrt( 1+epsilon - cos(chi)*cos(phi-Pi/3))
     + 1/sqrt( 1 +epsilon- cos(chi)*cos(phi-Pi))
     + 1/sqrt(1+epsilon-cos(chi)*cos(phi+Pi/3))):

igrand:=Vsi*SphericalY(3,2,theta,phi)
        *conjugate(SphericalY(2,1,theta,phi))*sin(theta):

simplify(convert(igrand-eval(igrand,theta=Pi-theta),LegendreP))
     assuming theta>=0, theta<=Pi, phi>=0, phi<=2*Pi, epsilon>=0;

                               0

acer

After conversion to LegendreP (and even before separating real and imaginary parts, and with symbolic epsilon assumed nonnegative) does it not fall out that the given integrand is symmetric about theta=Pi/2?

I mean, is this incorrect? (say invalid in the limit...)

restart;
chi:=Pi/2-theta:

Vsi:=-(1/sqrt( 1+epsilon - cos(chi)*cos(phi-Pi/3))
     + 1/sqrt( 1 +epsilon- cos(chi)*cos(phi-Pi))
     + 1/sqrt(1+epsilon-cos(chi)*cos(phi+Pi/3))):

igrand:=Vsi*SphericalY(3,2,theta,phi)
        *conjugate(SphericalY(2,1,theta,phi))*sin(theta):

simplify(convert(igrand-eval(igrand,theta=Pi-theta),LegendreP))
     assuming theta>=0, theta<=Pi, phi>=0, phi<=2*Pi, epsilon>=0;

                               0

acer

@Carl Love main menubar Edit -> Startup Code (Ctrl-Shift-E on MS-Win)

That procedure in that worksheet is defined in the Startup Code.

@Carl Love main menubar Edit -> Startup Code (Ctrl-Shift-E on MS-Win)

That procedure in that worksheet is defined in the Startup Code.

@wzelik So, is it the case that now you want to utilise the values assigned to solT4, solT3, and solT2 inside eqT3, eqT2, and eqT1 respectively?

Something like this, perhaps?

   eqT3 := (Tin-T3)*A/(1/hin+g1/lambda1+g2/lambda2) = (T3-solT4)*A*lambda3/g3;
   solT3 := fsolve(eqT3,T3=0..2000);

   eqT2 := (Tin-T2)*A/(1/hin+g1/lambda1) = (T2-solT3)*A*lambda2/g2;
   solT2 := fsolve(eqT2, T2=0..2000);

   eqT1 := (Tin-T1)*A*hin = (T1-solT2)*A*lambda1/g1;
   solT1 := fsolve(eqT1,T1=0..2000);   

I'm not sure whether you goal is to just experiment with embedded components, or to build a final version of some application of your own devising. If it's the latter case then you might want to note that you can isolate the unknown T2 in eqT2, etc. By isolating just once, in advance, you might obtain reusable formulae and so avoid reliance on fsolve (for some particular equations of this example).

@wzelik So, is it the case that now you want to utilise the values assigned to solT4, solT3, and solT2 inside eqT3, eqT2, and eqT1 respectively?

Something like this, perhaps?

   eqT3 := (Tin-T3)*A/(1/hin+g1/lambda1+g2/lambda2) = (T3-solT4)*A*lambda3/g3;
   solT3 := fsolve(eqT3,T3=0..2000);

   eqT2 := (Tin-T2)*A/(1/hin+g1/lambda1) = (T2-solT3)*A*lambda2/g2;
   solT2 := fsolve(eqT2, T2=0..2000);

   eqT1 := (Tin-T1)*A*hin = (T1-solT2)*A*lambda1/g1;
   solT1 := fsolve(eqT1,T1=0..2000);   

I'm not sure whether you goal is to just experiment with embedded components, or to build a final version of some application of your own devising. If it's the latter case then you might want to note that you can isolate the unknown T2 in eqT2, etc. By isolating just once, in advance, you might obtain reusable formulae and so avoid reliance on fsolve (for some particular equations of this example).

@mehdi_mech How can we tell whether your system is stiff, or poorly scaled, or intrinsically difficult, etc, if you do not show it in full or upload it in this thread?

I cannot know in advance whether stiff methods might help for a problem unseen, but enabling them is described on the help pages of dsolve,numeric.

First 370 371 372 373 374 375 376 Last Page 372 of 592