Muhammad Usman

235 Reputation

5 Badges

11 years, 218 days
Beijing, China

MaplePrimes Activity


These are questions asked by Muhammad Usman

Dear Users!

I hope everyone is fine here. I wrote the following statements with the print command:

restart; NN := [4, 6, 8]; a := 0; b := 2; n := 4;
h := evalf((b-a)/n); print("The domain of intergation is [a,b] = ", [a, b]);
f := exp(x); print("The given function is ", f);
Exact := evalf(int(f, x = a .. b)); print("The exact integration in [a,b] is ", Exact);
print("The value of h to divide the domain [a,b] into n subintervals is ", h);
print("Numerical integration in [a,b] is going to perform when h via RECTANGULAR METHOD for n = ", n);

The output is:

                          0.5000000000
        "The domain of integration is [a,b] = ", [0, 2]
                "The given function is ", exp(x)
       "The exact integration in [a,b] is ", 6.389056099
"The value of h to divide the domain [a,b] into n subintervals is ", 0.5000000000
"Numerical integration in [a,b] is going to perform when h via RECTANGULAR METHOD for n = ", 4

I want the actual values of a,b, n and h highlighted in above as:

                            0.5000000000
        "The domain of integration is [a,b] = ", [0, 2]
                "The given function is ", exp(x)
       "The exact integration in [0,2] is ", 6.389056099
"The value of h to divide the domain [0,2] into 4 subintervals is ", 0.5000000000
"Numerical integration in [0,2] is going to perform when 0.5 via RECTANGULAR METHOD for n = ", 4

Dear users! 

I hope everyone is fine here. I have the following expression:

r*y[0, 1]+y[0, 0]+(1/6)*r*(r-1)*(1+r)*y[-1, 3]+(1/2)*r*(r-1)*y[-1, 2]+(1/120)*r*(r-1)*(r-2)*(1+r)*(2+r)*y[-2, 5]+(1/24)*r*(r-1)*(r-2)*(1+r)*y[-2, 4]+(1/720)*r*(r-1)*(r-2)*(r-3)*(r-4)*(1+r)*y[-3, 8]+(1/360)*r*(r-1)^2*(r-2)*(r-3)*(1+r)*y[-3, 7]+(1/720)*r*(r-1)*(r-2)*(r-3)*(1+r)*(2+r)*y[-3, 6]:

What is the procedure to select some terms in the above expression for example for N=2 I just want the following terms:

y[0, 0]+r*y[0, 1]+(1/2)*r*(r-1)*y[-1, 2];

and for N=3 I just want the following terms:

y[0, 0]+r*y[0, 1]+(1/2)*r*(r-1)*y[-1, 2]+(1/6)*r*(r-1)*(1+r)*y[-1, 3];

and for N=4 I want:

(1/24)*r*(r-1)*(r-2)*(1+r)*y[-2, 4]+y[0, 0]+r*y[0, 1]+(1/2)*r*(r-1)*y[-1, 2]+(1/6)*r*(r-1)*(1+r)*y[-1, 3];

and so on,

in the descending order in first suffices and ascending order in second suffices (like term having y[0,0],  y[0,1], y[-1,2], y[-1,3], y[-2,4]). I am waiting for your response. Thanks.

 

Hi dear users!

I hope everyone is fine here. I want to compute the NULL SPACE vector V2[1], V2[2], V2[3],... of matrices MatrixEquationAgain2[1], MatrixEquationAgain2[2], MatrixEquationAgain2[3]... for different values of M. Kindly see my attached file where I struggled a lot but failed to evaluate it. Kindly help me to compute it. Thanks in advance

NULL_SPACE.mw

Dear Users,

I hope everyone here is fine. I want to extract dat file from the attached contour plot file. Please help me to resolve this issue. Many thanks in advance

Dat_file.mw

Dear Users,
I hope you are doing well. The following is the code to solve a nonlinear PD equation numerically and I plotted the graphs for T(y,t) sucessfully.

restart; with(plots); PDE1 := Pr*(diff(T(y, t), t)-Ree*(diff(T(y, t), y))) = (1+Nr*(T(y, t)+1)^3)*(diff(T(y, t), y, y))+3*Nr*(T(y, t)+1)^2*(diff(T(y, t), y))^2; ICandBC := {T(1, t) = 1, T(y, 0) = 1, (D[1](T))(0, t) = T(0, t)}; Ree := .1; Pr := 6.2; HA1 := [0, 1, 10]; AA := [red, green, blue, cyan, purple, black];
printlevel := 2; for i to nops(HA1) do Nr := op(i, HA1); print("Nr = ", %); PDE[i] := {PDE1}; pds[i] := pdsolve(PDE[i], ICandBC, numeric, spacestep = 1/200, timestep = 1/100); PlotsT[i] := pds[i]:-plot[display](T(y, t), t = 1, linestyle = "solid", labels = ["y", "u"], color = op(i, AA), numpoints = 800) end do;
display([`$`(PlotsT[j], j = 1 .. nops(HA1))], size = [1000, 600], axes = boxed, labels = [x, (convert("T", symbol))(x, T)], labelfont = ["Times", 14, Bold], labeldirections = [horizontal, vertical], axesfont = ["Arial", 14, Bold], thickness = 3)

I want to plot the graphs for (1+Nr*(T(y, t)+1)^3)*(diff(T(y, t), y)), at t = 1. Also want to plot diff(T(y, t), y) at y = 0 and y = 1 against Nr. Kindly help me in this matter.

2 3 4 5 6 7 8 Last Page 4 of 38