## Problem with solving for C1 and C2...

ode_problem.mw Can someone please look at this? I am having a problem with the ordinary differential equations.

## 'fsolve' statement is only rewritting the equation...

Hello there,

I'm pretty new to MAPLE so this may probably an "easy" mistake, but I don't know what's the problem anyway...

I'd like to find a solution to a system of four equations with four unknowns:

fsolve({(T[1]-T[0])/(10000-T[1]+T[0]) = -2.000000000, (T[2]-T[0])/(20000-T[2]+T[0]) = 0, (T[3]-T[0])/(50000-T[3]+T[0]) = 50, .1*T[0]+.3*T[1]+.55*T[2]+0.5e-1*T[3]-5000 = 0}, {T[0], T[1], T[2], T[3]})

Problem: Instead of providing the single solutions, MAPLE is simply just rewriting the fsolve-statement and does not solve. There is no error-message.

Does anybody know, what the problem is here? Is there no solution after all?

## How to check that an n*n matrix is an MDS matrx wh...

An n*n matrix A is called an MDS matrix over an arbitrary field if all determinant of square sub-matrices of A are non-zero over the field. It is not difficult to prove that the number of all square sub-matrices of A is binomial(2*n, n)-1. The code that I use to check whether A is an MDS matrix is in the following form

u := 1;
for k to n do
P := choose(n, k);
for i to nops(P) do
for j to nops(P) do
F := A(P[i], P[j]);
r := Determinant(F);
if r = 0 then

u := 0; k:=n+1;

i := nops(P)+1; j := nops(P)+1;

end if;

end do;

end do;
if u = 1 then

print(A is an MDS Matrix)

end if;
end do:

When I run the mentioned code for n=16, it takes long time since we need to check binomial(32, 16)-1=601080389 cases to verify that A is an MDS matrix or not.

My Question: Is there a modified procedure which can be used to check that an n*n matrix is  whether an MDS matrix for n>=16.

## how to fix bug on DirectSearch package?...

i'm doing an optimaztion for my final project. when i execute the coding, it says:

Warning, initial point [m1 = .900000000000000, m2 = .900000000000000, m3 = .900000000000000, sigma1 = .900000000000000, sigma2 = .900000000000000, sigma3 = .900000000000000] does not satisfy the inequality constraints; trying to find a feasible initial point
Error, (in DirectSearch:-Search) cannot find feasible initial point; last infeasible trial point is [m1 = HFloat(0.9), m2 = HFloat(1.9), m3 = HFloat(1.9), sigma1 = HFloat(1.9), sigma2 = HFloat(0.9), sigma3 = HFloat(0.9)].

here my full coding:

