tomleslie

6672 Reputation

17 Badges

10 years, 174 days

MaplePrimes Activity


These are answers submitted by tomleslie

Added an execution group to the bottom of your worksheet. See the attached

corrPrint.mw

 

There are a couple of places in your code where you use the variable 'contants' (Note the spelling) - I'm pretty sure it should be 'constants' every time, since you seem to be referring to the procedure parameters, where the variable name is given as 'constants'

If I make these changes, your worksheet runs, but trips a timelimit in the try-catch statement within the procedure subCreate(). It also generates an error, here: I think because you are trying to evaluate a quantity whihc does not exist (because the try-catch, has timed out without producing the necessary data???)

I haven't tried extending the try-catch timelimit - up to you to assess whether this limit should be tripped or not!

I converted the definition of u() from 2-D math input, and changed the sum() functions to add(). Infinities went away: I assume becuase Maple is no longer looking for 'closed-form' solutions to the sum() command

Output from u(0 is now a function of r, theta,t: so one of these has to be set inorder to produce plots with respect to the other two. A number of possibilities are illustrated in the attached. The final two animations are moderately(?) impressive

WaveEq.mw

About as simple as I can come up with is shown in the attached. The only thing you will have to change is the path to the directory where the data bis to be stored. I have used

D://Users/TomLeslie/myMaple/

as the directory - because this exists on my machine. You will have to chenge this string to some (writable) directory which exists on your machine

wrData.mw

I agree with Preben's remarks on pi/Pi and e/exp. Aalso the fact that you are imposing 3 boundary conditions on a system wich can only accept two. To get round all of these points I strated making a lot of guesses.

This got me to solutions for u(r), v(r), w(r), j(r) and s(r) but not (so far) J(r)

I whether this is what you want/need, but is the best I have been able to do so far

odeProb.mw

Suggested answers so far strike me as a bit 'high risk' since they rely on the factor occurring in all summands of the expression.

If the factor occurs in some (but not all) of the summands, then the posted code will run, but produce incorrect answers

Surely a better approach is to use the freeze/thaw combination, which will generate the correct answer, no matter how many of the summands actual contain the desired factor. See attached

frThaw.mw

The freeze/thaw approach can be used in many such expression manipulations.

I have no idea what this procedure is trying to achieve

However I fixed some syntax errors (and re-indented your code - just so I had some idea what was going on in the middle of this spaghetti). Code no produces no syntax errors. Whether or not it does anything meaningful, I have no idea - but try the attached anyway

Free advice - any procedure which is longer than one screenful is "badly written", if only because of how difficult it is

  1. to understand what it is doing
  2. to debug

badProc.mw.mws

The variable 'H' is not used anywhere in your supplied worksheet, so when you say you want to use different value???....

I have assumed that you mean that you want several values for 'Ha' - of course I could be wrong

It is not completely clear what is the end-point of your calculation. The attached returns the list which is evaluated as 'subs ( solns,convert(E, list))', for various values of 'Ha'

I can't do anything with the secvond part of your worksheet since it depends on the variable 'SOL' which is undefined

HelpFix.mw

 

The way your data is structured makes detecting self-intersection unnecesssarily difficult!

The attached worksheet contains a procedure which generates random walks. Length of walk can be specified, as can return_on_self-intersection

Some examples of the use of this procedure are also supplied

NB I have retained yout turn-right, turn-left etc definitions, although it would have been easier just to use up, down, left, right. The former requires processing the two most recent data points. The latter requires only the most recent data point

rWalk.mw

read filename

will read and execute the statements in a Maple language file (.mpl). No idea what you are hoping to do with the 'cmaple.exe' command - in Windows cmaple issued at a DOS prompt startts a 'command line' version of Maple - no worksheets at all - so I'm assuming you don't want  this!

Check the final execution group in the attached, which initialises and fills a 3-column matrix.

Column1 contains T__1 values (I arbitrarily picked 1..10 - any range/spacing would be trivial to arrange).

Column2 contains T__1s values (I arbitrarily picked 1.5..10.5 - any range/spacing would be trivial to arrange).

Column3 contains the corresponding values of h__1(T__1, T__1s)

matGen.mw

NB I tried a few ways of selecting T__1 and T__1s values, but always ended up with some complex entries in column1. I suggest you try this code with values you consider appropriate for T__1 and T__1s. You may be able to come up with some combination which does not result in complex values for h__1().

Excerpt from the title of you question is

Need to generate the series for T[i]

However your worksheet does not generate a series of values for T[i]!!!!

Since the only place in your worksheet that values fro T[i] are used, is when they are multiplied by Xi, and Xi=0, it doesn't matter that you are not generating them! Any terms involving these unknowns will evaluate to zero!

In the attached, I have made some guesses about what you might be trying to achieve. I suggest you read and think very carefully about the comments in this worksheet

sumSuggest.mw

 

Just because alternatives are good

Assuming that you are using a parametric definition for your 3D curves, then you can use piecewise() definitions for some/all of the components, followed by a single plot:-spacecurve() command.

So an alternative approach for Kitonum's example would be as shown in the attached. NB, many variations on this theme are possiblle!

curve3D.mw

  1. I can't run this in Maple 14, becuase I don't have a version that old
  2. Not sure what you mean by "using DTM and VIM with Pade Approximation" so I ignored this requirement and just used Maple's built-in numeric solvers
  3. Defined as a BVP, everthing *seems* to work provided I define 'infinity' to be around 6 or so
  4. I can get a little further by using the BVP results to convert your problem to an IVP, but this too fails with a singularity around x=7.333

See attached

odeProb.mw

The 'range' argument for odeplot() must come before any optional arguments (eg color)

Also since your boundary conditions are defined at 0 and 1, you will only be able to plot between these points. ie eta=0..1. If you use eta=-1..1, then Maple will issue a warning, and plot from 0 to 1 anyway.

See attached

oodeProb.mw

First 108 109 110 111 112 113 114 Last Page 110 of 138