mahmood1800

260 Reputation

8 Badges

6 years, 51 days

Social Networks and Content at Maplesoft.com

PH.D in Applied Mathematics

MaplePrimes Activity


These are answers submitted by mahmood1800

please see if the following is your request?

g(x,t):=2*x+t:#(can be any other function)
 f(t):=int(g(x,t),x=a..b);

Hi there

I think your code has some errors

First of all, you want to minimize "obj"  under "cnsts" contraints while it is not a constraint. this is like to: "minimize A+B"
Under "C+D", so C+D equals to what? 0?1?2? or....?

please see the following to better understand

>restart;
> with(Optimization);
> with(plots);
> obj := (c0-x)^2+(c1-(2/3)*x-(1/3)*y)^2+(c2-(1/3)*x-(2/3)*y)^2+(c3-y)^2;
> cnsts := 32*x+19*y - 15*c0+18*c1+15*c2+3*c3;
>           Minimize(obj, {cnsts=2});

 


                       -16
  [0.122523514868939 10   , [c0 = 0.0324728625338177,

        c1 = 0.0295075458457925, c2 = 0.0265422291577672,

        c3 = 0.0235769124697419, x = 0.0324728625338178,

        y = 0.0235769124697419]]

Thanks a lot

the problem solved.....

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Dear's

So much thanks for your rapid and great answers....

Hope you best times

Regards

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

I have write following

p1.mws

 restart:alias(C=binomial):
 with(linalg):
 with(LinearAlgebra):
 m:=3:
 
 SpM:=proc(m::nonnegint)
 Matrix([seq([0 $ i, seq((-1)^k*C(m,i)*C(m-i,k), k=0..m-i)], i=0..m)]);
 end:
 A:=SpM(m):
 Ainverse:=A^(-1):
 Z:= DiagonalMatrix([seq(1/(i+1), i= 0..m)]):
 
 
 C0:=proc(m::nonnegint)
 Vector(m+1,i->C(m,i-1)/C(2*m+1,m+i)):
 
 end:
 C0(m):
 C1:=Transpose(%):
 
 B0:=Ainverse(2..m+1,1..-1):
 B:=Matrix(<B0,C1>);
 

B := Matrix(4, 4, {(1, 1) = 0, (1, 2) = 1/3, (1, 3) = 2/3, (1, 4) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1/3, (2, 4) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 1, (4, 1) = 1/35, (4, 2) = 1/7, (4, 3) = 3/7, (4, 4) = 1})

(1)

 

 

 

Download p1.mws

is this right one?

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi

 I have written following code but some things seem to be wrong:

hbf.mws

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Page 1 of 1