## fsolve in a range gives error...

I am trying to do fsolve in a range (-7..14), however, it gives no solution.

But when I solve the same equations with solve (after removing all the Imaginary solutions), I get two results, one of them is in the range (-7..14).

I even expanded the range of fsolve, say (-10..20), but still got no solution...

This is just getting weirder and weirder. Attached kindly find the Maple file, note that the first solve takes about 1 minute (on my laptop: CPU i7 + MEM 8G + SSD).

fsolve_In_Range.mw

## Changing value of procedure parameter not allowed?...

I have a program:

Running abb(1,3) gives error: Error, (in abb) illegal use of a formal parameter

Might be a silly question: Is it not allowed? Do I have to define a local variable for b in order to change it?

## How to define a matrix of functions depending on t...

Dears,

I have a question and I hope someone will be able to answer it.

I would like to create a matrix of functions depending on the number of the line or the arrow. I think the best is to show with a very basic example:

I have the following program

n:=4:

R:=Matrix(1,n):

for i from 1 to n do: R(1,i):=x->i*x:end do:

So, I have a matrix, one row, n columns. At the ith column, I want to have the function f(x)=i*x.

Unfortutanely, with my program, I obtain for example for the first column the function f(x)=11*x. At the second column, I get the same result. It seems that I can define matrices of functions but it is impossible in the definition of the function to use the number of the column. Do you have any idea about how to write a program?

Any help would be very appreciated.

## Piecewise function representation of each piece...

I wonder if there is a way to represent each piece of a piecewise function in Maple.

For example, for a piecewise function: f:=x->piecewise(1<=x<=2,c[1]*x+c[2],2<=x<=3,c[3]*x+c[4],3<=x<=4,c[5]*x+c[6]);

I want to have a way to retrieve each piece, e.g.: c[3]*x+c[4], but f(x)[2] doesn't work.

Is it archievable?

## 2D plotting problems in Maple 2015...

Hi,

I'm struggling to solve a problem with the Maple 2015 worksheet interface. I have a very dense 2D plot, with lots of oscillations, that was generated using Maple 2015 on Windows 10. Substantial parts of the plot are missing; it looks like the tips of the oscillations being clipped out. If I load the same worksheet into Maple 18 on Windows 7 then the plot looks fine (i.e. nothing is clipped). I've dug through the options in Maple 2015 and nothing I try seems to fix the problem. Any advice would be greatly appreciated.

Many thanks,
David

## Paramiter that give me a maximum value ...

I need a mathematical system that finds the value of k that gives the z value bigger (for loop inside the slider). Moving the slider would seem  k=0.80621762 that give z: 2517.701824

k.mw

The for Statement calculates this mathematical sequence:

```a=100
b=10

1)c=a-b
2)d=c*2-k2; k2=(b*2)
3)e=d*2-k3;k3=k2*2
4)f=e*2-k4;k4=k3*2
30) (...)
z=c+d+e+f+(...)
z=?```

The paramiter 2 is k (i have to find the value that give me the maximum of z).

## Best way to modify this script to sum over certain...

I have a list of coefficients each assigned a triple of indices. E.g. CF_{x,y,z}. These indicies are also able to take other values between +-2. E.g. CF_{x+2,y-1,z} or CF_{x,y-2,z+1} as examples. I have a working loop that cycles through the list of these coefficients and I am able to call a particular one by specifying the triple of indicies. This script has been attached:

triple_index_script.mw

I would like to modify this script to have more control over single indexes. As an example, say I want to add up all the coefficients which have z as a subscript (so not z+1,z-2 etc...) and I don't care what the x and y subscripts are; I want to be able to call that sum using the same notation in the script but with a single index. e.g. (using a new example function called RR_MapZ):

```RR_MapZ[0]; ## This would return the sum of all coefficients that had z in their subscript
```

and this would return the sum of all the coefficients which have subscript Z. If I wanted to add up all the coefficients which had index Z+1 I would do:

```RR_MapN[1]; ## This would return the sum of all coefficients that had z+1 in their subscript
```

What would be the most efficient way to do this?

-Yeti

## Repetition (for Statement)...

