## 787 Reputation

9 years, 177 days

## Kitonum's code...

ContoursWithLabels is Kitonum's code see_here

@C_R

## A hint...

Go here help(dsolve[numeric]), search for 'known', try to understand hot to proceed from examples dsol8 and dsol8b.

## @Muhammad Usman Does this suit you?...

Does this suit you?

```plots[display](
PP
, size = [500, 400]
, axis[1]=[tickmarks=[seq(k=k/10., k=0..20, 5)]]
, axis[2]=[tickmarks=[seq(k=k/10., k=0..20, 5)]]
);
```

But given L=1 and T=2, it seems to me that this

```plots[display](
PP
, size = [500, 400]
, axis[1]=[tickmarks=[seq(k=evalf(k*`&Delta:x`), k=0..20, 5)]]
, axis[2]=[tickmarks=[seq(k=evalf(k*`&Delta:t`), k=0..20, 5)]]
);
```

would be more correct.

What is the structure of the data you want to send to Tecplot?
I guess it is a collection of contours, each contour being a collection of segments, that is a collection of 2x2 matrices.
The question is what structure Tecplot can manage? Once defined, the corresponding structure can be build in Maple.
But the "precision" of a contour of a given length is defined by the number of segments which approximate this contour. So the drawing in Tecplot of a contour made of, for instance, 100 segments constructed in Maple, will not have an higher resolution than thesame contour directly drawn in Maple.

## As you definedN := 20: Mx := 20: and plo...

As you defined

```N := 20:
Mx := 20: ```

and plotted

```plots:-contourplot(
interfunc,
0 .. Mx, 0 .. N
...
)```

why do you say "Here the t-axis is from 0 to 20 but its actual value is from 0 to 2 and the x-axis is from 0 to 20 but its actual value is from 0 to 2"?

If you want them to range from 0 to 2 just write

```plots:-contourplot(
interfunc,
0 .. 2, 0 .. 2
...
)```

```N := 2:
Mx := 2: ```

It's up to you to lnow what you want to do.

About your claim "How I can, I extract data in the form of a dat file to plot in some professional software? " (which, I'm afraid of, will be likely understood as "Maple is not a professional software") you must be more detailed.
If you have professional in mind, I think that best thing to do is to give him interfunc plus some indications and let him manage to provide a "real professional layout".

## Thanks for the feedback...

And NO, I have no idea where your error came from.
What I can say is that your file, when opened with Maple 2015 on an iMac, generates a "Connection to the kernel lost" infamous message (which means that the only thing to do is to quit Maple).

## @RaySierra There are probably hidde...

There are probably hidden characters somewhere in your file that I don't have time to seek out (they could come from some copy/paste operation)
Just open the attached file and check if it works correctly with your Maple version

Please keep me informed and let me know if you'd like an example of a Monte-Carlo simulation distributed over several cores (see my comment in my first reply).

## Is it this that you copy-paste?...

 > restart
 > kernelopts(version)
 (1)

ref: Programing_Guide_2023

pages 583-584

 > local i;
 > add( i, i = lo..hi );
 > end proc:
 > parallel_add_range := proc( lo, hi, n )
 > local i,step,d;
 > d := hi-lo+1;
 > step := floor( d/n );
 > seq( [i*step+lo,(i+1)*step], i=0..n-2 ),
 > [ (n-1)*step+lo,hi ] ] );
 > end proc:
 > N := 3*10^7;
 (2)
 > start := time[real]():
 > time[real]()-start
 (3)
 > start := time[real]():
 > time[real]()-start
 (4)
 > start := time[real]():
 > time[real]()-start;
 (5)
 > start := time[real]():
 > time[real]()-start;
 (6)
 >

I use to do intensive MC simulations int he following specific context: some inputs X of a simulation code C are random variable and one is interested in assessing some statistics of the random output(s?) Y of C.

This problem is usually tackled by sampling X, running C over this sample, finally analyzing the induced Y sample. X sampling can be done through some strategy, in particular Monte-Carlo sampling (MCS).
MCS is largely used for a MC sample augmented by another MC sample is still a MC sample (specific properties MCS are conserved), opening the route to distributed computations, that is sampling+running on different cores/processors/machines.

