tomleslie

13876 Reputation

20 Badges

15 years, 181 days

MaplePrimes Activity


These are replies submitted by tomleslie

In Maple 2017.3, no crash: I get

restart;
kernelopts(version);
Optimization:-LPSolve(2*x+5*y, {3*x-y=1, x-y<=5}, assume={nonnegative, integer});
 
Maple 2017.3, X86 64 WINDOWS, Sep 13 2017, Build ID 1262472
                      [12, [x = 1, y = 2]]

Similarly, in 2016.2

restart;
kernelopts(version);
Optimization:-LPSolve(2*x+5*y, {3*x-y=1, x-y<=5}, assume={nonnegative, integer});
 
Maple 2016.2, X86 64 WINDOWS, Jan 13 2017, Build ID 1194701
                      [12, [x = 1, y = 2]]

Similarly in 2015.2

restart;
kernelopts(version);
Optimization:-LPSolve(2*x+5*y, {3*x-y=1, x-y<=5}, assume={nonnegative, integer});

  Maple 2015.2, X86 64 WINDOWS, Dec 20 2015, Build ID 1097895
                      [12, [x = 1, y = 2]]

And in Maple 18.02

restart;
kernelopts(version);
Optimization:-LPSolve(2*x+5*y, {3*x-y=1, x-y<=5}, assume={nonnegative, integer});
 
  Maple 18.02, X86 64 WINDOWS, Oct 20 2014, Build ID 991181
                      [12, [x = 1, y = 2]]

Can't check Maple 17.02 - I don't have this loaded any more.

We have identical build IDs for Maple 2015.2 (ie 1097895 ) and Maple 18.02 (ie 991181 ) yet get different results!!

I mean wtf

Lsst thing I can think of is that it is OS-related. I'm running 64-bit Windows 7

Maple 2017.3:

restart;
kernelopts(version);
Optimization:-LPSolve( 3*x__1+14*x__2+18*x__3+6*x__4+2*x__5,
                       {3*x__1+5*x__2+6*x__3+2*x__4+x__5 <= 10},
                       binaryvariables=[x__1, x__2, x__3, x__4, x__5],
                       maximize = true
                      );

  Maple 2017.3, X86 64 WINDOWS, Sep 13 2017, Build ID 1262472
    [26, [x__1 = 0, x__2 = 0, x__3 = 1, x__4 = 1, x__5 = 1]]

#################################

Maple 2016.2

restart;
kernelopts(version);
Optimization:-LPSolve( 3*x__1+14*x__2+18*x__3+6*x__4+2*x__5,
                       {3*x__1+5*x__2+6*x__3+2*x__4+x__5 <= 10},
                       binaryvariables=[x__1, x__2, x__3, x__4, x__5],
                       maximize = true
                      );

  Maple 2016.2, X86 64 WINDOWS, Jan 13 2017, Build ID 1194701
    [26, [x__1 = 0, x__2 = 0, x__3 = 1, x__4 = 1, x__5 = 1]]

OK we have slightly different "build" versions for both 2016.2 and 2017.3. Regrettably I do not keep multiple build versions for a given Maple major/minor release - so I only have one build for Maple 2016.2 and one build for Maple 2017.3, and both work just fine.

Also Maple 2015.2

restart;
kernelopts(version);
Optimization:-LPSolve( 3*x__1+14*x__2+18*x__3+6*x__4+2*x__5,
                       {3*x__1+5*x__2+6*x__3+2*x__4+x__5 <= 10},
                       binaryvariables=[x__1, x__2, x__3, x__4, x__5],
                       maximize = true
                      );
 
Maple 2015.2, X86 64 WINDOWS, Dec 20 2015, Build ID 1097895
    [26, [x__1 = 0, x__2 = 0, x__3 = 1, x__4 = 1, x__5 = 1]]

and Maple 18.02

restart;
kernelopts(version);
Optimization:-LPSolve( 3*x__1+14*x__2+18*x__3+6*x__4+2*x__5,
                       {3*x__1+5*x__2+6*x__3+2*x__4+x__5 <= 10},
                       binaryvariables=[x__1, x__2, x__3, x__4, x__5],
                       maximize = true
                      );
 
  Maple 18.02, X86 64 WINDOWS, Oct 20 2014, Build ID 991181
    [26, [x__1 = 0, x__2 = 0, x__3 = 1, x__4 = 1, x__5 = 1]]

 

@Kitonum 

