## Problem with sum in linked functions...

I am trying to define a sum which is obtained from linked functions (which also contain the sum command).

The problem is: if I modify the first function p and rerun the worksheet (except fot the restart command), then the changes do not affect the result. Does anyone know why? Thank you very much.

 >
 >
 (1)
 >
 (2)
 >
 (3)

If I modify p (I make it twice its initial value), then this does not affect the value of q and r

 >
 (4)
 >
 (5)
 >
 (6)

Why?
Even if I  unassign p, q and r, this does not work, either.

 >
 >
 (7)
 >
 (8)
 >
 (9)

Only if I restart, then I can modify p and change the rest of values

 >
 >
 (10)
 >
 (11)
 >
 (12)
 >
 >

## How to define a piecewise periodic function in mul...

Hello,

I'm struggling with following simple problem which I however cannot seem to implement easily in Maple:

• I have 2 different periodic functions: f1 and f2, each time in  variables x and t.
• On the second function f2 a duty cycle with period T and fraction q should need to be applied so that:
• during the DUTY (=ON or 1) part of this period, so from 0 -> q*T, f2__DC=f2
• during the remainder (=OFF or 0) part of this period, so from q*T->T, f2__DC=0
• each subsequent DUTY part starts at the same point where it ended at the previous cycle, so as if f2 was 'froozen' during the OFF part (see code for more details, but basically this means that the t parameter needs to be constantly translated depending on which duty cycle we are in).
• In the end I want to calculate f1*f2 in a simple way using ranges for both variables x and t so that e.g. plotting can easily be done.

I've tried implicit functions and procedures but keep getting stuck whenever I introduce a second variable.  Somehow, Maple does not seem to work straightforward with non-univariate stuff.  Such an examples can also not be found in the programming guide so I'm hoping that one of you knows how to tackle this.

Any help will be much appreciated!

 > restart; with(plots):
 > f1 := (x, t) -> A * (1 + B * sin(a*x-b*t));
 (1)
 > f2 := (x, t) -> C * (1 + E * sin(c*x-d*t));
 (2)
 > A:=1: B:=0.5: a:=100: b:=1: C:=1: E:=0.5: c:=10: d:=10:
 > densityplot(f1(x,t) * f2(x,t), x = 0..1, t = 0..10, style=patchnogrid);
 > #Duty cycle (DC) applied to f2 # ON state:      n*T <= t <(n+q)*T  : f2__DC(x,t)=f2(x,t-n*(1-q)*T) # OFF state: (n+q)*T <= t < (n+1)*T : f2__DC(x,t)=0 (so all other cases) # (n is a positive integer, zero included, and n=floor(t/T)) T:=1: q:=0.3; #fraction of T where DC is 1=ON
 > #How to apply the above DC to f2(x,t) so that f2__DC is obtained and following command works: densityplot(f1(x,t) * f2__DC(x,t), x = 0..1, t = 0..10, style=patchnogrid);
 >

## I cannot load student packages...

windows 11 maple 2020 I can load other packages but cannot load the student packages

## how to tell convert to trig to only convert to sin...

I need to use convert of complex exponentials to trig, but only to convert exp(I*x) to cos/sin using Euler formula.

The problem is that, since this is done in code without looking at what is inside the exp(), Maple will also convert non complex exponentials as exp(x) to hyperpolic trig which I do not want.  An example will make this clear

For an example, given exp(3*I*x - x)  and applying convert/trig to this it gives

(cosh(x) - sinh(x))*(cos(3*x) + sin(3*x)*I)                       --(1)

But I only want to conver the exp(3*I*x) part of the of the above to obtain

exp(-x) *  (cos(3*x) + sin(3*x)*I)                          ---(2)

I can break  exp(3*I*x - x) first using expand command and obtain  exp(-x) exp(3*I*x) and then parse this and filter out the complex exponentials (may be using select with has I) and then use convert on those terms only leaving the non-complex exponentials alone. But this gets messy for more complex exponentials.

Is there an easy way to tell Maple  to convert expression of the form exp(I*f(x) + g(x)) to trig but only to sin/cos, hence leaving the exp( g(x) ) as a factor? I looked at help but see nothing there so far.

Maple 2021.2

## Convolution using FFT...

Hi

My integrals are convolutions.and I know I can evaluate this using numerical integration, but I am seeking a numerical solution of this problem using FFT. I have many many integrals of this type to evaluate and I need FFT for speed reasons.

fft.mw

