Preben Alsholm

13728 Reputation

22 Badges

20 years, 252 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@Rouben Rostamian  Replacing omega^2 by omega2 solves the problem.

@farzane There is no way that you can get symbolic results in that case. You will have a characteristic polynomial of degree 8 containing 30 (!!!) parameters. As there is no general formula for the roots of a polynomial of degree 5 and above you stand absolutely no chance of getting a symbolic result.

Incidentally the exponential function exp(x) is written like that, NOT like this e^x.
You can correect that after the fact by doing as follows:

indets(Sys,`^`); #Just to see the problem
op(e^x); #The operands of e^x
Sys2:=evalindets(Sys,`^`,s->exp(op(2,s)));
indets(%,function);
Var:=[b1,c1,a2,b2,c2,d2,a3,d3];
indets(Sys2,name); #Notice the indexed v
nops(%) - 8; ## 30 (!!!)
(A, w) := LinearAlgebra[GenerateMatrix]( Sys2, Var ); #w :You cannot use v as it appears in A

op(1,A); #8x8


@al-faraj Did you try the code I gave? If you did you should have received the answer

10.11073088

And I don't think that I misunderstood your code.
I wasn't aware of a Danish version of Maple.
In your Maple version is the decimal separator (or whatever the term is) a comma?
What comes out of evalf(Pi); in your version
3.141592654
or
3,141592654

?

@maple fan The branches for a^z are those which are consequences of its definition:

a^z = exp(z*log(a)), where log is any branch of the logarithm.

Those are

log(z) = ln(abs(z)) + I*n*argument(z)

where n is any integer and where argument(z) is any argument for z.

@mskalsi Although the use of the files maple.hdb, maple.ind, maple.lib some (many) versions ago was replaced by archive files ending in .mla the use of the old method still works.
I cannot test it on the ones you mention since it seems you have to pay to get access to them.
However, I happen to have some old maple.ind, maple.lib (no maple.hdb). They contain among other things a package called DMat.

On a computer with Maple 2015 I did
libname:="E:/DMat/libDMat",libname;
with(DMat);
##The content showed up.
## In libDMat are just the files maple.ind and maple.lib

After that on another computer with Maple 12 I did the similar thing (the path is different). It worket too.

So I cannot tell you why you cannot make it work.

