Alfred_F

Mr. Alfred Flaßhaar

525 Reputation

11 Badges

1 years, 237 days
Brandenburg, Germany
As a retired individual with degrees from German universities in mathematics/analysis and structural engineering, I spent my professional life in responsible positions in research, teaching, and practical application, working on the mathematical modeling of states and processes in real-world systems. Now I have the time to explore interesting mathematical problems using Maple. It is my professional curiosity that drives me.

MaplePrimes Activity


These are replies submitted by Alfred_F

@dharr 

I overlooked the mistake with the 50 (embarrassing). For practice with isoperimetric problems, I'll probably have to find simpler examples. In any case, the one in "test" is still a bit too advanced for me. Strangely enough, the approximate solution in Mathcad 14 was quite easy back then. Only finding a suitable function approach was somewhat time-consuming. I've included the old approximations in "test2".test2.mw

restart

kernelopts(version)

`Maple 2026.0, X86 64 WINDOWS, Mar 05 2026, Build ID 2001916`

(1)

interface(version)

`Standard Worksheet Interface, Maple 2026.0, Windows 11, March 05 2026 Build ID 2001916`

(2)

with(VariationalCalculus)

[ConjugateEquation, Convex, EulerLagrange, Jacobi, Weierstrass]

(3)

with(plots, implicitplot)

[implicitplot]

(4)

with(Optimization)

a := -0.24168e-1

-0.24168e-1

(5)

b := .9623

.9623

(6)

c := 0.1365e-2

0.1365e-2

(7)

d := 0.6498e-3

0.6498e-3

(8)

f := -0.1187e-2

-0.1187e-2

(9)

g := -0.1374e-2

-0.1374e-2

(10)

xend := 39.82

39.82

(11)

"p(a,b,c,x):=a∗x^(2)+b∗x+c;"

proc (a, b, c, x) options operator, arrow, function_assign; a*x^2+b*x+c end proc

(12)

" q(d,f,x):=d∗x^(2)+f∗x;"

proc (d, f, x) options operator, arrow, function_assign; d*x^2+f*x end proc

(13)

"yn(a,b,c,d,f,g,x):=p(a,b,c,x)∗exp(q(d,f,x))+g;"

proc (a, b, c, d, f, g, x) options operator, arrow, function_assign; p(a, b, c, x)*exp(q(d, f, x))+g end proc

(14)

plot(yn(a, b, c, d, f, g, x), x = 0 .. 40)

 

" wn(a,b,c,d,f,g,xend):=(∫)[0]^(xend)x∗yn(a,b,c,d,f,g,x)ⅆx;"

proc (a, b, c, d, f, g, xend) options operator, arrow, function_assign; int(x*yn(a, b, c, d, f, g, x), x = 0 .. xend) end proc

(15)

evalf(wn(a, b, c, d, f, g, xend))

7635.936808

(16)

"constr(a,b,c,d,f,g,xend):=(∫)[0]^(xend)(sqrt(1+((ⅆ)/(ⅆx)(yn(a,b,c,d,f,g,x)))^(2)))ⅆx;"

proc (a, b, c, d, f, g, xend) options operator, arrow, function_assign; int(sqrt(1+(diff(yn(a, b, c, d, f, g, x), x))^2), x = 0 .. xend) end proc

(17)

evalf(int(sqrt(1+(diff(yn(a, b, c, d, f, g, x), x))^2), x = 0 .. xend))

50.00691623

(18)

 

Download test2.mw

@sand15 

...I had hoped to define the search domain using initial points. Even after consulting the help texts, I still can't grasp the definition of the search scope and especially its syntax. I would appreciate any help.

restart

with(RealDomain)

kernelopts(version)

`Maple 2026.0, X86 64 WINDOWS, Mar 05 2026, Build ID 2001916`

(1)

interface(version)

`Standard Worksheet Interface, Maple 2026.0, Windows 11, March 05 2026 Build ID 2001916`

(2)

with(VariationalCalculus)

[ConjugateEquation, Convex, EulerLagrange, Jacobi, Weierstrass]

(3)

with(plots, implicitplot)

[implicitplot]

(4)

with(Optimization)

 

``

"p(a,b,c,x):=a∗x^(2)+b∗x+c;"

proc (a, b, c, x) options operator, arrow, function_assign; a*RealDomain:-`^`(x, 2)+b*x+c end proc

(5)

" q(d,f,x):=d∗x^(2)+f∗x;"

