Carl Love

## 19074 Reputation

7 years, 349 days
Mt Laurel, New Jersey, United States
My name was formerly Carl Devore.

## I haven't received an email from you...

@Arif Ullah khan I sent you an email about 24 hours ago, but I haven't received a reply.

## Go ahead and post the Question...

@Reshu Gupta I didn't mean to discourage you. You're welcome to post that boundary-layer Question as a new Question.

## LinearAlgebra:-GenerateMatrix...

@Carl Love As can be seen from my code above (which you've confirmed in another Reply is correct), your entire 12x12 system can be generated from 7 fairly easy and quick-running lines of Maple code. With one more line, I can extract the coefficient matrix and right-side vector of the system:

(A,B):= LinearAlgebra:-GenerateMatrix(sys, Ps);

With some simple adjustments, which wouldn't increase the complexity of the code in the slightest, it could be used to generate the 27x27 matrix that you initially inquired about. So, all the effort and back-and-forth dialog about importing the matrix could've been replaced by a few simple lines of Maple code. (I'm not saying that you should've known this at the time.)

The take-away message is: Consider the possibility of a pure-Maple solution first.

## Smaller "practice" problem?...

@Bohdan I have a very low personal psychological tolerance for GUI sluggishness, and your worksheet "Problem_3.mw" for the12x12 system slightly exceeds that tolerance. Would it be possible for us to "practice" similar simplification operations with a smaller system, say the 8x8 system that you referred to earlier (if it's full rank)? There are easy and very fast commands that can replace all the operations that you laboriously do with the mouse. One such command is numer, which in this case will extract the numerator polynomial of a rational function. (I think that you realize already that all the denominator polynomials are the same, being the determinant of the coefficient matrix of the original system.) I'd be happy to teach you these commands on a smaller system.

Is this statement correct: No term in any of the expanded numerators contains more than one rho?

My guess is that you want to express these numerators in the form

Sum(rho[i,r]*Sum(Product(pi[...], ...)*Product(gamma[...], ...), ...)

Is that correct?

The hard part is seeing the patterns of the indices. I don't think that simplify will help you see that. What might help, though, is having the terms sorted by those indices. Do you agree? This can be easily done.

## "alloc" is off by a factor of 2...

There is a bug in Maple's reporting of the memory allocation. The amount that the operating system says is allocated is almost always (perhaps always?) exactly double the amount that is reported by those "alloc=..." messages in the command-line interface. In the GUI interfaces, that same information is reported as "Memory: ..." on the bottom line of the window. I have noticed this bug for years.

So, the message "alloc=32540.2MB" indicates that the program was using about 64GB (your machine's limit) at the time of the crash.

## Ask as a new Question...

@Reshu Gupta That has nothing to do with your original Question or the title of this thread. Please post it as a new Question.

And you haven't made any "mistake". The problem is due to limitations of Maple's BVP solver for boundary-layer problems. Getting solutions to converge often requires sophisticated adjustments to the dsolve options.

## "alloc" numbers would help...

@mylikes If you still have access to those output files, it would be helpful in diagnosing the situation if you would report the last 5 or so lines of the form "memory used=..., alloc=..., time=..." before receiving the error message. Please post this information for each error message.

The message "Execution Stopped: Unhandled signal caught (UNKNOWN: 1)" looks like it comes directly from the operating system rather than from Maple. Have you received this message more than once? Is it reproducible in the sense that if you repeat the calculation with exactly the same input then you'll always get this message?

My guess at this point is that they are all running out of memory, but I'd like to see those "alloc" numbers.

As far as I know, Maple doesn't offer any way to make a graceful recovery from a memory allocation error (including stack limit errors). This is very unfortunate. In other words, there is no datalimit command that works analogously to the timelimit command, which allows you to set the amount of cputime used at which you want to make a graceful recovery. So memory errors tend to produce a "hard crash" with messages that aren't very informative.

## Preben's solution...

@Arif Ullah khan The solution by Preben Alsholm appears above, immediately under your Question. I repeat it here:

```A1 := dsolve(subs(para,rho=2, {bc, eq1, eq2}), numeric,method = bvp[midrich],
initmesh=1024,maxmesh=12500, output=Array([seq( 0.01*i, i=0..100*N)]),abserr=1.5e-2):```

So, I ask you for the third time, by how much does this solution differ from the solution that you want?

I'll send you an email.

## Can't get that paper without paying...

@Arif Ullah khan The following statements that you made about Preben's solution make no sense to me when taken together. You said to Preben:

• [A1] Thanks for your reply. I check it and it does not give me the required results.

• [C1] Is Preben's solution far off? Or is it only off in the 2nd decimal place?

To which you replied:

• [A2] Sorry @Carl Love I did not know about Preben's solution.

Your statement A1 implies that you were able to compare Preben's solution to some other solution deemed correct, presumably from that paper, and the solutions differed. So, did the two solutions differ by more than the 2nd decimal place? Or did they differ by less?

I can't get that paper from that linked website without paying them US\$30.

## I will attempt shooting...

@Arif Ullah khan I will attempt a shooting solution. I'll be busy for the next 10 hours or so. These BVPs often have multiple valid solutions, and mine may converge on the same solution as Preben's, or it may not converge at all. I'll look for guidance from the paper. It may be better to use the approxsoln option.

## Boundary-layer problems...

@Arif Ullah khan These boundary-layer fluid-flow ODE BVPs are quite tricky, and Questions about them are one of the most common topics here on MaplePrimes. Unfortunately, at this time, there is no "stock" solution (as in method= bvp[...]). Rather, there is just a "bag of tricks" that we use on an ad hoc basis, fine-tuning the numerous options to the dsolve command.

Is Preben's solution far off? Or is it only off in the 2nd decimal place? Knowing that will give me an idea how to proceed.

## Example...

@Carl Love Example:

plot(
sin(x), x= -Pi/2..Pi/2, legend= [HPM_case3],
labels= [xi, f(xi)],
axis[2]= [tickmarks= [seq](-1..1, 0.1)], axesfont= [HELVETICA, BOLD, 10],
gridlines, axes= boxed
);

The font size small enough to avoid crowding (I used 10 above) might be different on your display than on my display. I don't know what the default is, but it was too big on my QHD+ display.

## varepsilon?...

1. The proposed solution contains a variable varepsilon that doesn't appear in the input and isn't otherwise defined. Thus, this can't be the solution, or at least it can't be the complete solution.

2. Shouldn't the S__2 at the end of the proposed solution actually be S__1?

3. Although it's not an error to do so, you shouldn't use the quotes with `S__2` because of the possibility of enclosing an extra space in them (which you did do), which is also not an error, but could easily lead to one.

## I will try to estimate...

@Bohdan I will try to make some estimates of that. Before I go too far with it: Is it intentional that some gamma have two indices and some have three?

## The problem itself is infeasible...

@Bohdan As I've been trying to tell you, it's the problem itself that's infeasible. The infeasibility is not due to the method used to solve it. There does not exist---and there never will exist---any method that's able to solve this in any feasible amount of time or memory.

The system of equations in your worksheet is mathematically equivalent to the inverse problem. Therefore, it's merely a different method, not a different problem.

Note that by "infeasible" I do not mean that the problem has no solution. Its solution definitely "exists" in some abstract mathematical sense. But that solution can never be achieved,

 First 8 9 10 11 12 13 14 Last Page 10 of 547
﻿