shakuntala

25 Reputation

4 Badges

8 years, 303 days

MaplePrimes Activity


These are replies submitted by shakuntala

@Preben Alsholm  No I do not have  Idea about the dual solution and how to use it so please can you help in this case ??

@Preben Alsholm  Can you tell how can we plot dual solution for this problem

@Preben Alsholm 

Yes sir your right, i did mistake that i need to take theta as second order but i took their f second order  in equation so i  could not find it, thank you sir for verifying my problem

 

In this above  program how can we chage the axis

for example f'' verses lambda

Can we change the axis ??

@Preben Alsholm 

for ex: n:=[1,2,3,4] and p:=[2,4,5,6]

for these values i want to plot the graph on the same program at the same time

 

@Preben Alsholm 

Thank you sir 

 

actually I want to plot the graph by combine the two variablevalues  in my program (which is i send you previously)

@Preben Alsholm 

Dear sir

Can we use two or more parameter in for statement

for example for j from nops (m,n,p) if it is not then how can we represent

@Preben Alsholm 

sorry for inconvinience and code is

 

> restart; for j to nops(n) do

sys := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))+1-(diff(f(eta), eta))^2 = 0, (diff(diff(theta(eta), eta), eta))/pr+f(eta)*(diff(theta(eta), eta))-(diff(f(eta), eta))*theta(eta) = 0;

bcs := f(0) = 0, (D(f))(0) = l+b*((D@@2)(f))(0), (D(f))(-.5) = 1, theta(0) = 1+s*(D(theta))(-.5), theta(2) = 0;

n := [.5]; pr := .71; p := 0; q := 0; b := 0; l := 0; s := 0; L := [red, blue, orange]; R1 := 2*n[j]/(1+n[j]); R2 := 2*p/(1+n);

p := proc (f1, th1, { output::name := 'number' }) local res1, fvals, thvals, res2; option remember;

res1 := dsolve({sys, f(1) = 0, theta(0) = 1+th1, (D(f))(0) = f1, (D(theta))(0) = th1, ((D@@2)(f))(0) = f1-1}, numeric, :-output = listprocedure);

fvals := (subs(res1, [seq(diff(f(eta), [`$`(eta, i)]), i = 0 .. 2)]))(0); thvals := (subs(res1, [seq(diff(theta(eta), [`$`(eta, i)]), i = 0 .. 1)]))(0);

res2 := dsolve({sys, f(0) = fvals[1], theta(0) = thvals[1], theta(5) = 0, (D(f))(0) = fvals[2], (D(f))(5) = 1}, numeric, :-output = listprocedure);

if output = 'number' then [fvals[3]-(subs(res2, diff(f(eta), `$`(eta, 2))))(0), thvals[2]-(subs(res2, diff(theta(eta), eta)))(0)]

else

res1, res2

end if

end proc;

p1 := proc (f1, th1) p(args)[1] end proc;

p2 := proc (f1, th1) p(args)[2]end proc;

p(.3, -.2); par := fsolve([p1, p2], [.3, -.2]);

res1, res2 := p(op(par), output = xxx);

plots:-display(plots:-odeplot(res1, [[eta, f(eta)], [eta, theta(eta)]]), plots:-odeplot(res2, [[eta, f(eta)], [eta, theta(eta)]]));

plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]]));

plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta, eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta, eta)]]));

plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)]]));

fplt[j] := plots[odeplot](res1, [eta, diff(diff(f(eta), eta), eta)], color = L[j], axes = boxed);

tplt[j] := plots[odeplot](res1, [[eta, theta(eta)]], color = L[j], axes = boxed) end do;
> plots:-display([seq(fplt[j], j = 1 .. nops(n))]);

 

@tomleslie 