proc (d, f, x) options operator, arrow, function_assign; d*RealDomain:-`^`(x, 2)+f*x end proc

(6)

"yn(a,b,c,d,f,g,x):=p(a,b,c,x)∗exp(q(d,f,x))+g;"

proc (a, b, c, d, f, g, x) options operator, arrow, function_assign; p(a, b, c, x)*RealDomain:-exp(q(d, f, x))+g end proc

(7)

" wn(a,b,c,d,f,g,xend):=(∫)[0]^(xend)x∗yn(a,b,c,d,f,g,x)ⅆx;"

proc (a, b, c, d, f, g, xend) options operator, arrow, function_assign; int(x*yn(a, b, c, d, f, g, x), x = 0 .. xend) end proc

(8)

"constr(a,b,c,d,f,g,xend):=(∫)[0]^(xend)(sqrt(1+((ⅆ)/(ⅆx)(yn(a,b,c,d,f,g,x)))^(2))-50)ⅆx=0;"

proc (a, b, c, d, f, g, xend) options operator, arrow, function_assign; int(RealDomain:-sqrt(1+RealDomain:-`^`(diff(yn(a, b, c, d, f, g, x), x), 2))-50, x = 0 .. xend) = 0 end proc

(9)

 

maximize(wn(a, b, c, d, f, g, xend), constr(a, b, c, d, f, g, xend), location = true, initialpoint = {a = -0.2e-1, b = 1.06, c = 0.14e-2, d = 0.46e-3, f = -0.12e-2, g = -0.14e-2, xend = 35})

