Kitonum

21870 Reputation

26 Badges

17 years, 241 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Marcel123  

1) I do not know the cause of the error in your calculations. I have no errors occurred.

2) In fact, the results are very similar . If you add to the code two options   abserr=10^(-16), relerr=10^(-16) , the results fully coincide.

 

Addition.  I think I understood the reason for the error, which you write. If you resolve your differential equation, you must remove the previous assignment for  x , for example  x:='x' . But I do not understand why you are re-solve the equation. You can reuse already found the solution  sol , to find the values of the function  x  and its derivatives for different values  t  and to plot their graphs, for example:

x(0.5),  x(1),  Dx(1), D2x(1.5) ;

plot([x, Dx, D2x], 0..1.5);
   

 

 

 

@Marcel123  I work in the classic interface  Maple 2015.1, in which no such messages. The problem is that  D - is a protected name. As a workaround use the other names, for example

restart;

sol := dsolve({diff(x(t), t, t)-(diff(x(t), t)) = 1+t^2+x(t)^(3/2), diff(x(t), t, t) = y(t), x(0) = 0, y(0) = 1, (D(x))(0) = 0}, numeric);

sol(0.5);

x := t->rhs(sol(t)[2]):

Dx := t->rhs(sol(t)[3]):

D2x :=t->rhs(sol(t)[4]):

x(0.5),  Dx(0.5),  D2x(0.5);

@Markiyan Hirnyk  As I wrote in my answer, this is very simple, so I did not touch this issue.

@Carl Love  for your diligent and detailed analysis of all over this situation.

@tomleslie  In my Firefox, I was able to read that Carl wrote about:

@Carl Love  for the detailed explanation.

@Carl Love  Vote up.  Two questions:

1) What is the significance  R:= Vector() .  Why can not we just take the indexed variable  R ?

2) What is  _rest ?

 

The next version works  like your one:

SplitScan:= proc(f, L::list)

local R, k:= 0, j, last:= 1;

     for j from 2 to nops(L) do

          if f(L[j-1], L[j]) then

               k:= k+1;

               R(k):= L[last..j-1];

               last:= j

          end if

     end do;

     [seq(R(i), i= 1..k), L[last..]]

end proc:

 

@Markiyan Hirnyk  I know it. This is a feature of the solution.

 

For example (equation for  tan(x) ) we get the same warning:

sol:=dsolve({diff(y(x),x)=1/cos(x)^2, y(0)=0}, numeric);

plots[odeplot](sol, [x, y(x)], x = 0 .. 2, view=[0..2,0..10]);

@Carl Love  convenient for a large number of plots.

plot([seq(`[]`~(x,y||i), i=1..2)]);

@Rouben Rostamian   Here is a shorter version of the same plotting without  plots  package:

x := [0., .20, .40, .60, .80, 1.0]:
y1 := [0., .20, .40, .60, .80, 1.0]:
y2 := [0., .64, .96, .96, .64, 0.]:

plot([`[]`~(x,y1),`[]`~(x,y2)]);

 

I think I misunderstood the meaning of the original question in my answer.

 

 

 

See the same question

@toandhsp 

restart:

k:=combine((sin(x+Pi/3))^2);

sol:=solve(k=1/4, x, AllSolutions = true, explicit);

sol1, sol2:=subs({_B1=0,_Z1=n},sol), subs({_B1=1,_Z1=n},sol);

@Carl Love  Unfortunately I have the right to put only 1 vote up.

@Carl Love  for a very useful remark. I fixed this defect in code.

Please provide explicitly your system  V . Probably needed extra options in  solve  command.

First 90 91 92 93 94 95 96 Last Page 92 of 134