serilas

96 Reputation

4 Badges

15 years, 154 days

MaplePrimes Activity


These are answers submitted by serilas

It realy works. Thank Preben Alsholm very much.
I have one more question. How do I do all the computation process as procedure? I need to carry out computation scores of times when changing some parameters (initial conditions).

Finding of integrals ratio is my additional task. The main task is solution of ODE system by only numerical method and namely by the help of ODEplot command. In really my system of ODE is very difficult. It solving about half hour. In your case I should compute system twice. What’s to be done?

I had bothering thoroughly with that. But it works now. Thank Robert and Scott very much. Your suggestions are valuable for me.
I have one more question. How do I do all the computation process as procedure? I need to carry out computation scores of times when changing some parameters (initial conditions) and saving results into individual file every time.

It seems to me that you don’t understand a little. The odeplot not use a fixed or certain step for different tasks. It intellectual recognizes when the curve is changing quickly and putting some more points in that area. It gives me confidence that I don’t overlook something important! On the other hand when the curve is changing slowly odeplot put some less points in this area. Thus I don’t risk encumbering by many not very necessary points. Do you see now why exactly odeplot is profitably for me and why I don’t want to use fixed step? By the way I need to represent results as curves on the diagram somehow or other.

In this case the system of ODE solving twice but time for me is very important. Expect about half hour once more don’t give more pleasure to me.

That doesn’t work in my case. Maybe I don’t know or understand something. I tried to do that in the following way (for example):

> restart; with(plots):
> sys:=diff(f1(t),t)=0.5/f2(t),
diff(f2(t),t)=sin(t),
diff(f3(t)*f4(t),t)=0.15,
diff(f3(t)/f4(t),t)=0.2*f2(t):
> init:= f1(0)=1, f2(0)=1, f3(0)=1, f4(0)=1:
> F:=dsolve({sys,init}, {f1(t), f2(t), f3(t), f4(t)}, numeric);
> W:=odeplot(F, [[t,f1(t)], [t,f2(t)], [t,f3(t)], [t,f4(t)]], 0..5.5):
> display(W);

Now all the calculated functions are located in W and I can plot them on the single diagram. But I don’t know haw export result from W into one text file in this case. Maybe who knows?
 

Try this way:

> restart: with(plots):
> n:=0.5:
> Eqn:= 6+(1+(1.444714922*(.288189107+.288745018- .806878862))*sin(1.726958075*t))*t/(.74231747+t/(20-6)):
>Eq:=6+(1+(3.5*(.288189107+.288745018-.806878862))*sin(1.726958075*t))*t/(.74231747+t/(20-6)):
>sol1:=dsolve({diff(Log10S(t),t)=-(.178131-0.6814e-1*Eqn+0.16242e-1*Eqn^1.5)*n*(-Log10S(t))^((n-1)/n), Log10S(0)= -0.1e-3}, numeric):
>sol2:=dsolve({diff(Log10S(t),t)=-(.178131-0.6814e-1*Eq+0.16242e-1*Eq^1.5)*n*(-Log10S(t))^((n-1)/n), Log10S(0)= -0.1e-3}, numeric):
> f1:=odeplot(sol1,[t,Log10S(t)],0..5, color=blue,linestyle=3, thickness=2):
f2:=odeplot(sol2,[t,Log10S(t)],0..5, color=green,linestyle=3, thickness=2):
> display(f1,f2);
 

“With the default settings, I don't think odeplot gives you adaptive plotting: in my experiments, the interval between the t values plotted was constant.”

I don’t think so. You take a simple example. Try to increase the range of computation for a few orders and then you’ll see that step size isn’t constant in odeplot.
My task needs to compute system of ODE in the time span from 10-22 to 10-5. In the case when employs fixed step size I obtain too many unnecessary points (about 1017 points if I want to see result features in the total time range from 10-22 to 10-5). But odeplot function is convenient for me because it extracts points from full time range but these points are not many (minimal number of points is specify).
Now my system of equations consists of about 10 functions. Suggest me please, how export all the computation results obtained by means of odeplot function in a single text file? A structure of this file must be follow:

t                              F1                           F2                       F3
.1e-23                   2000.                     .1e-1                   0.
.630957e-21       2401.002702       .138391e-1       .411177e-2
.126191e-20       4801.010820       .435356e-1       .144869e-2
.789287e-20       7201.024351       .911873e-1       .810107e-1
.252382e-19       9601.043297       .139472e-2       .407977e-1
.832863e-19       12001.06765       .747403e-2       .160035e-1
.....                          .....                          .....                        .....


The first column corresponds independent variable (time), next columns correspond certain functions with titles for identification.

Thank You very much, Scott. It seems to me that your one way is the best method for me. That’s just what I want. Thanks once more.

Robert thanks for help too. But your method isn’t for me. The point is that my system consists of 10 not easy differential equations. Now Maple computes it about hour (system will be complicate). In your case I must set step of computation. And that’s problem for me. I could be wrong but if I set short step the computation may slow down yet more. And if I set coarse step I run risks to withdraw the incorrect results. Whatever the case, odeplot function is optimized in this respect. It uses variable (optimal) step of computation for the space of all the working out process. Am I not right?

Page 1 of 1