nm

3646 Reputation

17 Badges

7 years, 362 days

MaplePrimes Activity


These are answers submitted by nm

There is no free student version. But the student version is highly discounted price and gives same functionality as full Maple version. You can go to https://webstore.maplesoft.com/index.aspx and select student as status. You'll have to verify your student status to have Maple activated. The process is all done online and very simple. They accept credit cards.

good news;

 

Maple 2018 can now do this without hanging and directly

 

But Acer's result is still simpler, but the above is done directly. At least it does not hang now

    "but when will the newest version be released"

 

It is released today, March 21, 2018. I can see it in the online store of Maple.

You have one equation and 2 unknowns. There are infinite number of solutions.  To find some, simply fix x at some value above 1 and solve for y. Or fix y at some value less than 5 and solve for x.

Here are some solutions

restart;
eq:=x->x^2-y^2+4*x;
map(x->[x,evalf(solve(eq(x)=0,y))[1]],[seq(x,x=2..10)]);

which gives (x,y) pairs

[[[2, -3.464101616], [3, -4.582575695], [4, -5.656854248], 
[5, -6.708203931], [6, -7.745966692], [7, -8.774964387], 
[8, -9.797958972], [9, -10.81665382], [10, -11.83215957]]

etc...

You can't write `x:=1` then later do df(x) since x now is a number. You can do

foo:=proc()
local f,x,df,i,x0;
f := x->x^2-3;
df:= x-> diff(f(x),x);
x0:=1;
for i from 2 to 5 by 1 do    
    x0:=subs(x=x0,x-(f(x)/df(x)));
    print(evalf(x0));
od;
end proc;

Then foo() gives

                               2.
                          1.750000000
                          1.732142857
                          1.732050810

compare to

evalf(solve(x^2-3=0,x));

1.732050808, -1.732050808

Or more simply, you can also do

foo:=proc()
local f,x,df,i,x0;
f := x^2-3;
df:= diff(f,x);
x0:=1;
for i from 2 to 5 by 1 do    
    x0:=subs(x=x0,x-(f/df));
    print(evalf(x0));
od;
end proc;

 

restart;
ode := diff(1/r(phi), phi$2) + 1/r(phi)= GM/h^2;
ics := r(0)=2/3, D(r)(0)=0;
dsolve({ode,ics});

To show that the answer to any integrate problem is correct or not, differentiate the antiderivative and see if you obtain the integrand back or not.

restart;
integrand:=1/(x+2*sqrt(x));
anti:=int(integrand,x);
simplify(diff(anti,x)-integrand);

gives 0

Hence the answer given by Maple is correct.

 

try escaping the \

    read "C:\\Users\\Ronan\\Documents\\MAPLE\\Rational Trinonometry\\Qdim.m";

It is also bad practice to use SPACES in file or folder names. Better to use _

so the above would be better as

    read "C:\\Users\\Ronan\\Documents\\MAPLE\\Rational_Trinonometry\\Qdim.m";

ps.   mpl as extension would be better than m

 

 

@Rouben Rostamian  

I've corrected my hand solution. I only checked before for one case test function and did not notice I am missing the odd part. 

Now the final solution I get is

 

Also animated the analytical solution for all three test functions below, and analytical solution now agrees with numerical.

I attach PDF with my solution. 

t.pdf

May be maping the interval first from -1..1 to 0..2 and then mapping again solution back to -1..1 at the end is a simpler method.

Animations

 

 

CAS systems are still relatively weak in analytical solutions of PDE's. Maple can solve this numerically though when given some specific f(x). Maple seems to only handle boundary conditions from zero to some positive length.

Mathematica can't solve this either analytically.

 

This is what I get in Maple 2017
 

int(t^(a-1)/(1+t),t=0..1);

-(-a+1)/((a-1)*a)-(-a+1)*LerchPhi(-1, 1, -a)/(a-1)+Pi*csc(Pi*a)

 

And now

?LerchPhi

Works as expected. Your display settings seems to be setup differently.

 

try

restart;
y(0):=1;
x0:=0;
y0:=1;
xf:=1;
n:=10;
h:=evalf((xf-x0)/n);
f:=(x,y) -> x+y;
x:=x0;
y:=y0;
for i from 1 to n do 
    k:=f(x,y);
    y:=y+h*k;
    x:=x+h;
    print(x,y);
od:

gives

 

 

The Wonskian is handy function I did not know about. I used to do this by hand:

restart;
y:=[exp(2*x),exp(-x),x*exp(-x),x^2*exp(-x)]:
Matrix([seq([seq(diff(y[i],[x$j]),i=1..nops(y))],j=0..nops(y)-1)]);
LinearAlgebra:-Determinant(%);

num:=[123450000.0,0.00001234,123.45];
map(x->printf("%E\n",x),num);

map(x->printf("%0.2E\n",x),num);

I can't figure how to make it use 10^ instead of E, but they really means the same as scientific notations. On a side note, I think Maple's printf() is simpler than Mathematica's. Since printf() is standard, more general and I find it easier. I also use Mathematica.

Use interface(prettyprint=0)

 

3 4 5 6 7 8 9 Page 5 of 9