restart;
with(linalg);
with(Optimization);
with(DirectSearch);
[BoundedObjective, CompromiseProgramming, DataFit,

ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax,

ModifiedTchebycheff, Search, SolveEquations, WeightedProduct,

WeightedSum]
q := Array(0 .. .111, [0.586e-2, 0.67475e-3, 0.52476e-3, 0.419785e-3, 0.354814e-3, 0.324859e-3, 0.319948e-3, 0.31e-3, 0.295013e-3, 0.28e-3, 0.259974e-3, 0.25496e-3, 0.26e-3, 0.270027e-3, 0.280026e-3, 0.284987e-3, 0.274934e-3, 0.279893e-3, 0.294824e-3, 0.324765e-3, 0.374672e-3, 0.439555e-3, 0.509439e-3, 0.56934e-3, 0.60923e-3, 0.634201e-3, 0.634233e-3, 0.624319e-3, 0.61442e-3, 0.624491e-3, 0.6495e-3, 0.684465e-3, 0.714452e-3, 0.729463e-3, 0.749451e-3, 0.789387e-3, 0.864347e-3, 0.964331e-3, 0.1064261e-2, 0.119413e-2, 0.1333876e-2, 0.150354e-2, 0.1683293e-2, 0.1883023e-2, 0.2102591e-2, 0.2356929e-2, 0.2656062e-2, 0.3004981e-2, 0.3403637e-2, 0.3841874e-2, 0.4349482e-2, 0.4931339e-2, 0.5587622e-2, 0.6293742e-2, 0.7044467e-2, 0.780967e-2, 0.8563865e-2, 0.9291539e-2, 0.9987678e-2, 0.10677379e-1, 0.1139506e-1, 0.12195833e-1, 0.13108819e-1, 0.14262384e-1, 0.15557439e-1, 0.17002799e-1, 0.18574592e-1, 0.20263971e-1, 0.22103523e-1, 0.24043337e-1, 0.26165465e-1, 0.28548531e-1, 0.31489568e-1, 0.3458584e-1, 0.37891201e-1, 0.41511365e-1, 0.45444649e-1, 0.49867283e-1, 0.54877269e-1, 0.60478547e-1, 0.66532745e-1, 0.7397857e-1, 0.81900977e-1, 0.90034141e-1, 0.98921462e-1, .108746024, .11839162, .130752255, .14368791, .157201822, .169770195, .177233464, .188823516, .204733363, .224639756, .249617627, .273409998, .298674064, .304378882, .319592743, .342821691, .367512872, .395257421, .426270115, .460795318, .498484563, .537417055, .577542345, .618093683, .660441764, .703856817, 1]);
variables = [m1, m2, m3, sigma1, sigma2, sigma3];
variables = [m1, m2, m3, sigma1, sigma2, sigma3]
psi1 := 0.11480601e-1; psi2 := 0.8890123e-2; psi3 := .979629276;
0.011480601
0.008890123
0.979629276
s1(x):=exp(-(x/(m1))^((m1/(sigma1)))):  s1(x+1):=exp(-((x+1)/(m1))^((m1/(sigma1)))):  s2(x):=1-exp(-(x/(m2))^((-m2/(sigma2)))):  s2(x+1):=1-exp(-((x+1)/(m2))^((-m2/(sigma2)))):  s3(x):=exp(exp(-m3/(sigma3))-exp((x-m3)/(sigma3))): s3(x+1):=exp(exp(-m3/(sigma3))-exp((x+1-m3)/(sigma3)))  :  s(x):=(psi1*s1(x)+psi2*s2(x)+psi3*s3(x)): s(x+1):=(psi1*s1(x+1)+psi2*s2(x+1)+psi3*s3(x+1)):   qtopi(x):=1-((s(x+1))/(s(x))):
fungsikerugian := add((1-qtopi(x)/q[x])^2, x = 0 .. .110);
for x from 0 to 111 do c1[x] := 0 <= s1(x+1); c2[x] := 1 >= s1(x+1); c3[x] := 0 <= s2(x+1); c4[x] := 1 >= s2(x+1); c5[x] := 0 <= s3(x+1); c6[x] := 1 >= s3(x+1); c7[x] := 0 <= s1(x); c8[x] := 1 >= s1(x); c9[x] := 0 <= s2(x); c10[x] := 1 >= s2(x); c11[x] := 0 <= s3(x); c12[x] := 1 >= s3(x); c13[x] := 0 <= s(x); c14[x] := 1 >= s(x); c15[x] := 0 <= s(x+1); c16[x] := 1 >= s(x+1); c17[x] := 0 <= qtopi(x); c18[x] := 1 >= qtopi(x) end do;

constr := {m2 > sigma2, m3 > sigma3, seq(c1[x], x = 0 .. .110), seq(c10[x], x = 0 .. .111), seq(c11[x], x = 0 .. .111), seq(c12[x], x = 0 .. .111), seq(c13[x], x = 0 .. .111), seq(c14[x], x = 0 .. .111), seq(c15[x], x = 0 .. .110), seq(c16[x], x = 0 .. .110), seq(c17[x], x = 0 .. .110), seq(c18[x], x = 0 .. .110), seq(c2[x], x = 0 .. .110), seq(c3[x], x = 0 .. .110), seq(c4[x], x = 0 .. .110), seq(c5[x], x = 0 .. .110), seq(c6[x], x = 0 .. .110), seq(c7[x], x = 0 .. .111), seq(c8[x], x = 0 .. .111), seq(c9[x], x = 0 .. .111), m1 < sigma1, 0 <= m1 and m1 < 17, 17 <= m2 and m2 < 33, 33 <= m3 and m3 < 111};
solusi := DirectSearch:-Search(fungsikerugian, constr, assume = positive, evaluationlimit = 5555);
Warning, initial point [m1 = .900000000000000, m2 = .900000000000000, m3 = .900000000000000, sigma1 = .900000000000000, sigma2 = .900000000000000, sigma3 = .900000000000000] does not satisfy the inequality constraints; trying to find a feasible initial point
Error, (in DirectSearch:-Search) cannot find feasible initial point; last infeasible trial point is [m1 = HFloat(0.9), m2 = HFloat(1.9), m3 = HFloat(1.9), sigma1 = HFloat(1.9), sigma2 = HFloat(0.9), sigma3 = HFloat(0.9)]

