Preben Alsholm

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@96mhaynes If f has only 2 zeros a and b, then f´(a) + K =0 and f'(b) + K = 0 cannot both hold unless K = 0 (assuming smoothness of f).
Or do you use different values of K for a and b, one negative and the other positive?

@sarunas 
evalf(arctan(519/520));
convert(%,degrees);
evalf(%);
#Or in one step:
evalf(convert(arctan(519/520),degrees));


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();

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