nm

11413 Reputation

20 Badges

13 years, 71 days

MaplePrimes Activity


These are replies submitted by nm

I've seen this error before myself few times. Not many, may be dozen times over the years.

I could never figure where it comes from. 

If I am reading this right, your ode (which you called pde2), which is equation (7) is second order non-linear ode, right? 

But the solution you are trying to verify (eq (8)) has only one constant of integration c__1, right?

But there should be two constants of integrations, since second order.

@Christian Wolinski 

without the wait, it seems to hang. Did it work for you? Here is a work sheet. Nothing happens, and I when hit restart, nothing happens. It seems to be stuck inside thread. Added print after calling dsolve and nothing is printed.

I think Wait is needed to wait for threads, otherwise how does one know they are finished?

I have to close the whole worksheet to run it again. You can try this and see if you get better result. I am on windows 10.

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

restart;

g_list:=[sin(t)*diff(x(t),t$2)+cos(t)*diff(x(t),t)+2*x(t)=0,
         diff(y(x),x)=lambda*sin(lambda*x)*y(x)^2+a*cos(lambda*x)^n*y(x)-a*cos(lambda*x)^(n-1)]:

work_func:=proc(i::posint)  
  local sol;
  print("i=",i);
  sol:=dsolve(g_list[i]);
  print("sol is ",sol);
end proc:

Threads:-Seq( Threads:-Create( work_func(i)), i=1..2) ;

"i=", 2

"i=", 1

24, 25

1+1; #no answer

 

 

Download thread_seq.mw

@salim-barzani 

Yes, that is correct. So solution in (17) is not general solution, since epsilon is constant of integration.

This means only for specific initial conditions solution (17) verifies.

Your paper should really have said so.

@salim-barzani 

The solution you are trying to verify against the ode has term epsilon.

This term does not exist in the ode itself.  Where did this epsilon come from? Is this meant to be the constant of integration?  If so, then Maple says the solution given does not verify the ode since odetest does not give zero. worksheet below.

May be you can ask the author how they obtained this solution they show, may be they made some other assumptions to obtain this solution as Maple can't verify it.

restart;

ode:=diff(Z(x),x)^2=a*Z(x)^2+b*Z(x)^3+c*Z(x)^4;

(diff(Z(x), x))^2 = a*Z(x)^2+b*Z(x)^3+c*Z(x)^4

bookSol := Z(x)= (-a*b*sech(sqrt(a)/2*x)^2/(b^2 - a*c*(1 + _C1 *tanh(sqrt(a)/2*x))^2))

Z(x) = -a*b*sech((1/2)*a^(1/2)*x)^2/(b^2-a*c*(1+_C1*tanh((1/2)*a^(1/2)*x))^2)

the_residue:=odetest(bookSol,ode) assuming a>0;

8*a^4*b^2*c*(c__1^4*a*c*cosh(a^(1/2)*x)+2*c__1^3*a*c*sinh(a^(1/2)*x)-c__1^4*a*c-c__1^2*b^2*cosh(a^(1/2)*x)-2*c__1*a*c*sinh(a^(1/2)*x)+2*c__1^2*a*c+c__1^2*b^2-a*c*cosh(a^(1/2)*x)+b^2*cosh(a^(1/2)*x)-a*c-b^2)/(c__1^2*a*c*cosh(a^(1/2)*x)+2*c__1*a*c*sinh(a^(1/2)*x)-c__1^2*a*c+a*c*cosh(a^(1/2)*x)-b^2*cosh(a^(1/2)*x)+a*c-b^2)^4

#we see the above residue is not zero using some random values

plot(eval(the_residue,[a=1,b=2,c=3,_C1=4]),x=-4..4)

 


But trying few values, it seems the residuce is zero for x>1. 

So it is possible this solution is valid only for x>1 but can not be sure about this as I only tried few random values.

Download dec_24_2024.mw

First of all, you do not have equation. An equation must have = in it. 

To solve your quadratic equation do

solve(x^2-4=0,x)

I can't easily read or understand what you wrote after Eq (3). But this below gets you equation (3).

restart;

pde:=diff(u(x,t),t$2)-diff(u(x,t),x$2)+diff(u(x,t),t)+alpha*u(x,t)+beta*u(x,t)^3=0;

diff(diff(u(x, t), t), t)-(diff(diff(u(x, t), x), x))+diff(u(x, t), t)+alpha*u(x, t)+beta*u(x, t)^3 = 0

tr:={u(x,t)=f(zeta),PDEtools:-Solve(zeta=x-c*t,t)}

{t = (x-zeta)/c, u(x, t) = f(zeta)}

PDEtools:-dchange(tr,pde,[f(zeta),zeta])

