MaplePrimes Questions

Hello

I'm doing some calculation reports in maple. These reports are to be submitted to various classification societies - which all have different requirements to the calculations.

I would like to make a report, where the class specific calculations would be append based on a selection of class in the main calculation.

How do I do this?

 

If I was using latex, matlab, APDL or something like that, I would do and *IF Class=class1, *INPUT class.calc, *ENDIF, but how to do this in maple?

Hi

I need a temperature distribution inside a barrier during a heating process.
I will be appreciated for any help.

 

wz

How to animete BC using varying temperature in time?  How to obtain animated solution?

restart

Diffusivity coefficent...

a := 0.1e-5:

Thickness of barrier...

L := .2:

Heating curve:
Time in heating curve (in hours form exmaple)...

Time := seq(i, i = 1 .. 10):

Varying temperature in time [K]....

Temp_in_Time := [433.15, 568.15, 703.15, 838.15, 973.15, 1108.15, 1243.15, 1378.15, 1513.15, 1616.15]:

Initial temperature [K]

Tot := 298:

PDE := diff(T(x, t), t) = a*(diff(T(x, t), x, x)):

--->>>

BC1 := {T(0, t) = Temp_in_Time[2], T(L, t) = Temp_in_Time[2], T(x, 0) = Tot}:

sol := pdsolve(PDE, BC1, numeric, timestep = 50):

sol:-plot(t = 3*3600, thickness = 3, colour = red);

 

``



Download heating.mw

Hi

I use Maple perhaps only one time per year and thus i'm a beginner with the product (even if i use it since 1996). I'm trying to make the following script work in Maple 17:

http://www.maplesoft.com/applications/view.aspx?SID=4268&ref=Feed&L=F

but i fail.... Some help will be appreciate

restart:

Eq1:=1/r*diff(r*diff(w(r),r),r)-(cos(z1))^2*(w(r)+1)-DP;

dsolve({Eq1});

bcs:=D(w)(0)=0,w(r2)=A1;

dsolve({Eq1,bcs},w(r)):

where z1, Dp, r2, A1 are constants.

 

Hi, can I get some help with this?


The question is:

Consider the following IVP for a mass of m = 2 kg attached to a spring with a spring constant k = 9 N/m. The spring mass system is in a medium with damping constant b.

2y" + by' + 9y = 0

y(0) = 0, D(y)(0) = -3 

 

It then asks find three values b1, b2, b3 where b1 is underdamped, b2 is critical, b3 is over. 

I set b1 as 1, b2 as sqt 72, b3 as 9. 

 

Then it asks to find the quasi period. 

I can't get my quasi period right. My answer is 2pi/ sqrt (4.5).

 

Any help?  

Dear all;

Please I need your help to find the error in my code.

I want to solve an ode, with condition on step size.

ode := diff(y(x), x) = 2*x+y(x);
f:=(x,y)->2*x-y;

analyticsol := rhs(dsolve({ode, y(0) = 1}));
RKadaptivestepsize := proc (f, a, b, epsilon, N)
local x, y, n, h,k,z,R,p;
p:=2;
h := evalf(b-a)/N; ## we begin with this setpsize
x[0] := a; y[0] := 1; ## Initialisation
for n from 0 to N-1 do  ##loop
x[n+1] := a+(n+1)*h;  ## noeuds
k[1] := f(x[n], y[n]);
k[2] := f(x[n]+h, y[n]+h*k[1]);
k[3] := f(x[n]+h/2, y[n]+h/4*(k[1]+k[2]));
z[n+1] := z[n]+(h/2)*(k[1]+k[2]);## 2-stage runge Kutta.
y[n+1] := y[n]+(h/6)*(k[1]+k[2]+4*k[3]);
R:=abs(y[n+1]-z[n+1]); ## local erreur
hstar:=sqrt(epsilon/R)
if R=<=epsilon    then
   x[n] := x[n+1]+h;
   y[n]:=y[n+1];
   n:=n+1;

else

h:=hstar;
end if
 end do;
[seq([x[n], y[n]], n = 0 .. N)];
[seq([x[n], z[n]], n = 0 .. N)];
end proc:

epsilon:=1e-8;
RKadaptivestepsize((x,y)->2*x-y,0,1, epsilon,20)

