## How to build a system of linear equations from a l...

Hello

I need to build a system of linear equations from a list of polynomials.  The list of indeterminates is as follows:

`incog:=[theta[1, 1], theta[1, 2], theta[2, 1], theta[2, 2], theta[2, 6], theta[3, 0], theta[3, 3], theta[3, 4], theta[3, 5]];`

The list of polynomials is:

`eq:=[1, theta[1, 1]+theta[2, 2]+theta[3, 3], -theta[1, 1]-theta[2, 2], theta[2, 6]*theta[3, 5], -theta[1, 1]*theta[3, 3]-theta[2, 2]*theta[3, 3], -theta[1, 1]*theta[2, 6]*theta[3, 5]+theta[1, 2]*theta[2, 6]*theta[3, 4], theta[1, 1]*theta[2, 2]*theta[3, 3]-theta[1, 2]*theta[2, 1]*theta[3, 3]+theta[1, 2]*theta[2, 6]*theta[3, 0]];`

eq[1], eq[2] and eq[5] will be used as examples, although all of them should be used.

In eq[1], there are no indeterminates, therefore the first line of the matrix related to the system of equations is:

[0, 0, 0, 0, 0, 0, 0, 0, 0]

In eq[2], there is a summation of  three indeterminates and the outcome is a set of three lines (summation of indeterminates)

[1, 0, 0, 0, 0, 0, 0, 0, 0]

[0, 0, 0, 1, 0, 0, 0, 0, 0]

[0, 0, 0, 0, 0, 0, 1, 0, 0]

In eq[5], there is a summation of a product of indeterminates and outcome is a set of two lines as follows:

[1, 0, 0, 0, 0, 0, 1, 0, 0]

[0, 0, 0, 1, 0, 0, 1, 0, 0]

Carrying on like this will result in a matrix of 14 lines with zeros and ones in positions related to the indeterminates.  Building the matrix is what matters to me.

I have a thousand of such problems with different indeterminates and set of polynomials.

Any ideas on how to build a function to automatically create the matrices would be most appreciated.

Thank you.

Cheers

Ed

## Including regular discontinuities in a system of O...

Hi

I am woking on a pharmo model for a freind, and it includes a variable called depot that needs to jump up by 150 every 24 hours.
currently I have written it as:

clearly thats wrong though, as the +150 s don't make it jump up by 150 because of the small step size.

(at t=0, it adds 150*a small step size, at 24 it looks like it adds 150* a vastly smaller step size, what I want would be much closer to a series of pulses each decaying to almost 0 and then getting boosted to just over 150)

My intuition is that i need to use the dirac delta function but in such a way that its integral adds 150 instantaneoulsy every 24 hours. I have no idea how to do that!

Lindas_signal_transduction_model_2.mw