> restart; for j to nops(n) do sys := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))+1-(diff(f(eta), eta))^2 = 0, (diff(diff(theta(eta), eta), eta))/pr+f(eta)*(diff(theta(eta), eta))-(diff(f(eta), eta))*theta(eta) = 0; bcs := f(0) = 0, (D(f))(0) = l+b*((D@@2)(f))(0), (D(f))(-.5) = 1, theta(0) = 1+s*(D(theta))(-.5), theta(2) = 0; n := [1, 2, 3, 4, 5, 6]; pr := .71; p := 0; q := 0; b := 0; l := 0; s := 0; L := [red, blue, orange]; R1 := 2*n[j]/(1+n[j]); R2 := 2*p/(1+n); p := proc (f1, th1, { output::name := 'number' }) local res1, fvals, thvals, res2; option remember; res1 := dsolve({sys, f(1) = 0, theta(0) = 1+th1, (D(f))(0) = f1, (D(theta))(0) = th1, ((D@@2)(f))(0) = f1-1}, numeric, :-output = listprocedure); fvals := (subs(res1, [seq(diff(f(eta), [`$`(eta, i)]), i = 0 .. 2)]))(0); thvals := (subs(res1, [seq(diff(theta(eta), [`$`(eta, i)]), i = 0 .. 1)]))(0); res2 := dsolve({sys, f(0) = fvals[1], theta(0) = thvals[1], theta(5) = 0, (D(f))(0) = fvals[2], (D(f))(5) = 1}, numeric, :-output = listprocedure); if output = 'number' then [fvals[3]-(subs(res2, diff(f(eta), `$`(eta, 2))))(0), thvals[2]-(subs(res2, diff(theta(eta), eta)))(0)] else res1, res2 end if end proc; p1 := proc (f1, th1) p(args)[1] end proc; p2 := proc (f1, th1) p(args)[2] end proc; p(.3, -.2); par := fsolve([p1, p2], [.3, -.2]); res1, res2 := p(op(par), output = xxx); plots:-display(plots:-odeplot(res1, [[eta, f(eta)], [eta, theta(eta)]]), plots:-odeplot(res2, [[eta, f(eta)], [eta, theta(eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta)], [eta, diff(theta(eta), eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta, eta)]]), plots:-odeplot(res2, [[eta, diff(f(eta), eta, eta)]])); plots:-display(plots:-odeplot(res1, [[eta, diff(f(eta), eta)]])); fplt[j] := plots[odeplot](res1, [eta, diff(diff(f(eta), eta), eta)], color = L[j], axes = boxed); tplt[j] := plots[odeplot](res1, [[eta, theta(eta)]], color = L[j], axes = boxed) end do;
> plots:-display([seq(fplt[j], j = 1 .. nops(n))]);


Dear Sir

Thank you  sir and i tried as one of maple expertees suggested this code and used, but in this set of values of n is not executing, please can you tell this ??

(In my above problem i trying to plot for set of values of n but in plot command it not executing , can you do this why it is not executing ??)

 

@Preben Alsholm 

 

thank you sir

@tomleslie 

okay sir thank you i too try for this

 

@Carl Love 

okay sir, is their any other method or solution for this problem ??

@Carl Love 

thank you for answering question sir and is there any other solution for this  sir ??

@tomleslie 

 

 

yes sir, how i am varing the value of n similarly we can chage the p also.

@Carl Love 

 

Dear sir

 

I used a variable in my program i.e.,n and i want  to calculate list or sequence of different values and i want each values separately

for ex: R1:=(2*n)/(n+1)

put n=1,2,3,4

 

R1=1

R1=3/4

R1=6/4=3/2

R1=8/5 like this different solutions for different values i need, but i do not have such kind of idea please can you help me sir. and my program is

 

 

> restart;
> with(plots);
> setoptions(title = `Family Plot`, axes = boxed);
> pr := .71; n := 1; p := 0; q := 0; b := 0; l := 0; s := 0; m := 0;
>
>
> R1 := 2.*n/(1+n);
                                 1.000000000
> R2 := 2.*p/(1+n);
                                     0.
> sol1 := dsolve([diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))+R1*(1-(diff(f(eta), eta))^2) = 0, diff(diff(theta(eta), eta), eta)+.71*f(eta)*(diff(theta(eta), eta))-.71*(diff(f(eta), eta))*theta(eta)*R2 = 0, f(0) = 0, (D(f))(0) = 1.8+b*((D@@2)(f))(0), (D(f))(18) = 0, theta(0) = 1+s*(D(theta))(0), theta(18) = 0], numeric, method = bvp[midrich]); plots[odeplot](sol1, [eta, theta(eta)], color = red, axes = boxed);

 

 

 

 

1 2 3 Page 2 of 3