acer

32602 Reputation

29 Badges

20 years, 42 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

[edited] I've put my earlier Answer's commentary, into this attached copy of my earlier worksheet. That took about 7 minutes to find a point that attained about 1e-3 as largest equation residual of the problem cast as a global optimization problem. It turned out that minimum point could be used by fsolve to quickly find an actual root. kompletter_nachbau_v0_acer_fsolve_commented.mw

The methodology includes eliminating h[0] by equating the rhs's of two pairs from the three equations containing that that variable (after isolating for it). The variable p was treated specially, and bounds supplied for all remaining variables.

Later, it occurred to me that fsolve could be attempted for every p value attempted, following the inner DirectSearch:-SolveEquations step. I then discovered that the first p value tried was succeeding, for a variety of fixed p values within some bounds. This cut the total computation time down from about 7 minutes to about 7 seconds. And it allows finding multiple distinct roots. kompletter_nachbau_v0_acer_fsolve_3.mw

Then it occurred to me that perhaps having a starting point (for fsolve) that was close to globally optimal in the (sum of squares of residuals) optimization problem might not be necessary for fsolve to succeed in finding an actual root. So here is a revision where SolveEquations provides a feasible (all equations real-valued) starting point for fsolve, where that point may not be particularly close to optimal. The evaluationlimit option is passed to SolveEquations with a relatively small value of 1000. And this subsequently produces an actual root from fsolve. And there are no ranges supplied for any of the variables. And the whole thing takes 1.5 seconds on a fast machine.

(I've put the equations into the Startup Code region, so they don't take up space here.)
Download kompletter_nachbau_v0_DS_fsolve.mw

restart

with(DirectSearch):

str := time[real]():

gleichungssystem2 := subs({Inputparameter}, gleichungssystem1)

altraw := map(lhs-rhs, subs(convert({Inputparameter},rational,exact),
                            gleichungssystem1)):

# Equations containing h[0]
#
h0eqns := [seq(`if`(has(altraw[i], h[0]), i, NULL), i=1..nops(altraw))];

[14, 15, 16]

# Eliminate h[0]
#
extra := rhs(isolate(altraw[14],h[0])) - rhs(isolate(altraw[15],h[0])),
         rhs(isolate(altraw[16],h[0])) - rhs(isolate(altraw[15],h[0])):
alt := altraw[1..13] union {extra}:

# Conditions ensuring arguments of radicals are positive
#
conds := {seq(op(1,aaa)>=0, aaa=indets(alt,radical))}:

 

# Low evaluationlimit may suffice, as it seems what fsolve needs
# is no so much a point that is optimal (of sum of squares of residuals)
# but rather just a decent feasible point (all equations evaluate to real).
#
DSSE := DirectSearch:-SolveEquations([op(gleichungssystem2)],
                                     conds, # union {p>0, p<1e-4},
                                     evaluationlimit=1000):

# Use previous optimal point as initial point to solve those
# same equations. (Weird, that SolveEquation doesn't do this bit.)
#
fans := fsolve(alt, remove(has,{op(DSSE[3])},h[0]));

{p = 0.5873104761e-4, T[0] = -3226.477932, T[1] = -10389.65995, T[2] = -13287.95780, T[3] = -5690.196806, T[4] = -8730.784993, T[5] = -10039.07912, T[6] = 3758.058761, T[7] = 3822.377886, T[8] = 4927.420763, T[9] = 5853.670172, T[10] = 8255.256673, T[11] = 9846.839687, T[12] = 19780.45791, T[13] = 48411.97339}

# Evaluate all original equations at `fans` values, and compute
# h[0] as optimization problem.
#
h0sol := SolveEquations( [op(eval(select(has,gleichungssystem2,{h[0]}), fans))] ):
h0sol[3];

[h[0] = HFloat(-0.00817591521032101)]

# Now fsolve original equations using previous fsolve result
# along with new optimizing h[0] value as starting point.
#
final := fsolve(gleichungssystem2, fans union {op(h0sol[3])});

{p = 0.5873104761e-4, T[0] = -3226.477932, T[1] = -10389.65995, T[2] = -13287.95780, T[3] = -5690.196806, T[4] = -8730.784993, T[5] = -10039.07912, T[6] = 3758.058761, T[7] = 3822.377886, T[8] = 4927.420763, T[9] = 5853.670172, T[10] = 8255.256671, T[11] = 9846.839687, T[12] = 19780.45791, T[13] = 48411.97339, h[0] = -0.8175915566e-2}

