MaplePrimes Questions

 

Dear all,

Thanks for your answer. I have a simple question:

Let A be a Matrix, X[1] and X[2] two vectors.

I have this equation:  X[2]= X[1]+ A*X[1]+A*X[2];  Using Maple how can I  writte X[2] =P*X[1]; where P is a matrix to be founded.

Here, P:=(Id-A)^(-1)*A; But how using maple.

 

 

 

 

 

I have tried to use Maple to solve ordinary differential equations but i have this error. Could you please help me to fix this problem

> eq1 := diff(v1(t), t) = v2(t);
> eq2 := diff(v2(t), t) = -v1(t)+(3*(v1(t)^2-1))*v2(t);
> init1 := v1(0) = 2;
> init2 := v2(0) = 0;
> with(DEtools);
> DEplot({eq1, eq2}, [v1(t), v2(t)], 0 .. 3*Pi, {[0, 0, 0]}, scene = [v1, v2], stepsize = .1);

Error, (in DEtools/DEplot/direction) division by zero

 

thank you

b := 1;

h := 1;

A := b*h;

E := 210*10^9;

qr := 100;

Dp := (1/12)*E*b*h^3;

R := 20;

teta := 3;

sys1 := {(E.A+Dp/R^2)*(diff(u(t), `$`(t, 2))) = -E*A*(diff(w(t), t))/R+Dp*(diff(w(t), `$`(t, 3)))/R, -Dp*(diff(w(t), `$`(t, 4))) = E*A*(diff(u(t), t))/R-Dp*(diff(u(t), `$`(t, 3)))/R+E*A/R-100};

dsolve(sys1);

#THİS GAVE ME THE RESULTS LİKE THAT:

{u(t) = (1/4801)*_C3*(-1+sqrt(4801))^(3/2)*exp(-(1/20)*sqrt(-1+sqrt(4801))*t)-(1/4801)*_C4*(-1+sqrt(4801))^(3/2)*exp((1/20)*sqrt(-1+sqrt(4801))*t)-(1/4801*I)*_C5*(1+sqrt(4801))^(3/2)*exp(-(1/20*I)*sqrt(1+sqrt(4801))*t)-(1/4801)*_C6*(-1+sqrt(4801))^(3/2)*exp((1/20)*sqrt(-1+sqrt(4801))*t)+(1/4801)*_C3*sqrt(-1+sqrt(4801))*exp(-(1/20)*sqrt(-1+sqrt(4801))*t)-(1/4801)*_C4*sqrt(-1+sqrt(4801))*exp((1/20)*sqrt(-1+sqrt(4801))*t)+(1/4801*I)*_C5*sqrt(1+sqrt(4801))*exp(-(1/20*I)*sqrt(1+sqrt(4801))*t)-(1/4801)*_C6*sqrt(-1+sqrt(4801))*exp((1/20)*sqrt(-1+sqrt(4801))*t)-(104999999/105000000)*t+_C1, w(t) = _C2+_C3*exp(-(1/20)*sqrt(-1+sqrt(4801))*t)+_C4*exp((1/20)*sqrt(-1+sqrt(4801))*t)+_C5*exp(-(1/20*I)*sqrt(1+sqrt(4801))*t)+_C6*exp((1/20)*sqrt(-1+sqrt(4801))*t)}

#SO THERE ARE 6 UNKOWN(C1...C6) SO I NEED 6 CONDITION. MY BOUNDRY CONDITIONS:

bs := u(0) = 0, (D(u))(0) = 0, w(0) = 0, (D(w))(0) = 0, w(teta) = 0, (D(w))(teta) = 0;

> r := dsolve({bs, sys1});
%;
Error, (in dsolve) invalid arguments; expected an equation, or a set or list of them, received: {{-17500000000*(diff(diff(diff(diff(w(t), t), t), t), t)) = 10500000000*(diff(u(t), t))-875000000*(diff(diff(diff(u(t), t), t), t))+10499999900, 210043750000*(diff(diff(u(t), t), t)) = -10500000000*(diff(w(t), t))+875000000*(diff(diff(diff(w(t), t), t), t))}}
>

I tried to change the equations row. But ı dont understand where something wrong.I tried so many times. May u please find where ıt is wrong? 

 

Hello,

 

I would like to know whether it is possible to change the color of animations that have already been produced and assigned to a variable.

 

Let's take for example

 

P := plots:-animate(plot, [sin(x+t), x = -Pi .. Pi], t = -Pi .. Pi, frames = 8)

 

is there a command to change the color of the curve AFTER it has been produced?

 

The calculus to generate all my plots took 4 hours so I would like not to have them calculated again.

 

Thx

How can I typeset this in Maple? A ket with a 2 element column vector in it, but without the vector brakets. Like this:

| x over y >

 

Thanks

 

 

AOA... Pl correct it

Help.mw

can we load part of a package not the package whole !? for example from physics package i only need diff tool not all of the package tools,can i do sth for that !? 

restart:

Eq1:=diff(psi(y),y$4)-diff(psi(y),y$2)=0;

dsolve({Eq1});

bcs:=psi(h1)=F,D(psi)(h1)=-1,psi(h2)=-F,D(psi)(h2)=-1;

dsolve({Eq1,bcs});

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: [{psi(h1), psi(h2), psi(y)}, {psi(h2), psi(y)}]