I am trying to display a graph where there is a rotating square. My code is 

   for k to 30 do

RotSquare := Trans(1.5, 1.5).HomRot(k*Pi/15).Trans(-1.5, -1.5).HomSquare;

graph[k] := plot(Transpose(<RotSquare[1], RotSquare[2]>), x = -3..3, y = -3..3):

od:

display(seq(graph[k], k = 1..30), insequence = true);

with HomRot being 

HomRot := theta ->((cos(theta), sin(theta), 0)(-sin(theta), cos(theta), 0) (0 0 1))

However, when I run this code, my output is 

display(PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), PLOT(...), insequence = true)

and I'm not sure what I am doing wrong. Help would be greatly appreciated

Hi.

Please, I need a code in maple for adaptative setp size control for runge Kutta.

Thank you.

Is there any possibility for maple 16 or  any version, to show steps for this kind of Differential Equation.

>restart;

>diff(diff(psi(x),x),x)+ ((1/4)*(-3+lambda^2)/x^2)*psi(x)-I*lambda/x^2*psi(x)+E*psi(x)=0;

it has a Bessel solution, just want to check like Hint, if substitution method can be apply, just as FROBENIUS’METHOD works. Thanks
                

Hello fellow maple fans :)

 

I have tried to plot this continuous Piecewise function

plot(piecewise(0 <= t and t < 2, 2-t, 2 <= t and t <= 3, 2*t-4))

On the interval [0,6]

When i try it plot it it won't show the entre internal, is there a way to tell maple that the funktion should continuous until [0,6]

Please see this http://snag.gy/NPrjG.jpg if you are not sure what i mean in the end it should look like this http://snag.gy/ScgtF.jpg

Greetings David Thanks in advance :)

 

Hi, i'm wondering if theres anything i can do printf and print and have the outputs on the same line. I want the string wihtout any quotations so i think i can only do printf to get this, but then i'm putting an entry out of an array after this. This is a small example out of my code, i would like the output to be all on one line:

The synchronising vector is (S[j-1]) The synchronising word is (X[j-1]) The length of the synchronising word is ...

 

if (sync=true) then 
printf("The Synchronising vector is"); print(S[j-1]);
printf("The sychronising word is");
print(X[j-1]);
printf("The length of the synchronising word is");
print(length(X[j-1]));
else printf("There is no synchronising word"); 
end if;

 At the moment its outputing each print on a new line.

Any help would be much appreciated, thanks.

 

 

Hi. Thanks to help me in ths question.

 

t:=[1,2,3];

f(t[1])=[3,4];  f(t[2])=[11,12];   f(t[3])=[41,1]; 

How can plot  f  versus t

 

 

 

 

Hi.

Please help to use dsolve.

Suppose I have a Matrix A of size two. Y=[u,v].

Y'(t)=A*y(t).

How can use dsolve this problem.

Thanks

 

 

 

 

Hi,

I am using Maple to plot steady state diagrams. 

Initially I just plot the diagram, then I work out stability, and want to change the linestyle - solid for stable, dashed for unstable. is there a way I can manually select parts of the line on the plot and change the linestyle, or do I need to do several different plots and combine with display?

Any suggestions on the easiest way to plot steady state diagrams in Maple would be appreciated.

Regards

 

lonelyoak

 

EDIT

So I have plotted my whole steady state diagram via implicit plot, so if I try and select parts of it I get the whole graph. My alternative seems to be to plot all the branches seperately, which is possible but just time consuming.

 

EDIT

Sorry I don't think I made what I was asking for clear. I want to be able to select segments of the graph and change the linestyle on certain parts. 

For example if I had plotted x^2 between -2 and 2, I might want to put a dashed line when y is between 1 and 2 and x is positive. Is this possible without breaking it up into seperate plots?

Is there any simple way to print the sum of a series with exceptions?

For example, the following works (sort of), but its not consistent with mathematical notation, where one would expect to see something like a Sigma^' printed out, and the condition, alongw ith ther limits appear under the Sigma sign:

[Sum(1/(k^2-p),k=0..infinity),And(k<>p)]

First 1454 1455 1456 1457 1458 1459 1460 Last Page 1456 of 2434