Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

In your code Q appears. I don't see it in the image. There I see a Q[0], but only in the initial conditions.
And what is it?

Could you rephrase that question?
What are X, Y, and A?
The dot product of u and v can be found in Maple by doing
<2,5>.<4,9>;

You need exp(-l/a) instead of exp^(-l/a).

Even with all constants set to 1 Maple doesn't find an antiderivative:

Int(2/(1+eval(P,{k=1,y=1,v=1,a=1})),o);
value(%);
# returns unevaluated.

If the constants are known and the integral is definite and over a known range then numerical integration can be used.
Example:
evalf(Int(2/(1+eval(P,{k=1,y=1,v=1,a=1})),o=0..10));



@Hamzaan It is still not clear to me why you cannot use D as in
restart;
f:=x-> x*U(x);
Fprime:=f:
to 20 do Fprime:=D(Fprime); Fprime(0) end do;

or

restart;
f:=x-> V(x)*U(x);
Fprime:=f:
to 5 do Fprime:=D(Fprime); Fprime(0) end do;


Maybe it would help if you presented the problem in its entirety or a simplified version of it containing the essential features.

@nm You could introduce u = (z-1)^(-1) thus z = 1/u+1 and do:
restart;
f:=z->(3*z+1)/(z^2-1);
numapprox:-laurent(f(1/u+1),u=0);
subs(u=(z-1)^(-1),%);


@Hamzaan 
For the sake of clarity I have given new names to the iterated versions of FPrime:
restart;
f:=(x)-> x*U(x);

FPrime:=unapply('eval(diff(f(y),y),y=x)',x);
FPrime(0);
FPrime2:=unapply('eval(diff(FPrime(y),y),y=x)',x);
FPrime2(0);
convert(%,D);
FPrime2a:=unapply(PDEtools[dsubs](diff(U(x),x)=D(U)(x),diff(FPrime(x),x)),x);
FPrime2a(0);

Is there a problem?


@Hamzaan The problem is that U and V are not known, thus diff(U(y),y) returns unevaluated.
unapply evaluates its arguments before processing. and
eval(diff(f(y),y), y=x) returns diff(U(x), x)*V(x)+U(x)*diff(V(x), x), thus you get the function
x->diff(U(x), x)*V(x)+U(x)*diff(V(x), x).
It would have been nice if
eval(diff(f(y),y), y=x) returned D(U)(x)*V(x)+U(x)*D(V)(x);
so that FPrime2 would return D(U)*V+U*D(V).
Notice that if f:=U(x); initially, then FPrime2:=unapply(eval(diff(f(y),y),y=x),x); returns D(U).
But the conversion to D doesn't take place in eval, but comes with using unapply.

Solutions.
Either
1. Using unevaluation quotes works:
FPrime2:=unapply('eval(diff(f(y),y),y=x)',x);
or
2. Using D(f)(x) instead of eval(diff(f(y),y),y=x).

@Markiyan Hirnyk
I'm assuming that the point of expansion is 0 and that we use the term 'power series' in the usual sense, i.e. a series of the form Sum(a[n]*x^n,n=0..infinity).

Then I didn't give nor intended to give any proof that no second power series solution exists. I just let Maple do the work.
Your own results show the appearance of a logarithmic term. That is enough do show the nonexistence of a second power series solution.

One might also try:
DEtools[indicialeq](myode,x,0,y(x)); #Roots 0 and 1 differ by an integer!
DEtools[formal_sol](myode,y(x),x=0,order=6); #Confirming earlier results
gfun[diffeqtorec](myode,y(x),u(n));
#Notice that y(0) is automatically set to 0 and that there is only one arbitrary constant.

My comment was directed at the OP, who seemed to insist on using the package powseries to find solutions.

@JoeyCard There just is no second power series solution:

dsolve(myode);
S:=series(rhs(%),x);
eval(S,_C2=0); #Power series solution
#Compare with
dsolve(myode,y(x),formal_series); #Also finds power series solution
eval(%,{infinity=5,Sum=add});

@cmcjas 
|T(z)|=1 iff |z-I|=|z+I|, meaning indeed that z has the same distance from I as from -I since z+I = z-(-I).
If L is the set of points with that property, then L must be the set of points on the real axis.

An illustration:
plots:-implicitplot(abs(T(x+I*y))=1,x=-5..5,y=-1..1,thickness=3,view=-1..1,gridrefine=1);


@IanLisle I just tried the eval trick and using mul again. It worked as I said above on my machine. Then after a restart I tried again. Then it crashed.
I got successes and failures in a few more attempts after closing the program or pasting the code into a new worksheet. So there is obviously some randomness in this.

interface(version);
Standard Worksheet Interface, Maple 17.02, Windows 7, September 5 2013 Build ID 872941
kernelopts(version);
     Maple 17.02, IBM INTEL NT, Sep 5 2013, Build ID 872941


@Carl Love Yes, you are right. So one might try

seq(simplify(T((N@@k)(z))-(T(z))^(2^k)),k=1..9);

Just a couple of observations:
Replacing add with sum doesn't help.
Replacing add with mul works (but of course produces something entirely different).
The following artificial construction works:

restart;
BlahObject := module()
    option object;
    export BlahMethod := proc()
    local C, d, i,f;
      eval(f(C[i]*d[i] + C[i], i=1..4),f=add);
    end proc;
  end module;

B := Object(BlahObject);
B:-BlahMethod();

@Kitonum I suggest replacing the print statement print(convert(.....)) with a return statement:
return convert(...);

The reason being that a print statement just does that: prints. There is no output to save to a variable as in
res:=Basises({x^2+x+4,  x+3,  2*x^2-x-5,  5*x^2+x-7});

@ecterrab I agree that these changes are welcome.

Let me use the opportunity to ask if there is any good reason why dsolve/SERIES and dsolve/INTTRANS need the indeterminate function(s) as the second argument unlike dsolve and dsolve/numeric?
Simple example:
restart;
ivp:={diff(x(t),t)=x(t),x(0)=1};
dsolve(ivp);
dsolve(ivp,numeric);
dsolve(ivp,x(t),series); #Unknown function needed
dsolve(ivp,x(t),method=laplace);#Unknown function needed


First 159 160 161 162 163 164 165 Last Page 161 of 231