mehdi jafari

764 Reputation

13 Badges

11 years, 206 days

MaplePrimes Activity


These are replies submitted by mehdi jafari


 

restart

TC := (p*A*((lambda-sigma)*(exp(1)^(lambda*t2)-1)+lambda*(exp(1)^((lambda-sigma)*T)-exp(1)^((lambda-sigma)*t2)))/(lambda*(lambda-sigma))-Ca-A*exp(1)^(lambda*t1)*((beta*a2+b2)*(exp(1)^(beta*t1)-1)/beta^2-(lambda*a2-b2)*(1-exp(1)^(-lambda*t1))/lambda^2)/(beta+lambda)+A*exp(1)^(lambda*t1)*b2*t1/(lambda*beta)-W*((alpha*a1+b1)*(1-exp(1)^(-alpha*t1))-alpha*b1*t1*exp(1)^(-alpha*t1))/alpha^2+A*(exp(1)^(lambda*t2)*((a1+b1*t2)*lambda*alpha+b1*(lambda-alpha))-exp(1)^(lambda*t1)*(b1*(alpha^2-lambda^2*exp(1)^((lambda+alpha)*(t2-t1)))-(a1+b1*t1)*lambda*alpha*(alpha+lambda*exp(1)^((lambda+alpha)*(t2-t1))))/(lambda+alpha))/(lambda^2*alpha^2)+Cs*A*exp(1)^((lambda-sigma)*t2)*((T-t2)*(lambda-sigma)-exp(1)^((T-t2)*(lambda-sigma))+1)/(lambda-sigma)^2-L*A*((exp(1)^(lambda*T)-exp(1)^(lambda*t2))/lambda-(exp(1)^((lambda-sigma)*T)-exp(1)^((lambda-sigma)*t2))/(lambda-sigma))-C*(A*(exp(1)^((beta+lambda)*t1)-1)/(beta+lambda)+W+A*(exp(1)^((lambda-sigma)*T)-exp(1)^((lambda-sigma)*t2))/(lambda-sigma)))/T:

TC2 := subs(t2 = (ln(W*(lambda+alpha)/A)+(lambda+alpha)*t1)/(lambda+alpha), TC):

x1 := diff(TC2, t1) = 0:

 x2 := diff(TC2, T) = 0:

x3 := evalf(simplify(lhs(eval(x1,{A = 290, lambda = 4, a1 = .9, a2 = 2.4, b2 = 0.1e-1, b1 = 0.1e-2, alpha = 0.2e-1, beta = 0.4e-1, W = 90, Ca = 100, L = 11, C = 9, p = 12, Cs = 4, sigma = 0.2e-2}))));

(20445.79790*exp(.2201100996+4.*t1)-4123.831928*exp(.2200000446+3.998000000*t1)-21822.50000*exp(4.04*t1)+36381.92537*exp(4.*t1)+90.57213930*exp(4.*t1)*t1-81.*exp(-0.2e-1*t1)-0.9000000000e-1*t1*exp(-0.2e-1*t1)+14.50000000*exp(.2201100996+4.*t1)*t1+1160.*exp(.2200000446+3.998000000*t1)*T-1160.*exp(.2200000446+3.998000000*t1)*t1)/T

(1)

x4 := evalf(simplify(lhs(eval(x2,{A = 290, lambda = 4, a1 = .9, a2 = 2.4, b2 = 0.1e-1, b1 = 0.1e-2, alpha = 0.2e-1, beta = 0.4e-1, W = 90, Ca = 100, L = 11, C = 9, p = 12, Cs = 4, sigma = 0.2e-2}))));

(3769.854928*T*exp(3.998*T)+5451.984839-3190.*T*exp(4.*T)-5110.543225*exp(.2201100996+4.*t1)-942.9351996*exp(3.998*T)+958.9011648*exp(.2200000446+3.998000000*t1)+5401.608911*exp(4.04*t1)-9089.820585*exp(4.*t1)-22.64303483*exp(4.*t1)*t1-4275.*exp(-0.2e-1*t1)-4.500000000*t1*exp(-0.2e-1*t1)-3.625000000*exp(.2201100996+4.*t1)*t1+290.1450725*exp(.2200000446+3.998000000*t1)*t1+797.5000000*exp(4.*T))/T^2

