sand15

1299 Reputation

15 Badges

11 years, 11 days

MaplePrimes Activity


These are replies submitted by sand15

@acer 

I vote up

@acer 

By the way, do you know whether modern Maple versions enable giving an axis a color, and the associated label another one, or yet, enable using attributes 'linestyle' or 'transparency' for an axis?

@AHSAN 

As I use Maple 2015 I wasn't capable to find any simple way to add the contour lines to the projected surface.
Maybe more recent versions have such feature?

Meanwhile there is a workaround:
With_Maple_2015.mw



By the way, have a look to the posts  @acer  wrote in the last two years and to the answers he gave to, if I'm not mistaken, quite similar problems.

@WD0HHU 

You can write all the quantities with the units you are the most at ease with and, before defining your system to solve, convert all of them in SI units.
For instance you can define Mars armospheric density in g/m3 , Mars mass in Kg, distances in Km and convert all of them in [Km, Kg, s].

@C_R 

Shouldn't you send a SCR?

This won't answer your question, but using `#mi("‰")` instead fixes the issue.
Don't ask me why...
(I always use this kind of syntax which enables managing font and color.)

kernelopts(version)

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

`‰`;
`#mi("‰")`

`‰`

 

`#mi("‰")`

(2)

`‰`;
`#mi("‰")`;

`‰`

 

`#mi("‰")`

(3)

`‰`;
`#mi("‰")`;

`‰`

 

`#mi("‰")`

(4)
 

 

Download mi.mw

@dharr 

EDITED 4:00 PM CET
 

See Equifinality

(in a few words the model  E(𝝊; A, C, E0, Em) is  non identifiable in the sense that different sets of parameter values (A, C, E0, Em) give essentially the same result...which is pretty obvious given there are only 3 observations and 4 parameters).

Nevertheless it is intructive to observe what are the 4-tuples (A, C, E0, Em) which give essentially the same result than the full paramolic model F := 𝝊 → a +b 𝝊 + c 𝝊2  in the (min..max)(nuvals) range.
ML_sand15_(MC).mw

Let (A) the family of models E(𝝊, A, C, E0, Em) defined by

C=-1.9e-19, 
E0=exp(21.17115-ln(A)), 
Em=-0.068883

whatever A in the range 1e-2 .. 1e5

All model in (A) are identical to the full parabolic fit F := 𝝊 → a +b 𝝊 + c 𝝊2  in the sense that 
evalf( Int( (F(𝝊) - E(𝝊, A, C, E0, Em))2, 𝝊 = (min..max)(nuvals) ) ) < 1e-6
.

 

... or in simpler form

restart;

with(geometry):

point(A, 2, -3):

point(B, -1, 6):

sort(Equation(line(d, [A, B], [x, y])));

-9*x-3*y+9 = 0

(1)

c := igcd( coeffs(lhs((1)), [x, y]) );
(1)/c;
-(1)/c;

3

 

-3*x-y+3 = 0

 

3*x+y-3 = 0

(2)
 

 

Download igcd.mw

@dharr 

The "not of full rank" thing is a numerical issue as shown (Maple inputs in normal black font) in the attached file.
Conversion of nuvals and Evals into rationals removes this "not of full rank issue" and leads to a parabolic model a+b
𝝊2 which is now quite good (in addition a fullparamolic model including 𝝊 is constructed, simply to verify that the system is of fullrank too).
MLfit_full_rank.mw

By the way I did some stuff around this full parabolic model a +b 𝝊 + c 𝝊2 .
The idea is basically the following:

  1. Let F := 𝝊 → a +b 𝝊 + c 𝝊2  the fitted model. 
  2. Find the 4-uple (A, C, E0, Em) which minimizes
           evalf( Int( (F(𝝊) - E(𝝊, A, C, E0, Em))2, 𝝊 = (min..max)(nuvals) ) )
    My first (unsuccessfull) attempt was to use  NLPSolve. So I thought using some user-made genetic algorithm instead but I don't know if it's worth spending time on it until the OP clarifies its needs ?

@MichaelVio 

"What is the value of A that I should start with so that the abs|Em| is the minimum possible, and the plot looks like shown above?"
Do you mean like the parabola shape you provide in your question?
If it is so just remove the axis[1]=[mode=log] in my plot command: ML_sand15_(2).mw (I use this log mode to separate the obervations)

case 1) I gave up the negative Em condition?
case 2) I gave up all conditions except E(nu) positive for nu = [~10^4 to ~2.8*10^10]?

Giving them up or not has no effect because they are not explicitely accounted for in the fitting process 

@dharr 

we both get essentially the same result using different approaches.

@MichaelVio
The problem as it is posed is intrinsically "ill posed" (between quotes).
The fact there are 4 parameters and 3 equations E(nuval[i]) = Eval[i], i=1..3, introduces some unnecessary complexity. So, to simplify, let us suppose the values of E(nu) are known at exactly 4 different locations.
We have then a smart system of 4 equations in 4 unknowns.
Let us assume this system has only one single solution (just to simplify, maybe there are a countable number of solutions).
Maybe this solution corresponds to |Em| < 0.00005 and you will be happy with it, but how will you react if this single solution corresponds to the value Em = 10?

@vv 

My guess is @yangtheary maybe wants to find a few examples of positive values of p, q, r, s, n, k (which are likeliy in infinite number too) which fullfill its relations.
For instance

{k = 17, n = 1, p = 16, q = 5, r = 19, s = 4568}
{k = 16, n = 1, p = 16, q = 3, r = 9, s = 3833}
...
{k = 18, n = 2, p = 17, q = 0, r = 18, s = 2757}
{k = 14, n = 2, p = 2, q = 1, r = 9, s = 817}
...

Here is a piece of code which returns such positive solutions positive_solutions.mw (random search)
As you see positive solutions seem to be more and more rare as n increases.

strictly_positive_solutions.mw is basically the same code for strictly positive values of p, q, r, s and k. Now no solution has been found (in a reasonable time, which does not mean that they do not exist) for n = 4.

@Andiguys 

What if I told you that whatever the rescaling of the y-axis the graph of OBJ will always remain "flat", as you say?.

I'm not going to tell you why it is so because I believe I would not be doing you any favor doing so.

So I only give you a hint (and I consider myself as being very generous): copy-paste this piece of code at the end of your worksheet and try to understand where the last result comes from

indets(`???`(i2), name);
         {Ce, Cn, Cr, Crm, alpha, delta, i2, rho0, tau}

indets(OBJ, name);
                               {}

Once you have understood your mistake correct it to get this

@Andiguys 

Your worksheet contains the lines

`???` := i2 -> 
piecewise(
i2 > K2, 
subs([n = 

instead of 

`???` := i2 -> 
piecewise(
i2 > K2, 
subs([Pn = 

This is why you get the 
Warning, expecting only range variable i2 in expression piecewise(.2692622951 < i2,.....to be plotted but found name Pn

When you get such a warning, which explicitely says the expression to plot depends on i2 and Pn, the right reflex is always to check what the expression depends on:

indets(OBJ, name)
                            {Pn, i2}
1 2 3 4 5 6 7 Last Page 3 of 35