tomleslie

4477 Reputation

10 Badges

9 years, 95 days

MaplePrimes Activity


These are answers submitted by tomleslie

  1. You should modify the last boundary condition to D[1,1](f)(5)=0

  2. The above will work, but the since you have not indexed the solutions for k, then each solution will overwrite the previous solution, so I suggest you use

R:=Array(1..numelems(L)):
for k  from 1 to numelems(L) do
    R[k]:=dsolve(eval({Eq1,Eq2,Eq3,bcs1},K=L[k]),[f(eta),theta(eta),phi(eta)],numeric,output=listprocedure);
end do:

 

 

Assuming that yuo have the data in an excel spreadsheet (which your question implies) then you can try something like the following

excelImp.mw

which I tested with

testData.xlsx

Obviously you will have to do a bit of "dirPath" and "file" renaming, but something close to the above .mw file should achieve what you want (at least it will, starting from Excel)

Despite what Mathtype claims, it is rather better at exporting equations than importing them.

The best I have come up with so far is to use the MathML[Export] facility in Maple, followed by absolutely standard CTRL-C/CTRL-V to drop the result into a Mathtype window. This works on the limited number of examples I have tried but does produce some error markers in Mathrype which have to be removed manually.

The only reason I can think of for this behaviour is that MathML[Export] in Maple produces "tags" which Mathtype doesn't understand - I can't see any easily see any way round this.

Unusual to want to get to MathType as a "final" destination. If you actually want to get to Word" or a webpage, then the MathML[Export] routine might work better by going directly to the end application, rather than using MathType as an intermediary

If I make a few edits to your worksheet, hopefully without changing your intent, then I can persuade everything to execute properly. However I was not too surprised to find that all the numeric solutions failed at 13/3, because of the "singularity" at this point.

You may be able work around this problem by using the 'events' option. I can't try this today - other commitments

diffsing.mw

I know nothing about Mathematica

When it comes to translating programs between (for example) Maple, Mathematica, Matlab, my defualt position is that yoiu might get about 95% of the code correct, which means none of these translations will work without some human input

Your first problem seems to be that Maple cannot even find the Mathematica file. Two ways to fix this: either use

currentdir(pathToTheDirectoryWhich containsThe.nbFile):
with(MmaTranslator);
FromMmaNotebook( "plot.nb" );

or

with(MmaTranslator);
FromMmaNotebook( "FullPathName/plot.nb" );

When I do this Maple produces no errors or warnings and creates a plot.mw file in the same directory as the plot.nb file. However, if I load this file into Maple it doesn't execute :-( So still more work to do

However just being able to read it in Maple syntax, I can guess what was intended in the original Mathematica file. First issue I see is that this is a system of partial differential equations, but is using dsolve rather than pdsolve for a solution. Changing dsolve to pdsolve still results in an error, which (strangely??) is removed if I delete the numeric option, in which case Maple gives me the analytic solution

At which point with a little massaging, I can get the plot commands to work as well

Frankly for such a simple problem I wouldn't bother trying to convert a Mathematica worksheet and hope that it would work out OK - I'd just enter the original problem in Maple!!!

  1. Need with(plots) somewhere to get access to fieldplot3D and display
  2. The list of eight initial conditions seems to contain the same four initial conditions twice???
  3. In the requested solution range ie DEplot3d(SYS, [x(t), y(t), z(t)], t = -1 .. 1, IC, stepsize = .2, linecolor = blue, axes = boxed) I get no singularities
  4. If I change the range of t for which solution curves are to be generated to DEplot3d(SYS, [x(t), y(t), z(t)], t = -10 .. 10, IC, stepsize = .2, linecolor = blue, axes = boxed), then singularites occur. All of these are to the left of -1, which is why they didn't show up at step(3) above

See the attached worsheet, which is slightly reformatted version of your original

diffSing.mw

Read/execute the attached worksheet - it jut illutrates the methods which have already been supplied by Carl/Kitonum

regFit.mw

 

I'm not 100% sure I understand what you are trying to achieve, but based on my interpretation - try the attached (quick and dirty)

game.mw

I've just executed your worksheet in Maple2015 and all integral evaluate to numerical values: I can't check it in Maple 17 because I don't have that version

By the way it is a bit redundant to use Int() (the inert from of integrate) immediately followed by eval(%), when you could jut use int()

No idea where your displayed error message about Y[9], Y[10] comes from. There is no Y[9], Y[10] in your worksheet - are you sure you executed the restart command??

When I try to run your attached worksheet, I get a different error

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system. After a bit of investigation, I came up with the following

  1. Eq6 uses the variable "l" (rotten font this - I mean the letter after "k" and before "m"), which has not been assigned a numeric value
  2. In your list of boundary conditions you have H(eta)=w, which isn't really a boundary condition! If I change this to H(0)=w, then Maple appears to genrate the necessary procedures for a numeric solution

Generating these procedurs inside a loop and assigning them to p is a bad idea, because the procedures for each value of k, will overwrite those for the previous value of k - suggest you either do these one at a time, or define a k-element, p-array and write the procedures for each k into the appropriate slot

Nothing wrong with Carl's assessment, but his example could also be solved using only lists with something like

restart;
with(plots):
cols:=[red, green, blue, orange, black]:
plotlist:=[ seq(plot(x^k, x = 0..1, color = cols[k]), k = 1..5) ]:
display(plotlist);

Agree with Carl - sooooo many syntax errors

I took a chance, and tried to correct as many as possible - note that in many cases, I'm making an *educated guess* at what you intended, and may have got it wrong somewhere.

With that warning, the attached worksheet supplies plausible-looking results

popMig.mw

If you type ExcelTools[Import]() without giving any arguments, then Maple will fire up an import wizard, which will allow you to navigate to the directory containing the file you want, select the file, and enter other options (sheet, cells etc).

I've just checked both versions (type command with arguments, use the wizard) and both seem to working just fine.

plot3d(1, theta=0..2*Pi, phi=0..Pi, coords=spherical);

Not sure this is going to help much, but here goes

PDEtools:-Solve cannot solve a system, if that system contains an equation in "arbitrary" parameters - in other words one which is completely irrelevant to the variables being solved. For example, as you observe

PDEtools:-Solve(eq3,H[xy])

will work, but add an "arbitrary" equation to this,  such as

PDEtools:-Solve({eq3, a=b+c},H[xy])

and Maple errors.

In the case when you have a system of four equations in six unknowns, and you require a solution for only one variable, then it seems reasonable to suspect that one or more of the equations in the system will be arbitrary.

Note also that when asking for a solution to your system, if you specify four variables, then Maple will generally return a solution, so

PDEtools:-Solve({eq1, eq2, eq3, eq4}, H[xy])

fails, but

PDEtools:-Solve({eq1, eq2, eq3, eq4}, {H[xy],H[tt],H[tx],H[ty]})

succeeds.

I tried a few combinations of four variables and always obtained solutions, although there are 15 possible combinations of four from six variables and I didn't check all of them.

First 98 99 100 101 102 103 Page 100 of 103