(2)

x5 := solve({x3, x4}, {T, t1});

 

Warning, solutions may have been lost

 

"x5:="

(3)

``

``


Download solution_have_los.mw

@itsme actucally evaluating it gives you the wrong answer , since maple approximate your function with sum of some terms . 
what u said about sum , is differenet ! maple approximate your function with a series ( maybe loran) , but sum and Sum are different with this one as far as i know.

maybe u can find sth similiar in this link :

http://www.mapleprimes.com/questions/201246-How-To-Solve-For-M

@mehdi jafari as u can see in the simplification there is a summaition , i think when we simplify f , it approxmiate the f with sum finite terms and thus ,the integration are corrected ! so there is nothing wrong with maple integration,the problem is with approximation terms of f .

actually i do not know why maple can solve wave equation using laplace method, but not this one !


restart; with(PDEtools)

PDE := diff(u(x, t), `$`(x, 2)) = diff(u(x, t), `$`(t, 1));

diff(diff(u(x, t), x), x) = diff(diff(u(x, t), t), t)

(1)

BCs := {u(0, t) = 0, u(x, 0) = x*((1/4)*Pi-x), u((1/4)*Pi, t) = 0};

{u(0, t) = 0, u(x, 0) = x*((1/4)*Pi-x), u((1/4)*Pi, t) = 0}

(2)

pdsolve(PDE, BCs, numeric);

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module

(3)

Laplace(pde[2], u(x, t), numberofiterations = 5);

u(x, t) = _F1(-x+t)+_F2(x+t)

(4)

Laplace(PDE, u(x, t), numberofiterations = 5);

NULL


Download laplas.mw

@mahmood180 please re-upload your file again it is not downloadable

@xcyborg maybe u should repeat the same code for those output,since it takes a lot of time for me to understand your code fuly. good luck

@xcyborg i added one more column,


restart; printf("Factory Simulation: %s\n\n", "Ghana Chocolates"); printf("Chocolate Factory Simulation Project .\n\n"); printf("%5a  %10a  %10a  %10a  %10a  %10a  %10a   \n", W, O(t, t+1), B(t), T(t), F(t), R(t), M(t, t+1)); printf(" ---------------------------------------------------------------------------\n"); initialise := proc (n) local i, t, a, T, R, F, B, O, Q; T := proc (t) options operator, arrow; 250 end proc; R := proc (t) options operator, arrow; 150 end proc; F := proc (t) options operator, arrow; 250 end proc; B := proc (t) options operator, arrow; 50 end proc; for i to n do t := i; if B(t) < F(t) then Ds(t, t+1) := B(t) else Ds(t, t+1) := F(t) end if; M(t, t+1) := 50; O(t, t+1) := 50; P(t, t+1) := 50; if t = 2 then O(t, t+1) := 100 elif t = 3 then O(t, t+1) := 0 end if; P(t, t+1) := T(t)-F(t)+Ds(t, t+1); if R(t) < P(t, t+1) then P(t, t+1) := R(t) elif R(t) < 0 then P(t, t+1) := 0 end if; R(t+1) := R(t)+M(t, t+1)-P(t, t+1); F(t+1) := F(t)+P(t, t+1)-Ds(t, t+1); B(t+1) := B(t)+O(t, t+1)-Ds(t, t+1); R(t) := R(t+1); F(t) := F(t+1); B(t) := B(t+1); for a to t do Q(t, t+1) := O(t, t+1)+O(t-t+a, t-t+a+1) end do; T(t+1) := (t+1)*Q(t, t+1)/t; printf("%5a  %10a  %10a  %10a  %10a  %10a %10a   \n", i, evalf[3](O(t, t+1)), evalf[3](B(t)), evalf[3](T(t)), evalf[3](F(t)), evalf[3](R(t)), evalf[3](M(t, t+1))) end do; printf(" ---------------------------------------------------------------------------\n\n\n"); printf("%5a  %10a  %10a  %10a     \n", W, M(t, t+1), P(t, t+1), Ds(t, t+1), M(t, t+1)); printf(" ---------------------------------------------------------------------------\n") end proc; initialise(16)

Factory Simulation: Ghana Chocolates

