Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@janhardo Okay, I believe that you have spent more than 5 minutes on your calculations., but as I said, you must have made an error.  Redo the calculations.

 

@janhardo The area of the the rectangle SJIK is (12/5)^2*8 = 1152 / 25.  The green area equals that minus 8, that is,  1152 / 25 - 8 = 952 / 25 = 38.08.  If you are getting something different, then you must have an error in your calculations.

@Carl Love Your ZigZag and ZigZagInv procs are quite clever.  I converted the first one from Reply to Answer in order to give it a thumbs up.  I don't know how to rearrange the followups into a proper sequence. If you (or anyone else) know how to rearrange, please do so.

 

@Carl Love That's excellent.  I had a feeling that the code can be shortened, but did not expect it to such an extent.

What is δ?  Is it a multiplier or a function?  At places you have δ(T−t)).  No space after δ indicates a function application.  At some other places you have δ (T−t).  A space after δ indicates multiplication. You want one or the other.

I haven't looked closely at the rest of your worksheet.  Make sure that you have no other similar issues.

If you continue having such problems, consider configuring your Maple for 1D input where issues like this don't arise.

 

 

@Jak Okay, that's better, but your question is unclear.

You say "I have two curves" but what you have shown are two expressions (not equations) which you have called eq1 and eq2.

One way I can think of making sense of "I have two curves", is to assume that your curves are given as eq1=0 and eq2=0.  Is that what you mean?

But in that case, eq1 < eq2 makes no sense since both eq1 and eq2 are zero.  I don't know where to go from here.

Perhaps you mean something else.  If so, then clarify.

 

 

 

In eq2 you have x[e(holling)].  What is it?

@vv That works better than what I could have imagined.   Thanks!.

@Test007 I did haven't changed any settings.  What I have shown is based on the version of OrthogonalExpansions dated May 27, 2016 from the site that you have noted, and run on Maple 2020.  How is your result different from mine?

 

@Neel 

The key to get you moving forward is the calculation shown in section
titled Orthogonal expansion in my worksheet.  I see that you have not
carried over that section into your worksheet, hence the disconnect.

 

Let me summarize that content of that section.  It says that any function f(x) may be
expressed as f(x) = sum(`&alpha;__n`*X__n(x), n = 1 .. infinity), and that the coefficients `&alpha;__n` are given by
`&alpha;__n` = 2*(int(f(x)*X__n(x), x = 0 .. L))/L.

In particular, when alpha*(1-x/L) = sum(k__n*X__n(x), n = 1 .. infinity), then we have: 
k__n = 2*(int(alpha*(1-x/L)*sin(n*Pi*x/L), x = 0 .. L))/L.

Maple can compute that integral easily:

k[n] = 2/L*int( alpha*(1-x/L)*sin(n*Pi/L*x), x=0..L) assuming n::integer;

k[n] = 2*alpha/(n*Pi)

There you have it.  Scroll all the way down to the very bottom of my

worksheet and insert that value of k__n in the final formula and you are done.

 

@Carl Love A very nice construction.  Vote up!

 

@Carl Love Not related to the programming language per se, but to the worksheet interface: High on my wish list is some construct that would limit the scope of identifiers to a specified region of a worksheet.  Something like

scope
x := 12;
...
one or more execution groups here

end scope;

where the assignment x:=12 is effective only within that scope.

Admittedly, something like this can be accomplished through a proc, but that would hide the output of the individual statements within the scope.

 


 

@acer In the usual eigenvalue problem in linear algebra, finding the eigenvalues of a matrix M amounts to finding the values of λ so that the matrix M − λ I is singular.  His is a nonlinear eigenvalue problem where we have a matrix M(λ) which is a nonlinear function of the parameter λ, and we want to find λ so that M(λ) is singular.  That's beyond the scope of LinearAlgebra:-Eigenvalues.

 

@PhD_Wallyson Look at the equation just before the implicitplot command.  Call that equation Eq. It involves only rho and lambda.  Given rho=4.3, you want to calculate the corresponding lambda values.  So we do:

eval(Eq, rho=4.3):
fsolve(%, lambda=0.001..5, maxsols=5);

and that produces

0.4074182340, 1.033338698, 1.741806657, 2.444688425, 3.111634975

The reason for the 0.001 in the call to fsolve is to avoid the lambda=0 solution.

 

@PhD_Wallyson In the worksheet that you have posted, note paragraph just above where the plot_mode( ) proc is defined.  It says that in principle the determinant of M is zero, but in practice is may be not quite zero due to floating point roundoffs.  It also says that you need to keep an eye on the value of the determinant and take corrective action is if it too far from zero.

Also note the message, printed in blue, just before each of your three plots.  We have things like this:

Determinant is -2.99856e+025.  Increase Digits if not near zero!

Certainly 10^25 is not close to zero, therefore the result is pretty much nonsense.

As the message suggests, one way around this is to increase the number of digits that Maple carries in its floating point calculations.  The default is 10 digits.  If you increase the digits of accuracy to 30, then the determinants will be almost zero.

The digits of accuracy is specified by the Digits variable.  Therefore near the beginning of your worksheet you need to insert:

Digits := 30;

Although that will work, I strongly advise against doing that  because that's the wrong approach to solving the problem.  Consider, for instance, that you want to carry out the equivalent calculations in Matlab instead of Maple.  Matlab's precision is something like Digits = 16, and that's not adjustable.  Therefore your program won't work at all in Matlab. As you have seen, if you use centimeters instead of meters, Maple works just fine with the default of 10 digits.  In engineering calculations it is quite common (and often absolutely necessary) to use sensible units in order to scale the computational ranges of variables into what the machine can handle.

 

First 26 27 28 29 30 31 32 Last Page 28 of 91