brian bovril

749 Reputation

16 Badges

13 years, 95 days

MaplePrimes Activity


These are answers submitted by brian bovril

Tools, Options... ,Display, Typesetting level. Maple Standard or Extended.

I pinched this idea from tomleslie 

export_maple_to_mma.mw

I found 120 permutations.

A "please" would be nice in future.

download the DirectSearch add-on

DirectSearch[GlobalOptima]((1-y^2)/(x^2), [x^2 + y^2 <= 1,x>=1/2],maximize)


[4., [x = .500000000000000, y = -5.21804821573824*10^(-15)], 211]

In light of vv comments:

DirectSearch[GlobalOptima](fse32_2,[p=1..9],maximize)

will find the global maximum

I think your problem is likely non-linear, so the native NLPSolve command is applicable. Problem is it doesn't have a assume=binary option (well not on my version). If x[2,3] is a required binary variable you might input the constraint x[2,3]*(x[2,3]-1)=0, with option=non negative and minimize/maximize your expression assuming integer. It would be helpful if you could upload your worksheet using the green arrow.

If it doesn't work you could shell out for the Optimization Package, or download the DirectSearch package for free.

http://www.maplesoft.com/applications/view.aspx?SID=101333

With constraints as above, assume=posint. 

 

an alternative solution. edited. purhaps not the spirit of your course notes ( like vv or C.Loves sols).

cartesian.mw

int(int(x^2+sqrt(y),y=0..x),x=1..1.5,method=trapezoid);

1.48380525616829

You have to save the GetMircrosoftJob as a text file in the same directory as the maple file  GetMircrosoftJob.mw

(contents copied from  http://www.math.rutgers.edu/~zeilberg/tokhniot/GetMicrosoftJob)

using Joe Riels code:

http://www.mapleprimes.com/questions/200175-Help-With-fsolve#comment200707

asolve(sin(Pi*(x+1)/(4*x^2-4*x+2))=cos(Pi*(x-2)/(4*x^2-4*x+2)), x, -2..2);    

{x = -0.618033988749895, x = 0.276393202250021, x = 0.723606797749979,  x = 1.00000000000000, x = 1.61803398874989}

 

After importing the code into maple classic worksheet, you go: Ctrl F...then put > in the Find field, then hit Replace All.

 the Student[NumericalAnalysis] subpackage will satisfy your every need.

eg ?Falseposition

1 2 Page 1 of 2