Chocolate Factory Simulation Project .

    W    O(t,t+1)        B(t)        T(t)        F(t)        R(t)    M(t,t+1)   
 ---------------------------------------------------------------------------
    1         50.         50.        250.        250.        150.        50.   
    2        100.        100.        200.        200.        200.        50.   
    3          0.          0.        300.        300.         50.        50.   
    4         50.         50.          0.          0.        400.        50.   
    5         50.        100.        125.        125.        325.        50.   
    6         50.         50.        120.        120.        280.        50.   
    7         50.         50.        117.        117.        283.        50.   
    8         50.         50.        114.        114.        286.        50.   
    9         50.         50.        112.        112.        288.        50.   
   10         50.         50.        111.        111.        289.        50.   
   11         50.         50.        110.        110.        290.        50.   
   12         50.         50.        109.        109.        291.        50.   
   13         50.         50.        108.        108.        292.        50.   
   14         50.         50.        108.        108.        292.        50.   
   15         50.         50.        107.        107.        293.        50.   
   16         50.         50.        107.        107.        293.        50.   
 ---------------------------------------------------------------------------


    W          50     1040/21          50     
 ---------------------------------------------------------------------------

 

NULL

NULL



Download suppress_warnins.mw

@lemelinm good luck! happy to hear u have solevd the problem.

 

NULL

restart:with(plots):

x := [seq]( (1/5)*i,i=0..12);  #  x[i] the x-coordinate

     

 

y := [seq]( (1/5)*j,j=0..12); # y[j] the y-coordinate

      

 

t := [seq]( (1/5)*k,k=0..12);  #  t[k] the t-coordinate

 

x := [0, 1/5, 2/5, 3/5, 4/5, 1, 6/5, 7/5, 8/5, 9/5, 2, 11/5, 12/5]

 

y := [0, 1/5, 2/5, 3/5, 4/5, 1, 6/5, 7/5, 8/5, 9/5, 2, 11/5, 12/5]

 

t := [0, 1/5, 2/5, 3/5, 4/5, 1, 6/5, 7/5, 8/5, 9/5, 2, 11/5, 12/5]

(1)

Tab:=seq(seq(seq([x[i],y[j],t[k]],i=1..3),j=1..3),k=1..3);

Tab := [0, 0, 0], [1/5, 0, 0], [2/5, 0, 0], [0, 1/5, 0], [1/5, 1/5, 0], [2/5, 1/5, 0], [0, 2/5, 0], [1/5, 2/5, 0], [2/5, 2/5, 0], [0, 0, 1/5], [1/5, 0, 1/5], [2/5, 0, 1/5], [0, 1/5, 1/5], [1/5, 1/5, 1/5], [2/5, 1/5, 1/5], [0, 2/5, 1/5], [1/5, 2/5, 1/5], [2/5, 2/5, 1/5], [0, 0, 2/5], [1/5, 0, 2/5], [2/5, 0, 2/5], [0, 1/5, 2/5], [1/5, 1/5, 2/5], [2/5, 1/5, 2/5], [0, 2/5, 2/5], [1/5, 2/5, 2/5], [2/5, 2/5, 2/5]

(2)

listplot3d([Tab]);

 

pointplot3d([Tab],color = magenta,axes = normal, symbol = box);

 

 

NULL

 

Download plotpoint3d.mw

do u have mathematical relation for this matrix ? if u have, please write it here,maybe it can be possible if we write a procedure which its input is r .

@Chia actually it seems that when u use print, print commands prints the elements of list of data itself and also print the list ([ ]) also which is not our goal here. if u use set ({ }) instead of list print will also get { } at the end of it , u can see :


restart:

Fun:=x->print(x^2);

proc (x) options operator, arrow; print(x^2) end proc

(1)

A:={seq}(i,i=1..4);

{1, 2, 3, 4}

(2)

map(Fun,A);op(%);

1

 

4

 

9

 

16

 

{}

(3)

 



Download map.mw

@J4James i think the problem has been changed !

@lemelinm i do not know why i can not insert content to here ! as carl love says, we can not compute what u want .




maple.mw

testfile.txt

 

@lemelinm u can also try this, which is so clearer than the maple defualt .
go to tools,options, go to display tab, change input display to maple notation, i think it is some what more clear . good luck

First 10 11 12 13 14 15 16 Last Page 12 of 23