thanks before

## taylor( (2 * pi * n) ^ (1/(2n), n = infinity, 2)...

The command

taylor( (2 * pi * n) ^ (1/(2n), n = 2)

return   1+((1/2)*ln(2*Pi)+(1/2)*ln(n))/n+O(1/n^2)

I think, this is incorrect, in my oppinion must be:

1+((1/2)*ln(2*Pi)+(1/2)*ln(n))/n+O(ln(n)^2/n^2)

Is this error in maple?

## A command to evaluate the non-negative integer sol...

Assume that a[1],a[2],..a[k] are positive integer numbers. Let n be a positive integer number.

Suppose that igcd(a[1],a[2],..a[k])=1.

My question: Is there a command in Maple such that the output of the this command be true provided that there are "non-negative integer numbers" x[1],x[2],..x[k] which satisfy the following condition:

a1*x1+a2*x2+...+ak*xk=n

## How to let sqrt(5*x+5+y) become sqrt(5*(x+1)+y) au...

How to let sqrt(5*x+5+y) become sqrt(5*(x+1)+y) automatically?

## derivative of an implicit function...

Dear all,

Following the comments I am editing this post:

I have a function F of variables (r1,r2,theta1,theta2,r,theta,a). r1, r2,theta1,theta2 are function of r,  theta and a. I want to take derivative of F with respect to a. r and theta are independent of a . I expressed everything in terms of 'a' as a function of 'a' at first. Then I use diff(F, a). I see there is an error in the final expression G .There is a restriction that theta1 should lie between -Pi to Pi and theta2 between 0 to 2*Pi. I speculate this is the source of error. Work sheet is attached. Reason: value of G: integration in 0 to pi/4 gives some  value but for 0 to pi it evaluates to zero and so is the case with 0 to 2*Pi. As "G "physically represents energy it must be a positive value.

 > restart;
 > theta1 := unapply(arctan(r*sin(theta)/(r*cos(theta)-a)), a);
 (1)
 >
 > ## theta1 -->[-Pi,Pi] and theta2-->[0,2*Pi]
 >
 > theta2 := unapply(arctan(r*sin(theta)/(r*cos(theta)+a)), a);
 (2)
 >
 > r1:=unapply(sqrt((r*cos(theta)-a)^2+r^2*(sin(theta))^2),a);r2:=unapply(sqrt((r*cos(theta)+a)^2+r^2*(sin(theta))^2),a);
 (3)
 > sigma12:=0;sigma22:=sigma;
 (4)
 >
 > ## I have to use a constraint that
 > assume(theta1(a) < Pi, theta1(a) > -Pi, theta2(a) > 0, theta2(a) < 2*Pi, a>0,r>0)
 > u1:=(1+nu)*sigma22*sqrt(r1(a)*r2(a))*(4*(1-2*nu)*cos((theta1(a)+(theta2(a)))/2)-4*r*(1-nu)*cos(theta)/sqrt(r1(a)*r2(a))-2*r^2/(r1(a)*r2(a))*(cos((theta1(a)+(theta2(a)))/2)-cos(2*theta-theta1(a)/2-(theta2(a))/2)))/(4*E)+(1+nu)*sigma12*sqrt(r1(a)*r2(a))*(2*(1-2*nu)*sin((theta1(a)+(theta2(a)))/2)-2*r*(1-nu)*sin(theta)/sqrt(r1(a)*r2(a))+1*r^2/(r1(a)*r2(a))*sin(theta)*cos(theta-theta1(a)/2-(theta2(a))/2))/(E);
 >
 (5)
 >
 > u2:=(1+nu)*sigma*sqrt(r1(a)*r2(a))*(8*(1-nu)*sin((theta1(a)+(theta2(a)))/2)-4*r*(nu)*sin(theta)/sqrt(r1(a)*r2(a))-2*r^2/(r1(a)*r2(a))*(sin((theta1(a)+(theta2(a)))/2)+sin(2*theta-theta1(a)/2-(theta2(a))/2)))/(4*E)+(1+nu)*sigma12*sqrt(r1(a)*r2(a))*((1-2*nu)*cos((theta1(a)+theta2(a))/2)+2*r*(1-nu)*cos(theta)/sqrt(r1(a)*r2(a))-1*r^2/(r1(a)*r2(a))*sin(theta)*sin(theta-theta1(a)/2-theta2(a)/2))/(E);
 >
 (6)
 >
 > ## get u_r and u_theta as u[1] and u[2]
 > u[1] := u1*cos(theta)+u2*sin(theta);
 (7)
 > u[2] := -sin(theta)*u1+cos(theta)*u2;
 (8)
 > Diff_ur := simplify(diff(u[1], a));
 (9)
 >
 >
 > Diff_ut := simplify(diff(u[2], a));
 (10)
 >
 > # find the limiting case
 > Att := limit(Diff_ut*r*sin(2*theta), r = infinity);
 (11)
 > Arr := limit(Diff_ur*r*(1-cos(2*theta)), r = infinity);
 (12)
 > G := (1/8)*(int(Arr+Att, theta = 0 .. Pi/2))*sigma*4;
 (13)
 > simplify(G)
 (14)
 >

Thanks,

## Adding Arrows to Parametrics to Show Direction...

Hi,

Is there any way to add arrows to the parametrics plot to show the direction they are going? Thanks.

## Finding Intersection of Parametrics;...

Hi,

How would I tell maple to solve for the variable t? The answer should be 4.

[t-2,(t-2)^2]

[(3t/2)-4,(3t/2)-2]

I need to set them equal to eachother and then solve for t.

Thanks!

## How to create recursive loops in procedure ...

Suppose that n is a positive integer number and [k1,k2,...,kn] is a list of non-negative integer numbers.

My Question: How to create the procedure proc([k1,k2,...,kn]) such that the output of this procedure is in the following form:

For i1 from 0 to k1 do

for i2 from 0 to k2 do

......................

for in from 0 to kn do

i1+i2+...+in

end do; end do;...end do;

## How can this Maple application be generalized from...

This application describes the motion of a pendulum attached to a moving pivot, all in 2D.

https://www.maplesoft.com/applications/view.aspx?SID=4888

How can this situation be generalized to a pendulum attached to a pivot which moves along a 3D spacecurve?

## How to transform a function plot by "shifting" hor...

Hello,

I will explain my problem on a simple function and some data.

```mg:=78.54*7.85*1e-9*1000*9.81;l:=10000;l0:=12000;h:=0;H := 28.399;
eta:=mg*l/(2*H);
zeta:=arcsinh(mg*h/(2*H*sinh(eta)))-eta;
z:=H/mg*(cosh(mg/H*x+zeta)-cosh(zeta));
plot(z,x=0..l);
```

Above is a definition of an initial plot. Now I would like to draw a new plot in which every x coordinate is shifted horizontally by a function:

`deltax:=H*arcsinh(x)-x;`

As you see I can't use translate or scale so I've tried to use a transform function but I can't do it the right way.

I would be grateful for any ideas.

Greetings,

Iza

## Multiple Execution of Maple Code with a Varied Par...

Hi!

I have a rather long Maple code and want it to be executed multiple times with a parameter changed each time.

Surely this can be done with the loop structure, but it seems the whole loop structure must be contained into one single execution group, which makes it to be a little inconvenient, since the code is too long.

So is there any alternative way to realize this utility?

Best regard and thanks!

## Evalf on Function Coefficients?...

I have a function defined which maps x to a polynomial.

The coefficients are highly precise floating point numbers, which is necessary since it needs to be accurate, however when I try to print the function it looks like a massive mess.

I tried to use `print(evalf[4](f));` in an attempt to simplify it however this evaluation seems to have no effect on how it is displayed.

As I said, I can't use evalf when defining the function since it needs high precision.

Is there a way to do this without creating a clone of the function with the coefficients evaluated, just to print it on screen?

 First 583 584 585 586 587 588 589 Last Page 585 of 2279
﻿