dharr

Dr. David Harrington

9097 Reputation

22 Badges

21 years, 229 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

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.

@Alfred_F I made some updates since you replied, so you may wish to download the new files. algadd now properly deals with the infinity point. I assumed you were looking for integer solutions, which is a fun application, but if you are happy with the general case of rational solutions, the transformation can be simplified slightly as noted in a comment in the Elliptic2 file.

p.s. I am dharr, not dharr 8722, the number is just my reputation, which changes over time.

@salim-barzani Yes, I saw you substituted alpha with beta in pde1 to get pde. But you are only testing if you found a solution to pde. If you find it is a solution to pde, you have solved a special case of pde1 where alpha and beta are equal. But you aren't testing pde1 so I dont understand what you expect or what you think is wrong.

@JP Howe So it is a version issue. It is not clear to me what "hangs" means. Sometimes when hitting "enter" on an input region nothing happens - the solution to that can be to run the whole worksheet using the !!! icon. Or deleting that region and reentering it.
Hangs could mean just evaluating forever?
Or perhaps Maple freezes up and has to be killed from the OS?

For that integral, Maple uses the VectorCalculus package, which is not necessary. VectorCalculus redefines many common operations (like int), so I would not load that package unless you really need it. Try deleting the with(VectorCalculus) line.

A couple of tips:

To find the length of a vector, you can use numelems() rather than MTM:-size().

You have a loop to set the small values in a vector to zero. Maple's fnormal() command can do this (on the whole vector or on a number).

@JP Howe Here is the way it looks:

Rev00G_2025-11-16_dharr.mw

@JP Howe In Maple 2025.1, I can execute the document with the !!! icon and it completes successfully to the end, producing 4 plots.

@salim-barzani I do not understand what you are saying. I changed parameters and functions to better values and still the result is zero. Perhaps the full pdetest is just too hard for Maple.

C-find.mw

@JP Howe No uploaded file. Use the green up-arrow, choose the file, click "upload" and then click "insert link".

@salim-barzani So for some parameter and function values, it solves the pde. If you found ans was not zero you would know you had made a mistake. To be more certain you could try more parameter options, but you should use random values like 0.27 and not values like 1 that might be special. If you didn't have functions and just numerical parameters then after multiples sets of random parameters you can be relatively certain the answer is right.

The functions are the main problem here since they have to be simple enough for the integration, but t->t is probably too simple.

@salim-barzani 

1. I had an extra parenthesis.

2. You cannot set values for the independent variables x,y,z or t.

3. The integral signs are in a gray color, meaning they are inert, so you need value.

p-test_(2).mw

@Math-dashti The condition in red is the same as that after Eq (9) in your original post (transferred to some other variable names), so it should be correct. If you simplify it, it is Omega(xi)*(expression of constants);

You have a habit of changing the names of variables so they don't match the papers you upload; perhaps to discourage people from answering questions. So perhaps that is true here, and the condition here would be zero with consistent naming. Or it is conservative only if this condition is met. Or that theory doesn't apply to the type of ode you are looking at. In any case, not a Maple issue.

Edit: I see in the paper alpha[1] is a function of k, so you shouldn't have both apha[1] and k in the above expression - if you fix that it should work. I didn't think it was even that paper since you changed phi and y to omega and V.

Your ode is only first order in Omega(xi), so converting it to a first-order system doesn't do anything. If you change it to second order, it works.

make_system.mw

@Math-dashti Maple has a habit of squaring both sides of an equation, which can lead to invalid solutions. It seems that there might not be a solution for the 6 variables you chose

restart

Eqs written as expressions equal to zero.

eq1 := S__1-sqrt((-beta[1]+sqrt(4*k^2*p*beta[2]+4*w*beta[2]+beta[1]^2))/beta[2]); eq2 := S__2-(1/2)*sqrt(-(2*(beta[1]+sqrt(4*k^2*p*beta[2]+4*w*beta[2]+beta[1]^2)))/beta[2]); eq3 := S__3-sqrt(2)*sqrt(chi*(4*chi^2*k^2*p+4*chi^2*w+2*chi*p*beta[1]-p^2*beta[2]))/(4*chi); eq4 := T__1-sqrt(-2*chi*p)/(2*chi)

Equations - note we can't have beta[2] or chi zero

eqs := {eq1, eq2, eq3, eq4}

{S__1-((-beta[1]+(4*k^2*p*beta[2]+4*w*beta[2]+beta[1]^2)^(1/2))/beta[2])^(1/2), S__2-(1/2)*(-2*(beta[1]+(4*k^2*p*beta[2]+4*w*beta[2]+beta[1]^2)^(1/2))/beta[2])^(1/2), S__3-(1/4)*2^(1/2)*(chi*(4*chi^2*k^2*p+4*chi^2*w+2*chi*p*beta[1]-p^2*beta[2]))^(1/2)/chi, T__1-(1/2)*(-2*chi*p)^(1/2)/chi}