Maple 2017.3, Windows 64-bit in worksheet mode, answers from 1D and 2D input also differ

restart;

2.59/3.7, 3.42/3.8;

.7000000000, .9000000000

(1)

2.59/(3.7), 3.42/(3.8)

.7000000001, .8999999999

(2)

 


Now that really shouldn't happen


 

Maple 18.02, 2015.2, 2016.2 all produce the expected answer.

Maple 2017.3 produces the weird answer - and I have no idea why!

and re-executes multiple times to the same answers - so far as I can tell.

So what exaclty is the problem with this worksheet?

I suppose there is an outside chance, that your problem may be a Maple version/OS issue, so just to be clear: I'm running Maple 2017.3 on Windows 7, 64-bit.

Regrettably I can't run Maple 17 any more: Maple 18 is the earliest version I have available :-(

No-one here is going to retype your code from a "picture" in an attempt to replicate your problem.

This is why MaplePrimes provides you with a big green up-arrow in the toolbar, so that you can actually upload executable code.

So simple - just do it

in the attached

doPlot4.mw

The expression you supplied in your original post contains the 'variables'

 EI, F15, Fe, Jl, Jr, Le, Lm, beta, ml, mr, omega, sl, sr

Your second post defines the variables (I have changed the variable 'I' to 'II', because, in Maple, 'I' is the square root of -1 - so you really don't want to use this as a variable)

mr, t, rho, EI, beta, Jr, II, ml, E, OD, Ar, sl, omega, Jl, Lm, sr

Thus the following variables are defined but never used in your original expression

t, rho, II (I in your original), E, OD, Ar

and the following variables are used in your original expression, but never defined

F15, Fe, Le

Somehow you are going to have to come up with something consistent. Right now it seems as if you have no idea what variables are in your expression, which of these need definition, etc, etc.

See the attached

varProb.mw

See the additional execution group at the end of the attached

odeProb3.mw

I know that diff(x(t),t)=A(t), but you ask for

int(a1*diff(x(t),t) ,t),

so tell me, very precisely, what ypu mean by the above, which can be written as

a1*int(diff(x(t),t),t)

which is therefore (trivially)

a1*x(t).

In other words

int(a1*diff(x(t),t) ,t)=a1*int(diff(x(t),t),t)=a1*x(t)

Which of the equalities in the above do you believe to be wrong??? So my original question stands

First of all, if you want to fit a sinusoidal model curve to data, then you have to specify the ranges for at least some of the parameters. Consider a sinusoidal model function with frequency paramter 'f': if this fits the data, then so will a model function with frequencies '2*f', '3*f', etc. Similar problem with phase: if parameter 'phi' fits the data, then so will 'phi+2*Pi', 'phi+4*Pi', etc

In the attached, I have added an execution group which fits a sinusoidaal model to A(t), using parameter ranges which I estimated more-or-less "by eye". It is possible to produce these estimates programatically, but is trickier than you might expect to produce something whihc will work for all possible datasets. This estimation process will be very different if the data contains only a fraction of period, or multiple periods - so I haven't bothered to come with anything which would be completely "general". Fitting B(t) and C(t) is left "as an exercise for the reader"

odeProb2.mw

I don't understand the second part of you question, where you say you want to

calculate the integral int(a1*diff(x(t),t) +a2*diff(y(t),t)+a3*diff(z(t),t) );

Isn't this the same as

a1*int( diff(x(t),t) ,t) + a2*int( diff(y(t),t) ,t) + a3*int( diff(z(t),t) ,t)

which is

a1*x(t) + a2*y(t) +a3*z(t)

which is trivial to produce. What am I missing??

I must have missed the OP's "first version" - so I answered this version as a standalone problem

?How Do I Solve an Ordinary Differential Equation?

Scroll down far enough to

Taking Derivatives and Integrals of Numeric Solutions

and the first line states

To find the derivative or integral of a numeric solution, you should include ODEs for the derivative or integral in your system of equations.

If you check my original response, you will find that what I did was to include "ODEs for the derivatives" in the original system of equations

until now, no-one has used that argument.

I made the simple observation that the first ODE system could not be solved. Now almost inevitably that makes it "incompatible" with the second ODE system

Until and unless the first ODE system can be solved, then there is no hope of solving the second ODE system. I am assuming that the OP will be required to change the first ODE system in some way to make it "solvable". When I see this change, then I will try to decide on whether or not the two (revised) systems are "compatible"

First 107 108 109 110 111 112 113 Last Page 109 of 207