Preben Alsholm

13733 Reputation

22 Badges

20 years, 257 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@Carl Love In 2D input space is interpreted as multiplication. One of the very good reasons to stay away from 2D input.

@96mhaynes fsolve is given two arguments: The first the list of 4 procedures each accepting 4 arguments a,b,f0,omega. The second argument to fsolve is a list of starting values for a,b,f0,omega. Good starting values may require some exploration and luck.

@96mhaynes You talked about a and b that is why I asked for two K's.

You must mean K = 1/sqrt(3) and not -1/sqrt(3).
Otherwise f'(a) would be positive since you said that f'(a) = -K.

I posted a solution with only the a-part.

@96mhaynes What are the values of the two K's?
In my simple example they were 1 and -1.

@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});

First 158 159 160 161 162 163 164 Last Page 160 of 230