#Just an afterthought: Is Rif from the link really a package or is it just a collection of procedures not made into a package. If that is so then with(Rif); would result in an error.
Another thing: Is the "R" in Rif really capitalized? Should it be rif?
Thirdly, as Markiyan is mentioning, rif is implemented in Maple. In Maple 12 (I don't have access to Maple 13) when I do
?rif
up comes a help page "Overview of the Rif Command Set Version 1.1"  (just as in Markiyan's comment).

@mskalsi Are you sure that the path is correct?
My path
"E:/RIFfolder"
was just an example. You need to give the exact path to the place where you put the Rif-files.
(In particular: It doesn't seem likely that the drive is E as in my example).

@Mekai Actually I doubt that this package (Gym) is not used although I cannot be sure since the worksheet doesn't work for you either.
Anyway, what is the intended meaning of the input, which at my computer gives an error:

Error, invalid neutral operator

If I convert to 1D input I get the horribly looking

4⟦A⟧120∠+2.5⟦A⟧60∠

which surely makes no sense whatsoever (to me).


@Mekai In your very short worksheet you are trying to load a package called Gym. That package doesn't come with the standard installation of Maple. I guess it is provided by your instructor?

Do you have any reason to believe that there is a nontrivial solution?

Certainly the zero solution is a solution:

odetest({f1(x)=0,f2(x)=0,f3(x)=0,f4(x)=0},dsys3); #The trivial solution is a solution!

Maybe you should look at the link given above.

Your immediate problems can be handled by differentiating the first ode twice, the second once, keeping the remaining two as they are. The resulting system can be solved for the highest derivatives: So convertsys will work.
You have to add the extra boundary conditions you get from the first ode and its derivative, and from the second ode.

However, you will get the trivial solution.

#On reviewing this I realized I misread the highest diff order of f4: I had it at 4, it is 2.
Thus the method above can be simplified to:
Differentiate the second ode once and consider the system with that and the remaining 3 equations. Use the second ode (undifferentiated) at x=0 as an additional boundary condition. The result is still just the zero solution as expected.

This reminds me of the discussion in

http://mapleprimes.com/questions/204986-Dsolve-With-Unknown-Parameter#answer218470

So may be you ought to say where you got the ideas? It may in fact help the person, who helped with a previous situation of the same sort in finding the relevant worksheet used at the time.

You don't explain why you are doing what you are doing: e.g. why you don't just try to use dsolve on dsys3?
Are people supposed to guess that or find out themselves the hard way?

@iman The second derivative with respect to the first variable of w at the point (0,z) is written
D[1,1](w)(0,z)

Similarly with the other derivatives in IBC3. Thus IBC3 should be

IBC3:={D[2](Phi)(x, h/2)+2*D[1,1](w)(x, h/2) = 0, D[2](Phi)(x,h/2)+2*D[1,1](w)(x,-h/2) = 0, -7*D[1,1](w)(0, z)+2*Phi(0, h/2)-Phi(0, -h/2) = 0, -7*D[1,1](w)(L, z)+2*Phi(L, h/2)-Phi(L, -h/2) = 0, Phi(0, z) = 0, Phi(L, z) = 0, u(0, z) = 0, u(L, z) = 0, w(0, z) = 0, w(L, z) = 0};

Now the next problem you face is not syntax, but the fact that the algorithm used cannot handle derivatives that are not normal to the boundary: The error message says as much:

In IBC3 the derivative D[2](Phi)(x, h/2) is perfectly fine: It is a derivative w.r.t. to the second variable (z) and the boundary is z=h/2, thus that derivative is normal to the boundary.
However, the derivative D[1,1](w)(x, h/2) is not normal to the boundary as it is a (second) derivative w.r.t. the first variable (x).
Maybe you intended that derivative to be D[2,2](w)(x, h/2) ?
But your problems don't end there: IBC3 also has Phi(0, h/2), which is just Phi at one point. You need to give Phi along an axis, i.e. the different ibcs should each depend on exactly one of the two independent variables (x or z).

Finally, if all that is taken care of, you will most likely run into a problem with the appearance of diff(Phi(x, h/2), x, x) in your system of pdes.
As a simple example of the problem:
restart;
pde:=diff(u(x,t),t)=diff(u(x,t),x,x); #The heat equation
res:=pdsolve(pde,{u(x,0)=x,u(0,t)=0,u(1,t)=0},numeric);
res:-animate(t=1); #Perfectly fine
#Now consider the following changed version:
pde2:=diff(u(x,t),t)=diff(u(x,t),x,x)+diff(u(x,0),x); #Notice the appearance of diff(u(x,0),x)
res:=pdsolve(pde2,{u(x,0)=x,u(0,t)=0,u(1,t)=0},numeric);
res:-animate(t=1); #ERROR





@golnaz I think that I actually answered that in giving

plot([2*IB(z,1/5,1/2),z,z=0..1]);

You just have to replace IB by
IBcrt:=(t,a,b)->IB(t^(1/3),a,b);

as I actually implied above in giving IBsqrt.
I have noticed that you changed t^(0.5) fo t^(1/3), so I changed IBsqrt to IBcrt.

@iman Well, actually I expected you to do the work, not me.
You may want to read the help for D.
?D
and the help for pdsolve/numeric:
?pdsolve,numeric
See the examples.

@golnaz You are right. The inverse of the incomplete beta function evaluated at half the argument is not what I gave.
There is still confusion about the square root, but that confusion has nothing to do with that issue:

restart;
IB(x,a,b)=Int(t^(a-1)*(1-t)^(b-1),t=0..x); #This is the definition of the incomplete beta function
##Now we find it as a function of x,a,b:
B:=int(t^(a-1)*(1-t)^(b-1),t=0..x);
IB:=unapply(B,x,a,b);
##The confusion mentioned is: Did you mean the following one instead?
#IBsqrt:=(t,a,b)->IB(sqrt(t),a,b);
plot(IB(x,1/5,1/2),x=0..1); #The graph of IB as a function of x.
plot([IB(x,1/5,1/2),x,x=0..1]); #Graph of inverse of x->IB(x,1/5,1/2) (call it invIB )
plot([2*IB(z,1/5,1/2),z,z=0..1]); #This is the graph of invIB(f/2) as a function of f.

The argument is that the graph of invIB(f/2) we can get as
[f, invIB(f/2), f=0..2*IB(1)]
This graph is also obtained by using z=invIB(f/2), i.e. f=2*IB(z):
[2*IB(z),z,z=0..1]
##I edited the answer above to correct this error. Notice though that there I still use the square root.


I'm somewhat surprised (to put it mildly) that you don't link to your previous question:

http://www.mapleprimes.com/questions/205318-Error-In-DEplot#comment219317

First 106 107 108 109 110 111 112 Last Page 108 of 230