```a=100
b=10

1)c=a-b
2)d=c*2-k2; k2=(b*2)
3)e=d*2-k3;k3=k2*2
4)f=e*2-k4;k4=k3*2
30) (...)
z=c+d+e+f+(...)
z=?
```

I need a for Statement that calculates this mathematical sequence.

Thanks

## Undoing the effect of kronecker delta functions...

I am solving a matrix eigenvalue problem, and have found a way to make the matrices very sparse by a set of conditions x=x', y=y' and z=z'. If these are satisfied then the matrix element will be >0. If any one of them is not satisfied, then the matrix element becomes zero; hence a sparse matrix is formed. Mathematically in Maple this can be represented as such:

`ME*KroneckerDelta[x,xp]*KroneckerDelta[y,yp]*KroneckerDelta[z,zp];`

Where ME represents the matrix element and xp, yp, zp represent the prime notation . I apply this form within a C++ routine which I am extracting the matrices from into Maple where I am looking to modify them to experiment with an extension of the program.

The matrices I read into Maple have had the Kronecker delta functions applied, however Is there a simple way to reverse the effect of the Kronecker delta functions with the Matrix in Maple and return the Matrix equivalent to just ME without the product of kronecker delta functions?

-Yeti

## Strange behavior of t-distribution command in Mapl...

I am finding that the  PDF command with Student's t-distribution in the Statistics package is not behaving as expected. Here is what I tried so far:

>restart;
>with(Statistics):
>X := RandomVariable(StudentT(nu));

>PDF(X,0.5);
Dirac(X - 0.5)

Note that PDF(X,0.5) is evaluating to Dirac(X-0.5) instead of the pdf of Student's t-distribution density function.

Any help in identifying the issue is greatly appreciated. I am running Maple2015 on linuxmint 17.

Thanks!

## Plot of set-valued function at a point or interval...

I have a piecewise defined linear function, at one point it has a set value. How can i plot it in maple??

## How do I simplify the elements of a matrix return ...

I have been looking at a method for computing the inverse of a periodic, tridiagonal, matrix (tridiagonal with non-zero elements in (1,n) and (n,1), where n is the order of the matrix).

Using test matrices with rational elements I get a good improvement in execution time compared to Maple's MatrixInverse procedure from LinearAlgebra. However when I use algebraic elements I get faster times with small orders but from around
n=25 (for a particular example matrix) my method is running slower than MatrixInverse.

If I look at the element (1,1) of the inverse returned by both procedures I see that the Maple inverse is quite compact while the value returned by my procedure is very complex (on printing Maple extracts 17 subexpressions of varying complexity). I
have a check in the test rig to determine if the two inverses are the same; this uses

evalb(simplify(AinvMaple[i,j]-Ainv[i,j])==0)

and all the elements do agree.

The Maple MatrixInverse appears to be able to simplify the elements of the inverse; is this a feature of the algorithm that's being used or is there some mechanism I should be using to achieve this?

The source code of the procedure I've written (first 100 odd lines) and the test rig are attached. The file is set up to run the algebraic test (Test4) for n=20 and to print the (1,1) inverse elements generated by both the Maple and my procedures.

Any help in improving my code to produce simplified forms of the elements would be greatfully received.

Maple source as text file: KilicInv.txt

## Export pictures to PDF in Maple (what I see is wha...

I have two figures that's generated in Maple (by plot), then pasted them to a worksheet, which I would like to export them to PDF format with exactly the same as it seems on Maple, meaning that these two figures need to be on the same row.

However, in the exported PDF, these two figures are always in two rows: see Fig_1.mw and Fig_1.pdf

What I tried was: to really resize these two figures into very small size, and the export works, however, I also need three figures or four figures in one row. See Fig_2.mw and Fig_2.pdf

So there is actually two questions:

1. Can I specify some parameters in Maple such that the exported PDF is exactly 'what I see is what I get'?

2. If #1 is impossible, where can I get the information on: width of the exported PDF, how to specify the precise size of plot command etc

Thanks,

## How to express a chemistry equation in prefix expr...

How to express a chemistry equation in prefix expression

## How to shade area between 3 functions and define a...

I tryed this, because i thought i might be abel to shade this new piecewise function later on, but i dont know how to tell maple that there is 2 y-axes values in the interval from (2;3):

so it failed.

pleace help regards Niklas.

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