666 jvbasha

javid basha jv

130 Reputation

8 Badges

6 years, 182 days

MaplePrimes Activity


These are questions asked by 666 jvbasha

How to get a plot for different values of Mh.

like Mh=[1 2 3 4]

Code:

restart;
with(DEtools,odeadvisor);

m:=10;H:=1;Mh:=1;b:=0.02; a:=0.05;V:=array(0..m); V[0]:=1-exp(-t);

for k from 1 to m do

if k=1 then chi:=0;

 chi:=1;

 fi;

 p:=0;

 for j from 0 to k-1 do

   p:=p+(V[k-1-j]*diff(V[j],t$2)-diff(V[k-1-j],t)*diff(V[j],t)-a*(2*diff(V[k-1-j],t)*diff(V[j],t$3)-diff(V[k-1-j],t$2)*diff(V[j],t$2)-V[k-1-j]*diff(V[j],t$4)));  od;

p:=(p+diff(V[k-1],t$3)-b*(diff(V[k-1],t$2)+t*diff(V[k-1],t$3))-Mh*diff(V[k-1],t))*h*H;

p:=factor(p);

V[k]:=(-int(p,t)+0.5*exp(t)*int(exp(-t)*p,t)+0.5*exp(-t)*int(exp(t)*p,t)+chi*V[k-1]+C1+C3*exp(-t));

v:=unapply(V[k],t);

V[k]:=frontend(expand,[V[k]]);  V[k]:=subs(C3=solve(eval(subs(t=0,diff(V[k],t))),C3),V[k]); V[k]:=frontend(expand,[V[k]]);

V[k]:=subs(C1=solve(eval(subs(t=0,-V[k]-diff(V[k],t))),C1),V[k]);

od:

appr:=0;

for k from 0 to m do

 appr:=appr+V[k];

od:

u_appr:=unapply(appr,(h,t)):

u_appr_1:=unapply(diff(u_appr(h,t),t),(h,t)):

evalf(u_appr_1(-0.4,t)):

with(plots);

plot([u_appr_1(-0.4,t)],t=0..4,0..1.2,color=[black],axes=frame):

 

 

this plot for Mh=1:

 

How to apply two for loops to solve ode problem.

code:

restart; with(plots); fcns := {T(eta), f(eta)};
m := .5; bet := 1; na := 1/6; N := 5;
eq1 := (diff(f(eta), `$`(eta, 3)))*pr+m-m*(diff(f(eta), `$`(eta, 1)))+((m+1)*(1/2))*(diff(f(eta), `$`(eta, 2)))*f(eta) = 0;
eq2 := diff(T(eta), `$`(eta, 2))+((m+1)*(1/2))*(diff(T(eta), `$`(eta, 1)))*f(eta) = 0;
bc := f(0) = 0, (D(f))(0) = 0, (D(f))(N) = 1, (D(T))(0) = -bi*(1-T(0)), T(N) = 0;
bi:= [seq(1..4,0.1)];  NN := nops(bi);  
pr:=[seq(1..2,0.1)];  NN1 := nops(pr);
for i  from 1 to NN do    
for j from 1 to NN1 do  

R := dsolve(eval({bc, eq1,eq2}, bi[i],pr[j]), fcns, type = numeric, method = bvp[midrich], maxmesh=2400):  
X1||[i,j]:=rhs(-R(0)[3]):
end do:  
end do:  

Have a good day.
 

Dear friends,

Greetings.

How to get the second solution.

how to change the guess value in maple.

figure 1 plot in Matlab with two different initial guesses.

 

TWOSOLUTION.mw

 



 

Greetings,

How se the f^(IV) ode problem using the Runge metho

 

restart; with(plots);
fcns := {f(eta), gta), t(a)};
N1k1 ;b :; nt 3; pr := 5; sc := 1;
eq1 := diff(f(eta), `$`(eta, 3))+(1/2)*f(eta)*(diff(f(eta), `$`(eta, 2)))+k1*((diff(f(eta), `$`(eta, 1)))*(diff(f(eta), `$`(eta, 3)))-(1/2)*f(eta)*(diff(f(eta), `$`(eta, 4)))+(1/2)*(diff(f(eta), `$`(eta, 2)))^2) = 0; eq2 := diff(t(eta), `$`(eta, 2))+pr*nb*if`ta, 1)))*(diff(g(et`$`(eta, 1)))+pr*nt*(diff(t(eta), `$`(eta, 1^2+(1/2)*f(eta)*(diff(t(eta), `$`(eta, 1))) = 0; eq3 := diff(g(eta), `$`(eta, 2))+nt*(diff(t(eta), `$`(eta, 2)))/nb+(1/2)*f(eta)*(diff(g(eta), `$`(eta, 1)))*sc/pr = 0;
bc := f(0) = 0, (D(f))(0) = 0, (D(f))(N) = 1, ((D@@2)(f))(N) = 0, t(0) = 1, t(N) = 0, g(0) = 1, g(N) = 0;
R := dsolve(eval({bc, eq1, eq2, eq3}), fcns, type = numeric);
Error, (in dsolve/numeric/bvp) system is singular at left endpoint, use midpoint method instead
p1u := odeplot(R, [eta, (D(f))(eta)], 0 .. N, numpoints = 100, labels = ["η", "f'"], linestyle = solid, color = [blue], thickness = 1, labeldirections = [horizontal, vertical], labelfont = ['TIMES', 'BOLDOBLIQUE', 16]);
Error, (in plots/odeplot) input is not a valid dsolve/numeric solution
p1u;


bvp.mw

 

Have a good day.

Dear authors,
How to solve this ode problem.

Download link ode.mw

In this problem the boundary condition is

Note: F=g in our problem.

eta approaches N.

Thank you.

 

4 5 6 7 8 9 10 Page 6 of 10