This might inspire you.

## Problem with the assume and UseAssumptions ...

I do not understand why what I do in my first example does not work in the problem of integral. Can anyone help me? Thank you very much!

 >
 >
 >
 (1)
 >
 (2)

 >
 (2.1.1)
 >
 (2.1.2)

 >
 (2.2.1)
 >
 (2.2.2)
 >
 (2.2.3)

 >
 >
 >
 (2.3.1)
 >
 (2.3.2)

La valeur de E cherchée est donc d'environ 28,06 unités.

## How can this error be avoided?...

This worksheet has an error when executing EulerLagrange.

How can this error be avoided?

Spring_Pendulum.mw

## Textplot for family of curves...

Hi

I am trying to get a family of curves on one graph. Each curve a different colour and labeled

P=2, Q=0 , P=2,Q=1 , etc

mmcdara 's proposal for inspiration?

https://www.mapleprimes.com/questions/233088-How-Do-I-Plot-A-Function-Of-Two-Variables

Family_of_curves_plot.mw

## Re: how to preserve '1d' subscript as is . ...

Hello there,

When I tried to write an expression with the '1d' subscript, I found that it was automatically translated as '1.'. The following worksheet shows an example. Is there any chance to preserve the expression as I intended to see?

 > restart;
 (1)
 >

## Maple doesn't seem to compute correctly this expre...

I have just come across this curious but really boring problem.
In the code snippet below, expr1 and expr2 are identical.

```restart:
data := [a=1, b=2]:
convert(
piecewise(And(x(t) > a, x(t) < b), 1, 0),
Heaviside
):
expr1 := eval(eval(%, data),  x(t)=z):
plot(expr1, z=0..3);

convert(
piecewise(And(z > a, z< b), 1, 0),
Heaviside
):
expr2 := eval(%, data),:
plot(expr2, z=0..3);```

But if I change the parameterization of the problem, expr2 is still correct but expr1 is not

```restart:
data := [d=1.5, a=0.5]:
convert(
piecewise(And(x(t) > d-a, x(t) < d+a), 1, 0),
Heaviside
):
expr1 := eval(eval(%, data),  x(t)=z):
plot(expr1, z=0..3);

convert(
piecewise(And(z > d-a, z< d+a), 1, 0),
Heaviside
):
expr2 := eval(%, data),:
plot(expr2, z=0..3);
```

Where does this come from?

## Re: Two questions...

Hello there,

Would you allow me to ask these two questions?

1) is there any way to collect the expression 'eq14_2' w.r.t. DeltaP? The question is labeled as 'Q1' in the worksheet.

2) Why does the 'DeltaP' term survive at the RHS of the expression 'eq14_2_3'? In other words, is it possible to cancel out the same term, 'DeltaP', in numerator and denominator?

 > restart;
 > eq14_1_3 := w[NET] = Delta*T[Sfg];
 (1)
 > eq14_2 := w[NET] = -((v[2] + v[3])/2)((-DeltaP + P) - P) - ((v[1] + v[4])/2)((P - P) + DeltaP);
 (2)
 > simplify(eq14_2);
 (3)
 > collect(expand(eq14_2), DeltaP, distributed); # Q1
 (4)
 > Desired1 := w[NET] = DeltaP * (-v[2]*(-1)/2 - v[3]*(-1)/2 - v[1]*(1)/2 - v[4]*(1)/2);
 (5)
 > eq14_2_2 := rhs(eq14_1_3) = rhs(eq14_2);
 (6)
 > eq14_2_3 := eq14_2_2 / DeltaP; # Q2
 (7)
 > Desired2 := w[NET]/DeltaP =  (-v[2]*(-1)/2 - v[3]*(-1)/2 - v[1]*(1)/2 - v[4]*(1)/2);
 (8)
 >

## How can i define an initial solution of an ODE wit...

Thank you everyone!

I am trying to solve an ODE with nonlinear boundary conditions, it is a BVP. And the maple let me to specify an approximate initial solution. I just don't know how to define the initial solution. What format is the initial solution? I have tried the Help Document told me to, but I still can't figure it out. Please help me, thank you!

## How to get Black Hole temperature...

Hi.

Just trying to replicate a calculation, I would expect close to absolute zero, but my units are out

Black_hole_temp.mw

## How can complex transformations be used to tile th...

Initial text in the uploaded worksheet describes an attempt to partially tile the Poincare disk and asks to be shown how a known complex transformation can be used to accomplish this.