maximize((1/16)*(8*g*xend^2*(-d)^(13/2)-8*a*xend^2*(-d)^(11/2)*exp(d*xend^2+f*xend)-8*b*xend*(-d)^(11/2)*exp(d*xend^2+f*xend)-8*c*(-d)^(11/2)*exp(d*xend^2+f*xend)-4*a*f*xend*(-d)^(9/2)*exp(d*xend^2+f*xend)+8*c*(-d)^(11/2)-4*b*f*(-d)^(9/2)*exp(d*xend^2+f*xend)-8*a*(-d)^(9/2)*exp(d*xend^2+f*xend)+4*b*f*(-d)^(9/2)-2*(-d)^(7/2)*exp(d*xend^2+f*xend)*a*f^2+8*a*(-d)^(9/2)+2*a*f^2*(-d)^(7/2)+d^3*erf((1/2)*(2*d*xend+f)/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*a*f^3-2*d^4*erf((1/2)*(2*d*xend+f)/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*b*f^2+4*d^5*erf((1/2)*(2*d*xend+f)/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*c*f-erf((1/2)*f/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*a*f^3*d^3+2*erf((1/2)*f/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*b*f^2*d^4-4*erf((1/2)*f/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*c*f*d^5-6*d^4*erf((1/2)*(2*d*xend+f)/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*a*f+4*d^5*erf((1/2)*(2*d*xend+f)/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*b+6*erf((1/2)*f/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*a*f*d^4-4*erf((1/2)*f/(-d)^(1/2))*exp(-(1/4)*f^2/d)*Pi^(1/2)*b*d^5)/(-d)^(13/2), int((1+((2*a*x+b)*exp(d*x^2+f*x)+(a*x^2+b*x+c)*(2*d*x+f)*exp(d*x^2+f*x))^2)^(1/2)-50, x = 0 .. xend) = 0, location = true, initialpoint = {a = -0.2e-1, b = 1.06, c = 0.14e-2, d = 0.46e-3, f = -0.12e-2, g = -0.14e-2, xend = 35}), {}

(10)

 

Download test1.mw

@dharr 

"minimize" ?

@Rouben Rostamian  @dharr

It's gratifying to see how a logically structured solution leads to the correct result. Therefore, I'll allow myself with all due respect an academic "knock-knock" on the lecture hall desk. Since this problem can no longer be solved with pen and paper, I, as a Maple novice, have learned a great deal about Maple's craft.

Previous results, some of which were determined using direct calculation of the maximum (Ritz), are only 1.5% below your result.

I'm eager to see Rouben Rostamian's solution.

@janhardo 

..."So I'm going to revise the calculation above." From your previous calculations, I could not determine the value of the fenced meadow. (Note: The value should be above 15200.) It should also be clear how the fence is closed at the eastern end along the x-axis – with or without a tangent. The proof that only symmetrical fence construction is possible is unnecessary here.

@dharr 

...the farmer's buying behavior seems odd – but he probably has his reasons.

When formulating the task, I had to compromise between precision and vivid clarity. That's probably why there was a misunderstanding, which @janhardo correctly cleared up - sorry.

@janhardo 

...but slightly more convex. Only on the oak tree is a corner allowed. The meadow should be as expansive as possible ;-).

@sand15 

...for Your detailed and helpful advice and the literature reference.

However, I'm not currently concerned with solving a specific practical problem. Rather, for other reasons, I want to construct a "pathological" example. It should demonstrate what theory has long known: Solving the variational problem as a minimum problem is equivalent to solving the resulting Euler differential equation as a necessary condition. My goal was to show, in an intuitive way, that the solution of Euler's differential equation corresponds, at least approximately, to the calculation of the functional minimum and to represent both in a single plot. I am particularly interested in calculating the minima of functionals, especially convex functions (see Rockafellar, Hiriart-Urruty/Lemarechal).

Since I've only recently begun to explore the world of Maple, there are several inaccuracies and errors in the command sequence of my file. Hence my plea for help.

Later I would like to try out so-called quadratic functionals (Lit.: Michlin "Variation Problems of Mathematical Physics") in Maple.

Addition:

Thank you again for your advice. The frequency analysis is particularly helpful. I still need to thoroughly understand the commands for it. Fifty years ago, this practical application (I know the theory) would have been very welcome.

@nm 

... is y(x)=const.=pi. Is this particular solution allowed?

@nm 

...So, this is about the famous pendulum equation. Then choosing the initial value y(∞)=π is physically meaningless, because this deflection angle describes an indifferent equilibrium state, which, according to the derivation of the equation, does not capture this state. In contrast, the pendulum equation for deflections smaller than π is derived from equilibrium conditions or conservation laws. Overall, the textbook problem therefore appears to me to be in a confusing form. It would be better to ask: what limiting value allows us to estimate the solution – and that is π.

edited:

From my point of view, only the reversal of the problem statement according to the textbook makes sense: With an initial displacement of "close" pi, the mathematical pendulum will swing infinitely long.

Apart from the fact that calculating the solution of a second-degree ODE also requires two initial values, solutions exist, for theoretical reasons, only for finite abscissas of the initial values. This becomes "experimentally" obvious when the second-degree ODE is treated as a system of two first-degree equations with the same initial value.

p. s.

test.mw

@acer 

I wasn't familiar with "convert". Last question: How can the lhs be converted to the rhs in (4) of the attached file test2, instead of using the command "is" in the argument of "is"?

restart

kernelopts(version)

`Maple 2024.2, X86 64 WINDOWS, Oct 29 2024, Build ID 1872373`

(1)

simplify(convert(exp(u)/(1+exp(u))^2, trigh))

(cosh(u)+sinh(u))/(1+cosh(u)+sinh(u))^2

(2)

is(convert(exp(u)/(1+exp(u))^2 = (cosh(u)+sinh(u))/(1+cosh(u)+sinh(u))^2, exp))

true

(3)

is((cosh(u)+sinh(u))/(1+cosh(u)+sinh(u))^2 = 1/(4*cosh((1/2)*u)^2))

true

(4)

plot([exp(u)/(1+exp(u))^2, 1/(4*cosh((1/2)*u)^2)], u)

 

NULL

Download test2.mw

@dharr 

The goal of my question was not to solve the specific problem, it's easy to solve and an exact solution function is known. The background of my question is: How can an integral equation with an unknown function at the integration limit be solved in Maple if the integrand doesn't have a conventional/closed-form antiderivative? How can the coefficients of a linear combination of appropriately chosen functions be determined to obtain an approximate function?

Using the example chosen here, whose solution is known, I tried to test this using the `minimize` function. The result not only showed the coefficients but also a special value of t corresponding to the minimum. What options need to be added to `minimize` to obtain coefficients and then an approximate function over a t-interval?

The problem I remember with the unknown function at the integration limit dates back to the 1990s. The integrand had a terrifying structure; it was nonlinear and had no antiderivative. Back then, my only option was to use the Ritz method in Mathcad. Since then, hardware and software options have improved. Therefore, I'm attempting to solve this old problem again using these newer methods.

@Rouben Rostamian

...

is interesting:

It is identical to every special solution to the initial value of the form y(u)=u, where the additional conditions for u and y(u) must be met.

@Carl Love 

I would never have thought of that. I need to take a closer look at the 1D and 2D input methods and their differences. Where can I find more information about that?

I have got it. :-)

1 2 3 4 5 6 7 Last Page 1 of 17