Any suggestion?

Cheers!

 

 

Dear all;

Please see only the last lines of this procedure,

1)I ask if this procedure give an output epsilon(x0,h). Really, I need your help. Thanks.

2) Can we plot epsilon(x0,h), versus h

 

> heun := proc (x0, h)

local x, y, i, N, k, f, ode, k1, k2, x1, x2, y1, y2;

f :=(x,y)-> 1/(1+cos(y)) ;

ode := diff(y(x), x) = f(x, y);

N := round((1/2)*x0/h);

y2 := Array(0 .. N);

x2 := Array(0 .. N);

y1 := Array(0 .. 2*N);

x1 := Array(0 .. 2*N);

x2[0] := 0; y2[0] := (1/4)*Pi;

for i from 0 to N-1 do

x1[2*i+2] := (2*i+2)*h;  k1[1] := f(x1[2*i], y1[2*i]); 

k1[2] := f(x1[2*i]+h, y1[2*i]+h*k1[1]);

y1[2*i+2] := y1[2*i]+(1/2)*h*(k1[1]+k1[2]);

x2[i+1] := (2*i+2)*h;

k2[1] := f(x2[i], y2[i]);

k2[2] := f(x2[i]+2*h, y2[i]+2*h*k2[1]);

y2[i+1] := y2[i]+h*(k2[1]+k2[2])

end do;

return firstresulat = evalf([seq([x2[i], y2[i]], i = 0 .. N)]);

return secondresulat =evalf([seq([x1[2*i], y1[2*i]], i = 0 .. N)]);

epsilon:=(x0,h)->add((firsttest[i][2]-secondtest[i][2])^2 , i=1..round(x0/(2*h))+1)

end proc;

 

 

Dear all

 

Please, I need you help, to make a simple procedure with two output.  I try this simple code :

test:= proc(a,b)

local variable .....;

for i from 1 to 10 do

expression

end do

retur  fff;

return ggg;

end proc

Then I do  : test(a,b) but I get only ggg and not fff

 

Any help please

 

how maple calculate exp(x) with e.g. 100000 decimal numbers

a divsion of the series x^k/k! with e.g. 1/25000!/25001 lasts longer than the exp(1.xx) calculation

 

is there a faster way to calculate exp(x) than with the x^k/k! series

 

thanks

 

 

 

 

 

 

 

 

I've been poking around with convolutions on Maple, and some weird behavior came up---if I let it compute the convolution of a piecewise function, then take the convolution of that, it comes out differently than if I enter a function from scratch as the middle step---file attached (PiecewiseProblem.mw).  I'm not really a Maple pro, so am I'm doing something crazy here?

Thanks!

hello, 

so i've been having trouble with this one for a while. I think i'm just missing something simple.. maybe yous could help.

all we have to do is to write a maple procedure that takes an integer N and a boolean function F as in14 as arguments, returns nothing, and plots a square N N lattice of points, coloring the points (i; j) with F(i; j) true in red and the other ones blue.

thaaaanks.

why mapleprimes.com does not send me email notifications ?! could anyone help ? i do not receive email notification of related posts.

Dear all,

Thank you for your Help.

h: stepsize;

x in [0,x0];

I give all the step of my code, but I think there is a mistake. I wait for your Help.

I would like to compute the error between  Method Huen with step size h and step size 2h using the definition of epsilon given below:

 ## The error written epsilon(x0,h)= sqrt(1/(N+1) * sum_i=0^N  (y_i^{2h}-y_(2i)^h)^2 ), where y_i^(2h) is the approximation of y(i*2*h).

 ## We want : loglog epsilon versus h.

  epsilon:=(x0,h)->sqrt( 1/(N+1)*add( (Heun1(f,x0,i)-Heun2(f,x0,i))^2,i=0..N ) );

  f:=(x,y)=1/(1+cos(y)); 

  ode:=diff(y(x),x)=f(x,y);

ic:=y(0)=1;  h:=x0/(2*N);

## Method Heun with step size 2h

> Heun1 := proc (f, x0,)

local x, y, i, h, k;

y := Array(0 .. N);

x := Array(0 .. N);

h := evalf((1/2)*x0/N);

x[0] := 0;

y[0] := 1;

for i from 0 to N do

x[i+1] := (2*i+2)*h;

k[1] := f(x[i], y[i]);

k[2] := f(x[i]+h, y[i]+h*k[1]);

y[i+1] := y[i]+h*((1/2)*k[1]+(1/2)*k[2]);

end do;

[seq([x[i], y[i]], i = 0 .. N)];

end proc;

### Now Heun with step size h  ( the same h)

> Heun2 := proc (f, x0,)

local x, y, i, h, k;

y := Array(0 .. N);

x := Array(0 .. N);

h := evalf((1/2)*x0/N);

x[0] := 0;

y[0] := 1;

for i from 0 to N do

x[i+1] := (i+1)*h;

k[1] := f(x[i], y[i]);

k[2] := f(x[i]+h, y[i]+h*k[1]);

y[i+1] := y[i]+h*((1/2)*k[1]+(1/2)*k[2]);

end do;

[seq([x[2*i], y[2*i]], i = 0 .. N)];

end proc;

 

 

Thanks you for your help.


                                

                        

 

First 1456 1457 1458 1459 1460 1461 1462 Last Page 1458 of 2433