indets(eqs, name)

{S__1, S__2, S__3, T__1, chi, k, p, w, beta[1], beta[2]}

See if there is a solution for 6 chosen variables in terms of the others - yes, one solution with beta[2] and k as free parameters.

sol := solve(eqs, {chi, k, p, w, beta[1], beta[2]})

{chi = -4*S__3^2/(beta[2]*(S__1^2*S__2^2-S__1^2*T__1^2-2*S__2^2*T__1^2+2*T__1^4)), k = k, p = 8*T__1^2*S__3^2/(beta[2]*(S__1^2*S__2^2-S__1^2*T__1^2-2*S__2^2*T__1^2+2*T__1^4)), w = -(1/2)*(S__1^4*S__2^4*beta[2]^2-S__1^4*S__2^2*T__1^2*beta[2]^2-2*S__1^2*S__2^4*T__1^2*beta[2]^2+2*S__1^2*S__2^2*T__1^4*beta[2]^2+16*S__3^2*T__1^2*k^2)/(beta[2]*(S__1^2*S__2^2-S__1^2*T__1^2-2*S__2^2*T__1^2+2*T__1^4)), beta[1] = -(1/2)*S__1^2*beta[2]-S__2^2*beta[2], beta[2] = beta[2]}

Check that they are solutions - not immediately zero unless S3 and T1 are zero. But S3 = 0 makes chi=0, which is a problem

simplify(eval(eqs, sol), symbolic)

{0, 2*S__3, 2*T__1}

Can we put over common denominator and take the numerator - now chi is not in the denominator

eqs2 := map(`@`(numer, normal), eqs)

{S__1-((-beta[1]+(4*k^2*p*beta[2]+4*w*beta[2]+beta[1]^2)^(1/2))/beta[2])^(1/2), 2*S__2-(-2*(beta[1]+(4*k^2*p*beta[2]+4*w*beta[2]+beta[1]^2)^(1/2))/beta[2])^(1/2), -2^(1/2)*(chi*(4*chi^2*k^2*p+4*chi^2*w+2*chi*p*beta[1]-p^2*beta[2]))^(1/2)+4*S__3*chi, 2*T__1*chi-(-2*chi*p)^(1/2)}

We get the same solution as before and a new one, which solves the new equations but not the originals

sol2 := [solve(eqs2, {chi, k, p, w, beta[1], beta[2]})]

[{chi = 0, k = k, p = p, w = -(1/2)*S__1^2*S__2^2*beta[2]-p*k^2, beta[1] = -(1/2)*S__1^2*beta[2]-S__2^2*beta[2], beta[2] = beta[2]}, {chi = -4*S__3^2/(beta[2]*(S__1^2*S__2^2-S__1^2*T__1^2-2*S__2^2*T__1^2+2*T__1^4)), k = k, p = 8*T__1^2*S__3^2/(beta[2]*(S__1^2*S__2^2-S__1^2*T__1^2-2*S__2^2*T__1^2+2*T__1^4)), w = -(1/2)*(S__1^4*S__2^4*beta[2]^2-S__1^4*S__2^2*T__1^2*beta[2]^2-2*S__1^2*S__2^4*T__1^2*beta[2]^2+2*S__1^2*S__2^2*T__1^4*beta[2]^2+16*S__3^2*T__1^2*k^2)/(beta[2]*(S__1^2*S__2^2-S__1^2*T__1^2-2*S__2^2*T__1^2+2*T__1^4)), beta[1] = -(1/2)*S__1^2*beta[2]-S__2^2*beta[2], beta[2] = beta[2]}]

sol2[1]

{chi = 0, k = k, p = p, w = -(1/2)*S__1^2*S__2^2*beta[2]-p*k^2, beta[1] = -(1/2)*S__1^2*beta[2]-S__2^2*beta[2], beta[2] = beta[2]}

Put values in

params := {S__1 = 1, S__2 = -1, S__3 = 0, T__1 = 0}; A := eval(sol, params)

{S__1 = 1, S__2 = -1, S__3 = 0, T__1 = 0}

{chi = 0, k = k, p = 0, w = -(1/2)*beta[2], beta[1] = -(3/2)*beta[2], beta[2] = beta[2]}

Choose values for the free parameters

free := {k = 1, beta[2] = 1}

{k = 1, beta[2] = 1}

A11 := `union`(eval(A, free), free)

{1 = 1, chi = 0, k = 1, p = 0, w = -1/2, beta[1] = -3/2, beta[2] = 1}

Check solution to eqs2 - no division by zero but still not valid

simplify(eval(eqs2, `union`(A11, params)))

{0, -2-2^(1/2), 1-2^(1/2)}

NULL

 

NULL

Download find-p1.mw

5 6 7 8 9 10 11 Last Page 7 of 99