samiyare

195 Reputation

9 Badges

14 years, 78 days

 

Amir

MaplePrimes Activity


These are replies submitted by samiyare

@dohashi 

thancks
Dear Darin thanks for your answer. I forgot to mentioned that at each iteration we needs previous results of result1 and result2. for example consider > for i from 1 to N > do > result1[i] := 2*result1[i-1] + result2[i-1] > result2[i] := result1[i-1] - 2*result2[i-1] > > end do; as you can see, reslut1 and result2 in each iteration are independent, but at next iteration we need previous values. I Think the algorithm must be in the following manner: > for i from 1 to N > do > thread1 --> result1[i] := 2*result1[i-1] + result2[i-1] > thread2 --> result2[i] := result1[i-1] - 2*result2[i-1] > wait to all thread done successfully > end do; but unfortunately i cant write the appropriate code. please help me. Thanks for your attention in advance
Dear Darin thanks for your answer. I forgot to mentioned that at each iteration we needs previous results of result1 and result2. for example consider > for i from 1 to N > do > result1[i] := 2*result1[i-1] + result2[i-1] > result2[i] := result1[i-1] - 2*result2[i-1] > > end do; as you can see, reslut1 and result2 in each iteration are independent, but at next iteration we need previous values. I Think the algorithm must be in the following manner: > for i from 1 to N > do > thread1 --> result1[i] := 2*result1[i-1] + result2[i-1] > thread2 --> result2[i] := result1[i-1] - 2*result2[i-1] > wait to all thread done successfully > end do; but unfortunately i cant write the appropriate code. please help me. Thanks for your attention in advance

the following line doesnt work

DirectSearch:-SolveEquations([ (a, b) -> rhs((ans(a, b))(0)[2]), (a, b) -> rhs((ans(a, b))(-6)[3])-1]);

...............................

 

> restart;
> ans := proc (a, b) options operator, arrow; dsolve({diff(f(x), x, x, x)-f(x)*(diff(f(x), x, x)), f(6) = a, (D(f))(6) = 1, ((D@@2)(f))(6) = b}, f(x), numeric) end proc;
> DirectSearch:-SolveEquations([proc (a, b) options operator, arrow; rhs((ans(a, b))(0)[2]) end proc, proc (a, b) options operator, arrow; rhs((ans(a, b))(-6)[3])-1 end proc]);
Error, `DirectSearch` does not evaluate to a module
> (ans(5.99921816909092964, 0.781705649783954017e-3))(0);
       [                                               
       [x = 0., f(x) = HFloat(-1.9275378508598617e-8),
       [                                               

          d                                     
         --- f(x) = HFloat(0.9998657229654936),
          dx                                    

          d  / d      \                                 ]
         --- |--- f(x)| = HFloat(-3.215665207394622e-10)]
          dx \ dx     /                                 ]

the following line doesnt work

DirectSearch:-SolveEquations([ (a, b) -> rhs((ans(a, b))(0)[2]), (a, b) -> rhs((ans(a, b))(-6)[3])-1]);

...............................

 

> restart;
> ans := proc (a, b) options operator, arrow; dsolve({diff(f(x), x, x, x)-f(x)*(diff(f(x), x, x)), f(6) = a, (D(f))(6) = 1, ((D@@2)(f))(6) = b}, f(x), numeric) end proc;
> DirectSearch:-SolveEquations([proc (a, b) options operator, arrow; rhs((ans(a, b))(0)[2]) end proc, proc (a, b) options operator, arrow; rhs((ans(a, b))(-6)[3])-1 end proc]);
Error, `DirectSearch` does not evaluate to a module
> (ans(5.99921816909092964, 0.781705649783954017e-3))(0);
       [                                               
       [x = 0., f(x) = HFloat(-1.9275378508598617e-8),
       [                                               

          d                                     
         --- f(x) = HFloat(0.9998657229654936),
          dx                                    

          d  / d      \                                 ]
         --- |--- f(x)| = HFloat(-3.215665207394622e-10)]
          dx \ dx     /                                 ]

thancks. its help me lot.

thancks. its help me lot.

thancks. its good

but i draw it by point woth following command:

 

plots[odeplot](sol,[x,G(x)],0..b,thickness=3,symbol=circle,style=point,symbolsize=8,color=black);

 

how can i decrease number of point. there is too many points and i want to decrease number of points

 

thancks

thancks. its good

but i draw it by point woth following command:

 

plots[odeplot](sol,[x,G(x)],0..b,thickness=3,symbol=circle,style=point,symbolsize=8,color=black);

 

how can i decrease number of point. there is too many points and i want to decrease number of points

 

thancks

hi

 

yes , this is a part of my code. this is full of my code :

 

> restart;
>
nn:=10;
Nt:=0.5;
NB:=2.5;
Le:=2;
Pr:=2;
b:=6;

 sol := dsolve({diff(G(x), x, x)+Le*f(x)*(diff(G(x), x))+(Nt/NB)*diff(T(x), x, x) = 0,diff(f(x), x, x, x)+f(x)*(diff(f(x), x, x))-(2*nn)/(nn+1)*(diff(f(x), x))^2 = 0,diff(T(x), x, x)/Pr+f(x)*(diff(T(x), x))+NB*(diff(T(x), x))*(diff(G(x), x))+Nt*(diff(T(x), x))^2=0,G(0) = 1, G(b) = 0, T(0) = 1, T(b) = 0, f(0) = 0, (D(f))(0) = 1, (D(f))(b) = 0}, numeric);

Thancks. it's work very well

Thancks. it's work very well

thancks, but i say that , infinity means x=8. this equations have not exact solutions and must be solve with numerical method such as Shooting method. thease equations must be solve with rung kutta and shooting method.

i dont know how wirte this code with maple. thease equations are boundary layer equations in fluid mechanics and solve by many authors wiht shooting method, FDM , FEM and ... .

thancks, but i say that , infinity means x=8. this equations have not exact solutions and must be solve with numerical method such as Shooting method. thease equations must be solve with rung kutta and shooting method.

i dont know how wirte this code with maple. thease equations are boundary layer equations in fluid mechanics and solve by many authors wiht shooting method, FDM , FEM and ... .

thancks

its will be very helpful.

but is there any algorithm to solve it automatically, because this function make during a cycle ( for i=1,100 .....) and it must be solve automatically. is there other method or idea because its obvious that coeeficient of exp^x or C2 must be zero. coefficient of exp^x in one iteration is _C1 and after _C2 and change automatically. i want the code find the coefficient. thx

5 6 7 8 9 Page 7 of 9