(diff(diff(f(zeta), zeta), zeta))*c^2-(diff(f(zeta), zeta))*c+alpha*f(zeta)+beta*f(zeta)^3 = 0

 

 

Download eq_3_dec_17_2024.mw

fyi, same in 2024.2

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

restart;

is(abs(x)=max(x,-x)) assuming real;

FAIL

 

 

Download v_2024_2.mw

@sursumCorda 

"since solve ignores assumptions on the variables for which it is solving"

Well,  Help says In most cases, solve ignores assumptions on the variables for which it is solving

Notice the word "in most cases". This makes it not clear really what it does. I do not think help should describe things like this. What does in most cases mean??

When I tried your equation in Maple 2024.2, I got strange result. When adding the option useassumptions to solve command, it produced no result. But without this option it did produce result with RootOf (which convert to radical could not remove the RootOf).

I do not understand this behavior myself but here is the worksheet. I also did not know one can put assumptions inside solve like you did. I always add assumptions after the call, like second example below.
 

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

restart;

eq := 9*(x^2 + 2*cos(x)) = Pi^2 + 9;
solve({eq,x>0},[x]);

9*x^2+18*cos(x) = Pi^2+9

[]

solve(eq,x) assuming x>0;

RootOf(-Pi^2+9*_Z^2+18*cos(_Z)-9)

solve(eq,[x],useassumptions) assuming x>0;

[]

 


 

Download solve_dec_11_2024.mw

@Carl Love 

Thanks, the freeze method worked. I suspect it will but I never learned freeze/thaw in Maple. I should learn these as they seem useful.

So I take it then, it is not possible to do this using evalindets without using freeze?  Becuase When I tried 

evalindets(expr, Not(specfunc(invlaplace)),X->eval(X,t=0))

it still gave

But thow/freeze works well, so will use this instead of what I did before. 

Y:=(s+1)/s^2+Int(sqrt(s^2),s);
expr:=inttrans:-invlaplace(Y,s,t);

evalindets(expr, specfunc(invlaplace),freeze);
eval(%,t=0);
thaw(%)

These functions freeze/thaw seem very useful. 

 It looks to me that the GUI has to do some house keeping from time to time

do you have options->General->auto save on??   This is the first thing I turn off when I install Maple.

Other than this, hard to say. Maple's GUI is written in Java, which is known to be slow for GUI, specially when worksheet gets large.

Do you run this in worksheet or command line maple? (cmaple.exe)?

I stopped using Maple GUI for any long running loops.

I use cmaple.exe now (run a batch.bat) file which runs EACH loop iteration using one single invocation of cmaple.exe.  Now Maple no longer hangs on me and can run 20,000 iteration with no hang. i.e. for 20,000 iterations, it starts new cmaple.exe process for each one. One after the other. So each iteration is completely separate from the next. This avoids any memory buildup and any internal maple caching issues.

Same loop in a worksheet hangs 20-30 times to get to 20,000 iterations. I gave up finding why. 

May be you could try the same. 

This will ofcourse only work if each of your iterations is independent of the other, which you seem to indicate this is the case. 

I read that Maple18 contains the "Adomian Decomposition". 

That is not what they say.  They say

MATLAB and Maple were used to implement the Adomian decomposition method
for the Fredholm integral equation of the second kind

i.e. they seem to have implemented the algorithm in Maple. This is not the same as saying they used builtin algorithm in Maple that is already there. You could try to contact the authors and asks them for more clarification and see if they can send you the code they used in the paper.

Maple's answer is correct. Your answer is wrong.

You can verify that your solution is wrong or not by replacing the solution back into the equation to see if it satisfies it or not, like this:

restart;
equ := u2 - u1/(-u1^2 + 1)=0;
my_assumed_correct_answer:=u1 = (-1 + sqrt(u2^2 + 1))/u2;
eval(equ,my_assumed_correct_answer);
simplify(%)

which gives

which is not identity.

Btw, it is better to use  an equation with =0 at the end of it.

Maple assumes that in solve, but this is not good practice and Maple should really not accept it as an equation must have = in it.  So better be explicit. I do not know if Maple always behaved this way (i.e. automatically adds = 0 to input if it is not equation already, or if this recent change in Maple.

Owner  is not place holder. This is the default user name you get when you buy PC with windows on it from the store.

On my windows 10 PC, this is my name also.  On command line on windows, type whomai

And you will your user name.

To change the user name, just google "windows 10 change owner user name" and you will see step by step instructions how to change it. But it might break things, so I would be careful doing this.

If you mean you want to remove the string "Owner" from the output of libname, then this can be done using StringTools commands.

First 9 10 11 12 13 14 15 Last Page 11 of 91