This process is perfectly scalable meaning the sampling+running operation executed on P cores is exactly P times faster than executed on a single one (at least in theory for the OS of the machine host limits generally reduces the performance).
The time requires to gather the P partial simulations is general negligible

To do this I use to use the Grid package instead of the Threads one.

## Definition of roll is not necessary...

@petit loup    @acer

Sample(Normal(0, 1), [n, n])

## @Jamie128  So do you say that z = ...

@Jamie128

So do you say that z = -2*M^2*sin(theta)^2 - 2*k*r^2?
What you need, I repeat myself, is a function r(theta, z) plot3d(r(theta, z), theta = a .. b, z = c .. d, coords = cylindrical)
and this expression of z doesn't make r uniquely defined:

```restart
z = -2*M^2*sin(theta)^2 - 2*k*r^2;
r =~ [solve(%, r)]
```

## plot3d, coords (cylindrical) help page:...

it is said that

For alternate coordinate systems this is interpreted differently. For example, when using cylindrical coordinates, Maple expects the command to be of the following form: plot3d(r(theta, z), theta = a .. b, z = c .. d, coords = cylindrical)

What are r(theta, z) and z in your expression -2*M^2*sin(theta)^2 - 2*k*r^2?

Do you mean z = -2*M^2*sin(theta)^2 - 2*k*r^2?

What does your claim "where the function is greater than zero and where it is less that zero" mean given that ehe radius (r?) is to be always greater or equal to 0.

To complete @Christian Wolinski 's reply: f can be integrated provided alpha is an integer <= 1.
I guess that the reason why the WhittakerM function

In the attached file you will see that the integration can be done only (that's my hunch, not a mathematical proof) when
WhittakerM(a, b, 3/2*t) can be converted into elementary functions.
(
Maybe there exist some recurrence relation to integrate int(h(t)*WhittakerM(a, b, 3/2*t) , t), but I wasn't capable to find any.
More precisely I thought that one could take advantage that

```diff(WhittakerW(p, q, 3/2*t), t);
/          3  \
WhittakerW |p + 1, q, - t|
3 /1   2 p\             /      3  \              \          2  /
- |- - ---|  WhittakerW |p, q, - t| - -------------------------
2 \2   3 t/             \      2  /               t

```

).

When alpha is an integer > 1, the denominator GAMMA(2-alpha)=0 and f is undefined.

Whittaker.mw

## @mz6687 I'm sorry, but I don...

@mz6687

I'm sorry, but I don't understand a single word of what you're saying.
What is this 8x8 matrix you are now talking about?

BTW: is it you who deleted your last question or was it moved by someone else?

Whatever, is this new thread isrelated to this one https://www.mapleprimes.com/questions/237066-Determinant-The-System-Hangs, you would better keep this discussion goin in this latter thread.

## Are you ok with that?...

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

 > para_0 := [H__14 =0.3, H__33 = 1.5, H__38 = 0.15, H__44 = 1.5]; print(): para_1 := remove((x -> is(x in lhs~(para_0))), [entries(H, nolist)]) =~ 0; print(): para := [para_0[], para_1[], c__1 = 0.5, nu = 1, alpha__1 = 1.5, alpha__2 = 1, lambda__1 = 0.58*I, lambda__2 = 0.68*I]
 (3)
 > B1_para    := eval(B1, para); detB1_para := Determinant(B1_para)
 (4)
 > H_para := eval(H, para): # Given that B_para := 'H_para . B1_para'; # one gets: detH_para := Determinant(H_para); detB_para := detB1_para . detH_para:
 (5)
 > # One possible simplification whynot := simplify(combine(detB_para, exp)) assuming real; whynot := convert(whynot, trig)
 (6)
 >

## @mz6687  Sorry, I don't unders...

@mz6687

Sorry, I don't understand what you say

 3 4 5 6 7 8 9 Last Page 5 of 24
﻿