map(rhs-lhs, eval(gleichungssystem2, final));

{-0.1e-5, -0.2e-9, -0.1e-9, -0.5e-10, -0.24e-10, 0., 0.1e-9, 0.6e-9, 0.13e-8, 0.15e-8, 0.16e-8, 0.2e-8, 0.3e-8}

(time[real]() - str)*'seconds';

1.498*seconds

 

 

Firstly, you need to upload an actual Worksheet or Document, if you want us to be able to see precisely what you have. Use the big green arrow in the Mapleprimes editor pane, to upload and attach.

You need to fix your brackets, which don't always match in several of your examples.

Eg. the call to the eval command in your second proc has mismatched round brackets. It's missing the closing bracket.

And in one of your calls to the procedure you have mismatched square brackets.

There are other syntax problems, some possibly related to attempts at getting implicit multiplication. But it's impossible to be sure without an actual upload.

If 2D Input in a Document is too much trouble for you, you can change the preference to be 1D plaintext Maple notation in  Worksheet. (I suggest this, for new users.)

eq := a*b=a*c;

                        eq := a b = a c

gcd(rhs(eq), lhs(eq))

                               a

map(`/`, eq, gcd(rhs(eq), lhs(eq)));

                             b = c

The assignment W:=V does not make W into a distinct and independent copy of V. It makes W a reference to V. And so, as written, your procedure acts in-place on V.

Change that line to W:=copy(V) if you do not want the operations on entries of W to be operations on V.

See also Section 6.7 of the Programming Manual, Using Data Structures with Procedures.

restart;

switch := proc(V::Vector)
description "This procedure is supposed to take a Vector V and switch entries 1 and 2";
local W,a,b;
W:= copy(V);
a:= W[1];
b:= W[2];
W[1 ] := b;  
W[2] :=a;
W
end proc:

V1:=Vector([1,3,5]);

Vector(3, {(1) = 1, (2) = 3, (3) = 5})

V2:=switch(V1);

Vector(3, {(1) = 3, (2) = 1, (3) = 5})

V1;

Vector(3, {(1) = 1, (2) = 3, (3) = 5})

 

Download awass_copy_vs_inplace.mw

