dharr

Dr. David Harrington

8812 Reputation

22 Badges

21 years, 115 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@sand15 Thanks for the comments. As a side point I think I found the effect of the ill-conditioning - if I look at the roots of the denominator and numerator polynomials for the [7,9] case, two of the numerator roots are very close to two of the denominator roots, so it is almost equivalent to a [5,7] case.

Also the Statistics package - see the help page ?Statistics,Regression

There is also the Optimization package, but those are in hardware floating point.

Not entirely clear what your specific requirements are.

@salim-barzani I think you are saying you want to keep the ode in G(xi) and not use a specific solution. In many cases the solution to the ode may not be known, but in this case it is just the harmonic oscillator equation, so it seems to be that using the general solution c[1]*exp(h*xi)+c[2]*exp(-h*xi) (or its equivalent sin/cos form) is entirely equivalent to using the ode.

Then from the solved eqs one can select c[1] and c[2] to cover the specific cases you want, sinh, cosh, exp or (with imaginary h) sin, cos, or why not the general solution? In this case the solutions don't depend on c[1], c[2] or h, so any of the solutions works. 

dsolve.mw

@salim-barzani So this new example is different since you want to substitute the second derivative, so that won't resolve first deriavtives, as you found. But if you know the solution, why not just substitute it in earlier?

If you don't want alpha to be zero then don't solve for it. Then you will get the variables you solve for given in terms of alpha, which means alpha can be any value. But maybe you are OK with some interrelationships between the parameters in the ODE. Perhaps just solve without any variable and select out those you want. I think you have to play around here.

Dr.D-thanks.mw

@sand15 I agree with your general point. And yet, there often are solutions to the many equations in few variables that the OP finds. I didn't do any sort of analysis, but I suspect the reason is that the form of F has been chosen after some analysis that ensures there will be a high likelihood (guarantee?) that there will be solutions; evidently not all the equations are independent.

I'm not sure how you generated these equations but some apparently blank characters were strange. I fixed the syntax errors by deleting many blanks and reentering them. Now you need to properly specify the equations.

1. As the error message suggests, you need more pdes.
2. Why no BCS/ICS for X?
3. You want to calculate the derivatives in the table but haven't specified at what X and Z values these are at (X = 0.1? but Z = ?). Add spaces to the table values so we can see the individual numbers.

plume_work.mw

@janhardo There is a simple logic error in kwadratisch__solver_met_plots-_bereik-complex_ver_2_4-11-2025.mw that results in the following error.

GeneralQuadraticSolver(1, 8, 7, 2, 11, 12);

gives

=== SOLVING: x^2+8*x*y+7*y^2+2*x+11*y+12 = 0 ===
Discriminant D = 36
Type: DEGENERATE CASE
   GENERAL FORM: x^2+8*x*y+7*y^2+2*x+11*y+12 = 0
   *** USING MAPLE'S ISOLVE ***
   GENERAL SOLUTION: 

      {x = -28, y = 4}, {x = -6, y = 4}, {x = 2, y = -1}, 

        {x = 4, y = -1}


These are the correct solutions, but this is the hyperbola case and not the degenerate case (as the plot shows).

@janhardo As usual, your AI has based its procedure on mine (basic structure, many variable names the same, and the central key way of finding the symbolic exponents is identical) and it has added a bit, e.g., dealing with different types of exponents separately. I was aware that more tests might have to be done, e.g., what happens if the user passes a list or vector? It might be useful to give some test cases in which its performance is superior; at the moment the test cases give the same result as mine.

However it has misunderstood a bit, which leads to actual wrong results, which IMO is more serious. Try

Collect_ultimate(5*r^a, r);

which incorrectly gives

@Preben Alsholm These are all variations, of course. Side relations (and algsubs) give a different (better?) result for

sqrt(cos(x)-cos(x)^3);
simplify(%,{cos(x)^2=1-sin(x)^2});

whereas subs returns the expression unchanged.

@nm The default postscript driver from the old days does not use color. There is a "cps" driver for color, so the following modification of @sand15's workaround gives a .ps file that has a colored grid when I open it in acrobat pro.

plotsetup(cps, plotoutput = "C:/Users/dharr/Documents/test.ps", plotoptions = noborder):
p:=plot(x^3, x = -8 .. 8, color = "blue",axis=[gridlines=[10,color="red"]]):
g := seq(plot(y, x=-8..8, color=red), y=[seq](-500..500, 100)), seq(plot([[x, -500], [x, 500]], color=red), x=[seq](-8..8, 2)):
plots:-display(p, g);  

I thought to convert the plot to an image file then export the image file, to get around different driver issues. But

p:=plot(x^3, x = -8 .. 8, color = "blue",axis=[gridlines=[10,color="red"]]):
i:=convert(p,Image):
op(2,i);
ImageTools:-Write("C:/Users/dharr/Documents/test.png",i);

from cmaple outputs  1 .. 600, 1 .. 800, 1 .. 3, as the hfarray dimensions, 5662 as the bytes written and a plot with no gridlines. From a worksheet the dimensions are the same but 19684 bytes are written and the gridlines appear. cmaple also ignores the size option in plot, whereas in a worhsheet the image dimensions change according to size. I'm mystified by the interpretation of this.

@JP Howe Copying your commands to Maple.ini in a directory and then starting an existing Maple worksheet in the same directory (by double-clicking on it) successfully finds and runs the Maple.ini commands. packages() shows LinearAlgebra is loaded.

There are several places that Maple.ini can be (see the help page ?worksheet/reference/initialization), and these are searched in a specific order, so you want to check you don't have a left-over one in a higher priority location.

By the way, your time domain expression doesn't seem to correspond to your transformed expression.

restart

u1 := -a*piecewise(t < t0, 0, t >= t0, 1)*(1-exp(-k*(t-t0)))

-a*piecewise(t < t0, 0, t0 <= t, 1)*(1-exp(-k*(t-t0)))

`assuming`([inttrans:-laplace(convert(u1, Heaviside), t, s)], [positive])

-a*exp(-s*t0)*k/((k+s)*s)

u2 := a*piecewise(t < t0, 0, t >= t0, 1)*exp(-k*(t-t0))

a*piecewise(t < t0, 0, t0 <= t, 1)*exp(-k*(t-t0))

`assuming`([inttrans:-laplace(convert(u2, Heaviside), t, s)], [positive])

a*exp(-s*t0)/(k+s)

NULL

Download transfer_fn.mw

This is hard to diagnose without seeing your workheet. Please upload it using the green up-arrow in the Mapleprimes editor, select the file, click upload and the click either insert link or insert content.

@JP Howe I'm happy to help. If evaluating forever, there will be a message "Evaluating..." that replaces "Ready" along the bottom edge of the window. Enjoy Maple 2025.

1 2 3 4 5 6 7 Last Page 1 of 94