MaplePrimes Questions

Dear Colleagues,

I think I can certainly take your help. I am trying to run a for-loop; a dummy code is provided below.

for i from 1 to 10 do

Sol_set[i] := solve(f(x, a)=0, x)

end do:

In some iterations at times I get an error message "division by zero". In that case, the program stops abruptly without completing the task for the remaining iterations.

Can I record the solution for any iteration, say j, that gives me an error message as Sol_set[j] := 0 and run the loop for i=j+1 to 10?

Likewise, I need to complete the loop for all iterations with stopping in between. Wherever there is an error, record some arbitrary solution that I can handle offline.

I would appreciate any help in this regard. Thank you all in advance.

Regards,

Omkar

Hi there,

The command

           dsolve(MyOde, numeric, range=MyRange, method=rosenbrock, output=piecewise)

returns a list of solution pieces which is not sufficiently dense according to how I intend to use it.


Is there a possibility to impose the "number of pieces" or the positions of the "breaks" in this command ?

Thanks in advance for any suggestion.

 

how to find back a patch in maple from Pi+GaussCurvature*Area(triangle) = Pi

restart:
with(LinearAlgebra):
EFG := proc(X)
local Xu, Xv, E, F, G;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
E := DotProduct(Xu, Xu, conjugate=false);
F := DotProduct(Xu, Xv, conjugate=false);
G := DotProduct(Xv, Xv, conjugate=false);
simplify([E,F,G]);
end proc;

UN := proc(X)
local Xu,Xv,Z,s;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Z := CrossProduct(Xu,Xv);
s := VectorNorm(Z, Euclidean, conjugate=false);
simplify(<Z[1]/s|Z[2]/s|Z[3]/s>,sqrt,trig,symbolic);
end:

lmn := proc(X)
local Xu,Xv,Xuu,Xuv,Xvv,U,l,m,n;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Xuu := <diff(Xu[1],u), diff(Xu[2],u), diff(Xu[3],u)>;
Xuv := <diff(Xu[1],v), diff(Xu[2],v), diff(Xu[3],v)>;
Xvv := <diff(Xv[1],v), diff(Xv[2],v), diff(Xv[3],v)>;
U := UN(X);
l := DotProduct(U, Xuu, conjugate=false);
m := DotProduct(U, Xuv, conjugate=false);
n := DotProduct(U, Xvv, conjugate=false);
simplify([l,m,n],sqrt,trig,symbolic);
end proc:

GK := proc(X)
local E,F,G,l,m,n,S,T;
S := EFG(X);
T := lmn(X);
E := S[1];
F := S[2];
G := S[3];
l := T[1];
m := T[2];
n := T[3];
simplify((l*n-m^2)/(E*G-F^2),sqrt,trig,symbolic);
end proc:

sph := <f(u,v)|g(u,v)|h(u,v)>;
cur := GK(sph);
X := sph;
Xu := <diff(X[1],u), diff(X[2],u), diff(X[3],u)>;
Xv := <diff(X[1],v), diff(X[2],v), diff(X[3],v)>;
Z := CrossProduct(Xu,Xv);
AreaTriangle := int(int(Z[1]^2+Z[2]^2+Z[3]^2,v=-Pi/2..Pi/2),u=0..2*Pi);
dsolve(Pi+cur*AreaTriangle = Pi, [f(u,v),g(u,v),h(u,v)]);
 

I have a package of routines meant to help Danish highschool students use Maple. I would like to use MapleCloud to distribute this but have run into a major stumbling block:

While Maple is perfectly happy to use non-latin letters such as the Scandinavian letters æ, ø and å it seems that MapleCloud can't handle that. Specifically, strings containing such letters is displayed in garbled form (the non-latin letters are shows as squares), and symbolic names containing such characters seems not to be recognized. The latter problem in particular makes MapleCloud quite useless to me.

I have attached a simple workbook demonstrating the problems to this message.

The worksheet below shows a river whose velocity is a function of the distance from its mid point to either bank.

In this worksheet, as an example, a boat of fixed speed crosses the river heading at all times towards its destination which is directly across the river from its starting point. The boat's path is animated.

I presume an experienced boat captain could constantly vary his heading so as to cross in a minimum time.

Can a function for this minimum crossing time heading be found and the worksheet altered to show the minimum time path?

  Rivercrossing.mw

 

my problem is how to put the third order IVP in derivate code for solving third order problems