[Edit:
I've just realised that this ode has an obvious solution, so you can trivially make a function that adds 150 every 24 hours and exponentially decays in between.  However there are other models that hopefully i'll being doing similar work on, that don't have nice solutions]

## How to adjust width and height of animated gif fil...

Hello

When i export an animation as a gif the dimensions are (by default it seems) 400x400 pixels (w x h).

But my slide show requires a dimension of 1920 x 1080 pixels.

How to I tell maple to export a gif of predefined dimensions?

I can manually adjust the dimensions of the animation by grabbing a corner and pulling it right and down and then export it, but its hit and miss.

Here is an example animation written by Kitonum

restart;
with(DEtools):
rho := 0.1:
w0 := 2:
sys := a->[diff(x(t),t) = y(t),diff(y(t),t) = -2*rho*y(t) - w0^2*(x(t)+a)];
P:=a->DEplot(sys(a), [x(t),y(t)], t = 0 .. 20-2*a, x=-2..2, y=-1.9..1.7, [[x(0) = cos(a)-a, y(0) = sin(a)]], scene = [x(t),y(t)], linecolor=blue, numpoints=1000):
plots:-animate(plots:-display,['P'(a), size=[600,300]], a=-0.7..1.4, frames=90);

## Output not working, just displaying the text comma...

When I first open my worksheet, my PolynomalInterpolation code looks and works fine,

However, when I press enter, it only displays the command text,

Why is this happening? How can I fix it?

## pdsolve gives wrong solution to standard wave PDE ...

Fyi, this solution to 1D wave pde is wrong. The solution does not even satisfy the PDE itself. Compared it to a numerical solution and they are not the same solution. Do not have time now to write the hand solution. But it is clear the solution is not valid.

I do not know now how to roll back to earlier version of the Physcis packages to see if this used to work OK before. Since when typing Physics:-Version(420) It gives error

Error, (in Physics:-Version) unable to determine the Physics Updates version, could you please report the problem to support@maplesoft.com

And Physics:-Version(425) seems to hang. I am not sure if these commands are supposed to automatically download the physics package from the cloud and install it on my PC or what.

Any way, could someone please verify the solution they get is the same as shown below? May be someone with earlier physics package could try to see if they get different solution?

 > restart
 > Physics:-Version()

 > pde:=diff(u(x,t),t\$2)=4*diff(u(x,t),x\$2); ic:=u(x,0)=0,D[2](u)(x,0)=sin(x)^2; bc:=u(-Pi,t)=0,u(Pi,t)=0; sol:=pdsolve([pde,ic,bc],u(x,t))

 > pdetest(sol,pde)

 > simplify(diff(rhs(sol),t\$2)-4*diff(rhs(sol),x\$2))

 >

## How to Simplified this expression with some assum...

Hello,every one :

There is a recursive formula where parameters a,b,c and d are real numbers with a>=b, c>=d;

```rsolve({f(n+1)-((a-1)*(b-1)+(c+d))*f(n)-c*d*f(n-1)=0, f(0)=a,f(1)=a*(b - 1)+c},f):
simplify(%)
```

Final expression is too complex, If possible，I want get a more concise expression.
The screenshots of my running results are as follows：

## "How can I make maple reserve the old outcomes?"...

How can I make maple reserve the

## Student document proof...

Hi!

Can someone help me with the kind of document I have to submit to prove my student status?

Thank you!

## Problem using define_external to call a C++ functi...

I'm trying to debug a problem with define_external, and I would love some help!

I have a Maple module that contains this line of Maple code:

```EigValsVecsC := define_external('EigValsVecsC', LIB = cat(dll_home,"\\operators.dll"), 'm'::ARRAY(datatype=float[8]), 'n'::integer[4], 'eig_vals'::ARRAY(datatype=float[8]), 'eig_vecs'::ARRAY(datatype=float[8]), 'THREAD_SAFE');
```

Running the Maple code to create the module produces this error message:

I've discovered that there's a single line of C++ code (in the C++ function EigValsVecsC) that I can comment out to make the problem go away.  Here's the line of C++ code:

```MKL_INT info = LAPACKE_dsyev(LAPACK_ROW_MAJOR, 'V', 'U', eig_vecs.rows(), eig_vecs.raw(), eig_vecs.rows(), eig_vals.raw());
```

To clarify:

• C++ compilation succeeds for operators.dll (which contains the function EigValsVecsC), with this one line either commented or uncommented.
• The C++ function EigValsVecsC works correctly when not called from Maple (i.e., called from Visual Studio or the command line), with this one line either commented or uncommented.  (Of course, it doesn't work fully correctly with this one line commented, since this one line is the whole point of the function.  But it runs successfully and does the correct massaging of inputs.)
• When this one line of C++ code is commented, the Maple module builds successfully, and I can call EigValsVecsC in Maple and get results back showing that, in the C++ code, the inputs to the commented line are being set up properly.

The relevant include statement in the C++ code is:

`#include "mkl_lapacke.h"`

I don't have to comment out the include statement (though the compiler may well be ignoring it if it's never used, when the call to LAPACKE_dsyev is commented out).

I have no good theories about what the problem may be.  I've been trolling the Web for any helpful information, and I've come up with nothing.

Can anyone help?  Thanks!

## Evaluating a function which is the derivative of a...

So my question is fairly simple, and it MUST've been asked multiple times before, but i had no luck using the search tool to find any results matching my question; or at least not any ones with answers that seemed to work.

For Maple 2019

Whenever i want to define a new function g(x) as the derivative of the function f(x), that is

f(x) := 3*x + 2
g(x):= f'(x)
g(3) --> Error

This is an annoyance almost every day of working with Maple for my engineering studies, and while i accidentally found a workaround for integrals, i need to figure out how to use derivatives in my expressions without needing to copy+paste the outputs.

Bonus question: why is the x in the derivative seen as a variable and not an operator? An

## Transfer function in Maple...

 >
 >
 >
 >

We have two coupled differential equations relating two outputs ( ) with two inputs

The objective of the exercise is to obtain the four transfer functions relating the outputs to the inputs, in other words, we must find:

To save time, we will from now on write  instead of  , etc.

In order to find tese relations, we must solve  and  as a function of  and

Since our model is defined in the time-domain, the first step is to perform Laplace Transform:

Note tha  and are zero because  and  are deviation variables, as indicated in the problem description of this exercise.

Now we have a set of two equations with two unknowns, which can be solved algebraically
(this is the advantage of the Laplace Transform). For example, from equation (3) we can
isolate :

We can substitute the expression (5) in equation (4) to obtain , as follows:

We can multiply both sides by -3 and expand the products to get:

Now we must group the factors multiplying

Note that this relation is analogous to:

Since the effects of  and  are additive, if we want to obtain the relation between one output and only one input ( for example  and  we can set the other input to zero, i.e.

We still have to obtan the relation between  and the inputs. We can use equation (5) and (6):

Finally we can find the relations:

Hello

I have this problem:

in which I have to find the four transfer functions relating the outputs(yand y2) to the inputs (u1,u2).

The u and y are deviation variables.

The objective is to find the four transfer functions:

So I have done it by hand but I was wondering if there are any maple commands, that could be used to solve such a question?

I found the transfer functions to be:

## How can I animate a CDF of a continuous distributi...

I can display an animated plot of the Normal distribution pdf and was wondering if anybody has a routine to animate the Normal cdf. If this is so - is it possible to generalise for any continuous statistical distribution?

## Suddenly can not flush to text file after append...

I use append and cmaple to run

originally can See result in real time even if open text file

but suddenly text file become 0KB

when I copy text file and paste

0 KB become 3 KB

but the program can not further output to text file and no error shown

## How to plot a triangle formed by two vectors and t...

I have a vector calculus question. I was given three points, p,q, and r, and I got Maple to calculate vectors pq and pr. I also got Maple to calculate the cross product vector, pq x pr. The problem says to draw the triangle formed by p,q, and r, as well as the cross product vector. I tried to use the polygonplot tool to plot the triangle formed by the three points, but I am confused as to how to get the cross product vector to appear on the plot with the triangle. What tool do I use to plot the triangle with the cross product vector on it, so I can have a picture of the cross product vector starting at p, showing that it is orthogonal to vector pq and pr?

Thank you.

## Function approximation based on set of points...

Dear Community!

I'm struggleing with a problem long since. I highly appreciate any help with this theme.

The problem is the following:

- I have a set of points, what comes from a numerical solution of a complex, but periodical function. Therefore I have a set of points (X;Y). The points are doesn't matter, but in my case, it look like this:

I want to use the Fourier-method to approximate this points with a function.

The best result I could get is this:

But it is not acceptable due to the high inaccuracy at the starting, and finishing points (there is a diagram inaccuracy %):

I'm feel like, I'm doing something wrong. Unfortunately, I had no time to look deep into the math here. Can somebody tell me, that how can I get a better result, using this method?

Thank you very much for the help in advance.

Best regards

Dávid

 1 2 3 4 5 6 7 Last Page 1 of 1585
﻿