Why presume that the plot command is thread-safe? (It isn't.) Most Library commands are not.

There are many ways for a Library procedure (or module) to be thread-unsafe. (Use of declared globals in procedures is just one of several ways.)

As of Maple 2018, there is no working mechanism to query for thread-safety of an arbitrary Library procedure.

Nor is there any mechanism to work around partial thread-safety by blocking only the thread-unsafe bits.

If such mechanisms existed then there would likely be a great deal more use of the Threads package by other stock commands.

You could also try Grid:-Seq , but be forewarned that it has even worse overhead than Threads, so is less suitable for fine-grained lower level parallelism. And even Threads is not very good there.

But you might be able to effectively distribute calls to a proc that produced many plots of the total sequence. Suppose you wanted 100 frames altogether. You may be able to get a reasonable improvement by calling Grid:-Seq on a call to a custom procedure that individually constructed say 1/4 or 1/2 of those 100 for each call.

If you have executed something like with(IrisData), so that the name Species is rebound, then you may need to reference the global in order to make the kind of indexed reference you have in your posted image of a call to GridPlot.

That is, use the name  IrisData[':-Species']  instead of just IrisData[Species] .

At the end of this attachment I explain the same thing, using the `Sepal Length` example which throws an error when your attached Worksheet is executed as it is. That is, you can always use IrisData[':-`Sepal Length`'] , whether you have or have not executed with(IrisData).

restart

``

with(Statistics)

 

Les Iris de Fisher

 

Les données utilisées ici sont célèbres. Elles ont été collectées par Edgar Anderson . Ce sont les mesures en centimètres des variables suivantes :

1. 

 longueur du sépale (Sepal.Length),

2. 

largeur du sépale (Sepal.Width),

3. 

longueur du pétale (Petal.Length)

4. 

 largeur du pétale (Petal.Width)

pour trois espèces d’iris :

1-Iris setosa,

2-Iris versicolor

3-Iris.virginica.
Sir R.A. Fisher a utilisé ces données pour construire des combinaisons linéaires des variables permettant de séparer au mieux les trois espèces d’iris

 

``

``

 

 

 

 

 

 

NULL

Accès aux données internes

 

NULL

Pour connaître  les données de la distribution de base :

kernelopts(datadir); FileTools:-ListDirectory(FileTools:-JoinPath([kernelopts(datadir), "datasets"]))

["sunspots.csv", "builtin.db", "air_passengers.csv", "canada_crimes.csv", "iris.csv", "fertility_rates.csv"]

Afficher les données

 

IrisData := Import(FileTools:-JoinPath(["datasets", "iris.csv"], base = datadir))

_m139706550967776

NULL

Describe(IrisData)

IrisData :: DataFrame: 150 observations for 5 variables
Sepal Length:  Type: anything  Min: 4.30  Max: 7.90
Sepal Width:   Type: anything  Min: 2.00  Max: 4.40
Petal Length:  Type: anything  Min: 1.00  Max: 6.90
Petal Width:   Type: anything  Min: 0.10  Max: 2.50
Species:       Type: anything  Tally: ["versicolor" = 50, "setosa" = 50, "virginica" = 50]

NULL

CLabels := ColumnLabels(IrisData)

[`Sepal Length`, `Sepal Width`, `Petal Length`, `Petal Width`, Species]

SunSpotsData := Import(FileTools:-JoinPath(["datasets", "sunspots.csv"], base = datadir))

NULL

Describe(SunSpotsData)

SunSpotsData :: DataFrame: 314 observations for 2 variables
Date(Date:-year,Date:-month,Date:-day,Date:-hour,Date:-minute,Date:-second,timezone = Date:-timezone,coefficient = Date:-coeff):  Type: anything  Min: 1700.00  Max: 2013.00
Mean Sunspot Number:                                                                                                              Type: anything  Min: 0.00  Max: 190.20

FertilityData := Import(FileTools:-JoinPath(["datasets", "fertility_rates.csv"], base = datadir))

NULL

Describe(FertilityData)

FertilityData :: DataFrame: 36 observations for 1 variables

Fertility Rate - 2015:  Type: anything  Min: 1.31  Max: 1.96

PassengersData := Import(FileTools:-JoinPath(["datasets", "air_passengers.csv"], base = datadir))

NULL

Describe(PassengersData)

PassengersData :: DataFrame: 144 observations for 1 variables
Monthly Passengers:  Type: anything  Min: 104.00  Max: 622.00

CrimeData := Import(FileTools:-JoinPath(["datasets", "canada_crimes.csv"], base = datadir))

Describe(CrimeData)

CrimeData :: DataFrame: 13 observations for 5 variables

Violent Crime:          Type: anything  Min: 786.62  Max: 7934.95
Property Crime:         Type: anything  Min: 2100.84  Max: 23171.26
Other Criminal Code:    Type: anything  Min: 450.29  Max: 13834.45
Criminal Code Traffic:  Type: anything  Min: 211.57  Max: 1689.95
Federal Statute:        Type: anything  Min: 215.34  Max: 1331.87

NULL

NULL

NULL

Manipulation de IrisData

 

NULL

IrisData

_m139706550967776

IrisData[Species]

NULL

convert(%, set)

{"setosa", "versicolor", "virginica"}

NULL

IrisData[`Sepal Length`]

_m139706541154592

NULL

IrisData[`Sepal Width`]

_m139706541155936

NULL

NULL

IrisData[1 .. 4]

_m139706537258624

NULL

NULL

IrisNum := IrisData[() .. -2]

_m139706551924128

NULL

IrisData[() .. -3]

_m139706540366816

NULL

NULL

NULL

Sommaire statistique

 

 

interface(displayprecision = 4)

DataSummary(IrisNum, summarize = embed)

NULL

Normaliser les données et Histogrammes

 

Median(IrisNum)

_m139706533649376

Histogram(IrisData[:-`Sepal Length`], discrete)

Scale(IrisData[:-`Sepal Length`])

_m139706534007936

scaled := %

_m139706534007936

Mean(scaled), StandardDeviation(scaled)

HFloat(-1.3796371452675278e-15), HFloat(0.9999999999999989)

Histogram(scaled, discrete)

scaled2 := Scale(IrisData[:-`Sepal Length`], center = Median, scale = MedianDeviation)

_m139706691348896

Median(scaled2), MedianDeviation(scaled2)

HFloat(0.0), HFloat(1.0)

Histogram(scaled2, discrete)

Scale(IrisNum)

_m139706541149440

allscaled := %

_m139706541149440

Histogram(allscaled[1], discrete)

NULL

NULL

Aggregate

 

Aggregate(IrisData, :-Species)

_m139706550990496

Aggregate(IrisData, :-Species, function = StandardDeviation, tally)

_m139706688688416

Aggregate(IrisNum, :-`Petal Width`, bounds = quantiles(0, 1/3, 2/3, 1), tally)

_m139706554297024

NULL

Visualisation

 

NULL

with(IrisData)

[`Sepal Length`, `Sepal Width`, `Petal Length`, `Petal Width`, Species]

NULL

LineChart(`Sepal Length`)

NULL

LineChart(IrisNum)

NULL

AreaChart(`Sepal Length`, markers = false)

NULL

AreaChart(IrisNum, datasetlabels = [`$`(``, 150)], markers = false)

NULL


Tom Leslie suggested the following, for before with(IrisData) is executed.
That worked, before that calls to with. But it doesn't work afterwards.

Histogram(IrisData[`Sepal Length`], discrete)

Error, (in DataFrame:-?[]) invalid row index into DataFrame: non-Boolean DataSeries

 

The following works both before and after calling with(IrsiData) .
This seems like your problem in the posted image of code that
called GridPlot.

 

Histogram(IrisData[:-`Sepal Length`], discrete)

 

The following works even if someone assigns any value to the unprotected
name `Sepal Length`.

 

:-`Sepal Length` := 55; Histogram(IrisData[':-`Sepal Length`'], discrete)

55

 

Download IRISdata_ac.mw

 

 

Sometimes the assuming command can get some desired results, without the awkwardness of managing names whose previous assumption have been cleared.

restart;

assume(x>0);

# It can be handy to keep a reference to the
# assumed name, for use below.
#
xa := x;

x

f := sqrt(x);

x^(1/2)

is(f, real);

true

# Remove assumption on x
#
x := 'x';

x

# These are distinct, since f contains the
# assumed name.
#
f - sqrt(x);

x^(1/2)-x^(1/2)

# Substitute for the assumed name.
#
eval(f, xa=x);

x^(1/2)

# Now we can mix the two forms
#
eval(f, xa=x) - sqrt(x);

0

restart;

f := sqrt(x);

x^(1/2)

is(f, real);

false

is(f, real) assuming x>0;

true

 

Download clear_assmp.mw

[edited] I may well have misinterpreted this Question earlier.

Originally I interpreted the question as being about why the timing differences varied, using the same mechanism.

Carl's response below makes me think that the OP may instead be asking why the timing differnce using time[real] varies from that using ProcessClock. So now this Answer has been rewritten.

But I'd still say that comparing such very small timings isn't generally sound. Moreover, in the posted examples the overhead of the time-queries, and the order of their execution, and the printing of output and communication with the GUI, may all interfere. So I don't think that this is a robust testing example for very small timings.

In an earlier Question I recemmended that the OP use the time[real] command, for finding real-world wall clock elapsed time. I'll stand by that. I don't advocate using ProcessClock for that purpose, as I don't think that it's suitable for the job.

To compare wall-clock time, use the command time[real]() at start and at finish, and then take the difference.

This could measure how long it takes a student to respond, between steps or in total, in your interactive application.

Try this.

animation_CommandPlease_ac.mw

There are various keywords for controlling an animation within a Plot Component. These are documented on the PlotComponent Help page.

[edited] You did not say, at all, what kind of animation of sin(x) (or whatever) that you wanted. So I made one up. Tom made up another. The key thing is the use of the SetProperty command and the play keyword, I think. That's is the purpose of this line of code that I wrote at the end of the Button's action code,
   SetProperty("Plot0", ':-play', true, ':-refresh'=true);

[edited] The originating point, where the period cycles, is different. In a sense the cross "crosses" there, since it overlaps with itself. I may need to re-implement the approach.

restart;

eq:=[sin(6*t),cos(2*t)]:

All:={eliminate(Equate(eq,eval(eq,t=s)),[t,s])}:
Temp:=map[2](op,1,All):
Temp:=remove(u->nops(eval({s,t},u))=1, Temp):

LK:=[seq(eval(eq,uu)=uu, uu=Temp)]:
T:=table(LK):
Ans:=[seq(T[uu],uu={seq(lhs(u),u=LK)})];

[{s = Pi, t = 0}, {s = (2/3)*Pi, t = (1/3)*Pi}, {s = (5/6)*Pi, t = (1/6)*Pi}]

BG:=plots:-display(
  plot(map(a->eval(eq,a),Ans),style=point,color=blue,
       symbolsize=25,symbol=solidcircle),
  plot([op(eq),t=0..Pi],color=red),
  gridlines=false
):

BG;

 

Download intersect2.mw

If I understand you, the query is about deriving/constructing the Sum (since we could always just enter it by hand, but that's not exciting).

I'm not aware of anything like a Split (in SumTools or wherever). So that part is manual (but a procedure for it could be written easily, for re-use).

I would not be surprised it were relatively easy to fix up the sign on -a, or expand wrt a instead, or fix up the binomial to be the prettier equivalent.

restart;

expr := (a+b)^n;

(a+b)^n

H := combine(convert(expr, FormalPowerSeries, a),power) assuming n::posint, b>0;

Sum(b^(n-k)*pochhammer(-n, k)*(-a)^k/factorial(k), k = 0 .. infinity)

Y :=  op(0,H)(op(1,H),lhs(op(2,H))=op(1,rhs(op(2,H)))..n)
    + op(0,H)(op(1,H),lhs(op(2,H))=n+1..op(2,rhs(op(2,H))));

Sum(b^(n-k)*pochhammer(-n, k)*(-a)^k/factorial(k), k = 0 .. n)+Sum(b^(n-k)*pochhammer(-n, k)*(-a)^k/factorial(k), k = n+1 .. infinity)

Y1,Y2:=op(Y);

Sum(b^(n-k)*pochhammer(-n, k)*(-a)^k/factorial(k), k = 0 .. n), Sum(b^(n-k)*pochhammer(-n, k)*(-a)^k/factorial(k), k = n+1 .. infinity)

A := convert(Y1 + value(Y2),binomial) assuming n::posint;

Sum(b^(n-k)*binomial(-n+k-1, -n-1)*(-a)^k, k = 0 .. n)

value(A);

(a+b)^n

 

Download binomialSum.mw

Why I'd agree with Kitonum that is can often be a way to go with such things, 

verify(2*cos(phi)^2-1, cos(2*phi), simplify);

                   true

Note that verify,equal may rely upon signum, and,

signum(2*cos(phi)^2-1 - cos(2*phi));

              /          2                 \
        signum\2 cos(phi)  - 1 - cos(2 phi)/

simplify(signum(2*cos(phi)^2-1 - cos(2*phi)));

                   0

Here is something, under assumptions like k::posint, x::real, etc.

(Btw, are those Mathematica results valid everywhere? I don't feel like typing them in.)

restart;

kernelopts(version);

`Maple 2018.0, X86 64 LINUX, Mar 9 2018, Build ID 1298750`

P := value(int(sin(x)^k, x)) assuming k::posint, k::even;

-(-k*sin(x)^(1+k)*hypergeom([1, 1+(1/2)*k], [3/2+(1/2)*k], sin(x)^2)/(1+k)+2*sin(x)*arcsin((sin(x)^2)^(1/2))*(-1)^k*GAMMA(1/2+(1/2)*k)/(Pi^(1/2)*(sin(x)^2)^(1/2)*(1-sin(x)^2)^(1/2)*GAMMA((1/2)*k)))*cos(x)/k+GAMMA(1/2+(1/2)*k)*(-1)^((1/2)*k)*x/(Pi^(1/2)*(-1)^(-(1/2)*k)*GAMMA(1+(1/2)*k))

GP := simplify(convert(P,StandardFunctions)) assuming x>0, x<Pi/2;

sin(x)^(1+k)*hypergeom([1, 1+(1/2)*k], [3/2+(1/2)*k], sin(x)^2)*cos(x)/(1+k)

eval(GP, k=4);
simplify(convert(%, elementary)) assuming x>0, x<Pi/2;

(1/5)*sin(x)^5*hypergeom([1, 3], [7/2], sin(x)^2)*cos(x)

(1/8)*(2*cos(x)^3-5*cos(x))*sin(x)+(3/8)*x

simplify(int(sin(x)^4, x));

(1/8)*(2*cos(x)^3-5*cos(x))*sin(x)+(3/8)*x

evalf(eval(GP, [k=4,x=-1.4]));

-.4215258808

int(sin(x)^4, x=0..-1.4);

-.4215258800

G2 := simplify(expand(convert(P,elementary))) assuming x>Pi/2, x<Pi, k::posint, k::even;

(1/2)*(cos(x)*sin(x)^(1+k)*hypergeom([1, 1+(1/2)*k], [3/2+(1/2)*k], sin(x)^2)*Pi^(1/2)*GAMMA((1/2)*k)*k+2*GAMMA(1/2+(1/2)*k)*(x+arcsin(sin(x)))*(1+k))/(Pi^(1/2)*(1+k)*GAMMA(1+(1/2)*k))

evalf(eval(G2, [k=4,x=2.7])), int(sin(x)^4, x=0..2.7);

1.175036864, 1.175036865

G3 := combine(simplify(combine(expand(convert(P,StandardFunctions))))) assuming x::real, k::posint, k::even;

(cos(x)*sin(x)^(1+k)*hypergeom([1, 1+(1/2)*k], [3/2+(1/2)*k], 1/2-(1/2)*cos(2*x))*Pi^(1/2)*GAMMA(1+(1/2)*k)-2*signum(sin(2*x))*arcsin(abs(sin(x)))*GAMMA(3/2+(1/2)*k)+2*GAMMA(3/2+(1/2)*k)*x)/(Pi^(1/2)*GAMMA(1+(1/2)*k)*k+Pi^(1/2)*GAMMA(1+(1/2)*k))

plot([eval(G3,k=4), Int(sin(X)^4, X=0..x)], x=-10.0 .. 10.0,
     style=[line,point], adaptive=false, numpoints=50, size=[500,200]);

Po := value(int(sin(x)^k, x)) assuming k::posint, k::odd;

-sin(x)^(-1+k)*JacobiP((1/2)*k-1/2, -(1/2)*k, 1/2, (sin(x)^2-2)/sin(x)^2)*GAMMA(1/2+(1/2)*k)*GAMMA(1-(1/2)*k)*cos(x)/(Pi^(1/2)*k)

plot([eval(Po,k=3), Int(sin(X)^3, X=Pi/2..x)], x=-10.0 .. 10.0,
     style=[line,point], adaptive=false, numpoints=50, size=[500,200]);

 

Download int_k.mw

restart

kernelopts(version);

`Maple 18.02, X86 64 LINUX, Oct 20 2014, Build ID 991181`

`print/%*` := proc () `&dot;`(args) end proc:

interface(imaginaryunit = IU):

Ke := `%*`(2*I*E/l^3, `<,>`(`<|>`(6, 3*l, -6, 3*l), `<|>`(3*l, 2*l^2, -3*l, l^2), `<|>`(-6, -3*l, 6, -3*l), `<|>`(3*l, l^2, -3*l, 2*l^2)))

Ke := `&dot;`(2*I*E/l^3, Matrix(4, 4, {(1, 1) = 6, (1, 2) = 3*l, (1, 3) = -6, (1, 4) = 3*l, (2, 1) = 3*l, (2, 2) = 2*l^2, (2, 3) = -3*l, (2, 4) = l^2, (3, 1) = -6, (3, 2) = -3*l, (3, 3) = 6, (3, 4) = -3*l, (4, 1) = 3*l, (4, 2) = l^2, (4, 3) = -3*l, (4, 4) = 2*l^2}))

Ke

`&dot;`(2*I*E/l^3, Matrix(4, 4, {(1, 1) = 6, (1, 2) = 3*l, (1, 3) = -6, (1, 4) = 3*l, (2, 1) = 3*l, (2, 2) = 2*l^2, (2, 3) = -3*l, (2, 4) = l^2, (3, 1) = -6, (3, 2) = -3*l, (3, 3) = 6, (3, 4) = -3*l, (4, 1) = 3*l, (4, 2) = l^2, (4, 3) = -3*l, (4, 4) = 2*l^2}))

value(Ke)

Matrix(4, 4, {(1, 1) = 12*I*E/l^3, (1, 2) = 6*I*E/l^2, (1, 3) = -12*I*E/l^3, (1, 4) = 6*I*E/l^2, (2, 1) = 6*I*E/l^2, (2, 2) = 4*I*E/l, (2, 3) = -6*I*E/l^2, (2, 4) = 2*I*E/l, (3, 1) = -12*I*E/l^3, (3, 2) = -6*I*E/l^2, (3, 3) = 12*I*E/l^3, (3, 4) = -6*I*E/l^2, (4, 1) = 6*I*E/l^2, (4, 2) = 2*I*E/l, (4, 3) = -6*I*E/l^2, (4, 4) = 4*I*E/l})

 

Download 2d_inert_star_M18.mw

First 164 165 166 167 168 169 170 Last Page 166 of 339