the problem is y'''+2y"-9y'-18y=18x^2-18x+22

 

Digits := 18;
with(LinearAlgebra);
f := proc (n) -----;

derivative

g := proc (n)----- ;

please i need to know to to reresent it in the f := proc (n) and g := proc (n) where g := proc (n) is the derivative of f(x).

please any help 

Yesterday when I wanted to log in to MapleCloud my login information was no longer recognized. I got this message:

The account type or email address or password is incorrect.

When I tried to login to my Maple account I landed on a page saying, that there were some problems.

This morning I tried again to no avail; then asked to have my password reset, made a new password and tested that I could log in to my Maplesoft Membership and to Maple Primes - both worked fine. I also seemed to be able to log in to MapleCloud - I could see my private files; but when I wanted to upload a new version af an existing workbook I was asked to log in again. I closed Maple down, restarted the program and tried to log in to MapleCloud once more - this time it didn't work. I can still log in to my Maplesoft Membership and to MaplePrimes.

Hi everybody,

 

I want to plot many curves in the form of a table.

For instance, let    p := plot(x, x=0..1, labels=[x*Unit('m'), y*Unit('m')]):

The command   plots:-display(p)  returns a plot  with labels x [[m]] and y [[m]], just as expected.

But the commands (remember I have several plots)
                             plots:-display(<p>);                              # and the generalization plots:-display(<p | p>)
                             DocumentTools:-Tabulate([p]);           # and the generalizationDocumentTools:-Tabulate([p,p])
both provide labels  x Units:-Unit('m') and  y Units:-Unit('m')

Is there a way to fix this and obtain plots withe the expected labels ?

Thank to all of you for yout help

how to get numerical values of the following:


cos(pi/2)^2  where square should be on cos not on angle

 i need a help on how to find the local truncation error of a hybird block method of three order IVP. here is the one of the discrete methods i need to find the local truncation error. please any solution should put here thanks 

I want to obtain a report in a particular table format in TextArea component.REPORT (TextArea)area and ComboBox are not visble here.

Can any one help me? TextBox_Format_Output_Request.mw
 

restart

z := "Maple1"; x := "Map"; y := "Maple2"; x1 := 9.080787; y1 := 9.98765; z1 := 8.090909

I have done it using the print format directly with variable values. This is fine for me.

Maple:        Maple:     Map

  9.9876:   9.0808       8.1

 

I have done it differently defining a variable for the print format. This is fine for me and required as standard.

y3 := "%-2.5s:        %2.5s:     %2.5s\n  %-2.5g:   %-2.5g       %-3.2g\n", z, y, x, y1, x1, z1

printf(y3)

Maple:        Maple:     Map
  9.9876:   9.0808       8.1

 

 

Now I want these two lines as per format print  inside textarea0 named REPORT.

``

                                 

 

SetProperty("REPORT", Value, "")``

 

 

``

 

 

``


 

Download TextBox_Format_Output_Request.mw

I attach the doc for clarity of my odoubt. I have made all the required compoennets commands except for the formatting of printf formaat. Thanks for help.

Ramakrishnan V

Hi

 

trying to make table of points of the pair(lambda1,lambda2) to get the approximate function this technique  is called interpolation

contourplot(4*lambda2*result^2/(Pi*(lambda2+1)^2)-lambda1,lambda1=0..1,lambda2=0..1,contours=[0],axes=boxed,title=tit,titlefont=[SYMBOL,16],thickness=1,color=black,font=[1,1,18],tickmarks=[2, 4],linestyle=1,view=[0.002..1,0.002..1]);

any one knows how to find it

Hello everyone,

I need your helps .I have this code to solve equation numerically with random coefficients, but sometimes the solution find a singularity, for that I create conditional if to avoid it , but its does not work.

Thank you a lot.

 

NULL

restart

eq := a*(diff(x(t), `$`(t, 2)))+b*(diff(x(t), `$`(t, 1)))+sin(x(t))*(diff(x(t), `$`(t, 1)))+2/x(t);

  

cis := x(0) = .25, (D(x))(0) = 0;

 

Simpson := proc (f, a, b, n) local h, S1, S2, S, i; h := evalf(((1/2)*b-(1/2)*a)/n); S1 := 0.; for i from 0 to n-1 do S1 := S1+f(a+(2*i+1)*h) end do; S2 := 0.; for i to n-1 do S2 := S2+f(a+2*i*h) end do; S := (1/3)*h*(f(a)+f(b)+4*S1+2*S2); return S end proc:

 

amin:=0.1;amax:=0.2;

 

bmin:=15;bmax:=24;

 

Q1 := []; for jj to 10 do simplfloat := rand(-1.0 .. 1.0); h := simplfloat(); a := abs(amin+(amax-amin)*h); b := abs(bmin+(bmax-bmin)*h); solut := dsolve([eq, cis], numeric, maxfun = 0, output = procedurelist); sd := proc (i) options operator, arrow; abs(rhs(solut(i)[2])*rhs(solut(i)[2])) end proc; eng := Simpson(sd, 5, 6, 10); if 'FAIL' then return  else  end if; Q1 := [op(Q1), [jj, a, b, h, eng]]; writedata("test.dat", Q1) end do

Error, (in solut) cannot evaluate the solution further right of .22544264, probably a singularity

 


 

Download g.mw

Hi all,

I am hoping to use Maple to develop a list of 4 distinct linear factors with the following conditions...

1)  each individual factor does not have a common integer factor...  ie...  3x+9 is not permitted

2)  the coefficients in each individual factor has an integer between (-9 and 9) without the possibility of zero...  ie x + 0 and 0*x +3 are not permitted

3) each seperate factor is prime to one-another.  ie.  factor1=3x+4  and factor2=-3x-4 is not permitted.

I was hoping to use something short and sweet, using a sequence (if possible), but continue to run into problems.

Any help out there would be fantastic

Thanks,

Mark

 

 

Would someone be able to explain this strange output?

restart;
sol:=int(1/(x*sin(x)),x);
algsubs(x=t,sol);

How did Maple manage to obtain this? I tried tracing but it did not help me figure it out.  If it is of any help:

int(1/sin(x),x);

It seems algsubs got confused somewhere?

 

 

Maple 2017.2, windows.

 

 

First 941 942 943 944 945 946 947 Last Page 943 of 2428