Preben Alsholm

13743 Reputation

22 Badges

20 years, 334 days

MaplePrimes Activity


These are replies submitted by Preben Alsholm

@sanaz Why not settle for a numerical solution?

de := diff(x(t), t, t)+30*x(t)+.1*x(t)^3 = 29*cos(t);
#Series solution to order 15 (highest term order 14):
resser14:=dsolve({de, x(0) = 0, D(x)(0) = 0},x(t),series,order=15);
pol14:=convert(rhs(resser14),polynom);
resnum:=dsolve({de, x(0) = 0, (D(x))(0) = 0},numeric);
#The numerical solution seems to me so much more interesting than a series solution:
plots:-odeplot(resnum,[t,x(t)],0..10);
#odeplot allows you to show both together, if you so desire:
plots:-odeplot(resnum,[[t,x(t)],[t,pol14]],0..1,view=0..5);

#You may also take a look at
resser16:=dsolve({de, x(0) = 0, D(x)(0) = 0},x(t),series,order=17);
pol16:=convert(rhs(resser16),polynom);
plots:-odeplot(resnum,[[t,x(t)],[t,pol14],[t,pol16]],0..1,view=-5..5,legend=["Numerical","pol14","pol16"]);


@sanaz Why not settle for a numerical solution?

de := diff(x(t), t, t)+30*x(t)+.1*x(t)^3 = 29*cos(t);
#Series solution to order 15 (highest term order 14):
resser14:=dsolve({de, x(0) = 0, D(x)(0) = 0},x(t),series,order=15);
pol14:=convert(rhs(resser14),polynom);
resnum:=dsolve({de, x(0) = 0, (D(x))(0) = 0},numeric);
#The numerical solution seems to me so much more interesting than a series solution:
plots:-odeplot(resnum,[t,x(t)],0..10);
#odeplot allows you to show both together, if you so desire:
plots:-odeplot(resnum,[[t,x(t)],[t,pol14]],0..1,view=0..5);

#You may also take a look at
resser16:=dsolve({de, x(0) = 0, D(x)(0) = 0},x(t),series,order=17);
pol16:=convert(rhs(resser16),polynom);
plots:-odeplot(resnum,[[t,x(t)],[t,pol14],[t,pol16]],0..1,view=-5..5,legend=["Numerical","pol14","pol16"]);


It would probably help if you gave us the differential equation from which you obtain f(x).

As you give us f(x) above you end with  + ...  indicating that there are more terms (infinitely many, I suspect).

This is just a continuation of

http://www.mapleprimes.com/questions/142296-Pade-Approximation

Whether what you write is correct or not surely depends on what you intend to do.

You haven't answered the questions put by Carl Love and MacDude and now repeated by me:
Why approximate a series truncated to 3 terms (now a polynomial of degree 6 called f) by a more complicated expression e?

You are talking about finding a pade approximation to the original function. But you don't tell us what the original function is.

It doesn't happen with 1D-input (Maple input).

( Your expressions are not strings in the Maple sense (unless of course expression1:="Hello world"; ). )

@Alejandro Jakubi Just tried the same. I think you are right.

@Alejandro Jakubi Just tried the same. I think you are right.

There seems to be a syntax error. Copying it I got "Error, `;` unexpected".

Could you upload a worksheet instead?

@Thomas Richard Actually even

simplify(s) assuming a>0;

works.

You are using 'a' as a function of two variables (x and v), but it is never defined as such. However, you also use it without arguments, so you are not being consistent. In any case for the algorithm to run you have to define 'a'.

You are using 'a' as a function of two variables (x and v), but it is never defined as such. However, you also use it without arguments, so you are not being consistent. In any case for the algorithm to run you have to define 'a'.

@Markiyan Hirnyk It was put there by hand. I was observing that the integral was bounded by 1/(2*(8+x^3)^2) thus is O(1/x^6)). Since the first term in res2 is also  O(1/x^6)), the result follows.

@Markiyan Hirnyk It was put there by hand. I was observing that the integral was bounded by 1/(2*(8+x^3)^2) thus is O(1/x^6)). Since the first term in res2 is also  O(1/x^6)), the result follows.

@Markiyan Hirnyk This is for getting the u-factor, i.e. the factor to be differentiated. The point is that we want to have cos(s) (and sin(s) later) as the factor to be integrated.

@Markiyan Hirnyk This is for getting the u-factor, i.e. the factor to be differentiated. The point is that we want to have cos(s) (and sin(s) later) as the factor to be integrated.

First 184 185 186 187 188 189 190 Last Page 186 of 231