gaurav_rs

55 Reputation

4 Badges

2 years, 98 days

MaplePrimes Activity


These are replies submitted by gaurav_rs

@vv Thanks for the reply. I understand there are analytical functions which exist as you mentioned. But here I am trying to capture the behaviour of an analytical function by including more number of terms in my series.

For example, if I set n=100, the plot generated by the solution x approaches the exact analytical function, but the slope of the curve which is generated from the solution x',  does not match. Further with different values of 'n' I get different graphs which diverges far away from the desired result. Why does this happen? Is it an inherent flaw of the method?

-Grv

@Axel Vogt thank you. It solves the issue.

@acer Thanks. I see how digits from 10 to 11 change the solution significantly.

@Carl Love Thanks. I see the difference now. It clears my doubts.

 

@Carl Love, I tried in my maple sheet with ten digits accuracy. I see two different solutions which differ after one place of decimal. I am pasting my result here. Correct me if I made a mistake somewhere.

Thanks,

### fnaormal

fnormal(F1)
      9 /                            2\ /
  1 10  \30096.53379 + 0.5577615396 r / \
                   6              
  -0.005914995949 r  cos(6. theta)

                       9              
     + 0.004452867250 r  cos(9. theta)

                       25               
     + 0.002112306765 r   cos(25. theta)

                        4              
     - 0.0006720061736 r  cos(4. theta)

                         38               
     + 0.00008077651558 r   cos(38. theta)

                        39               
     + 0.0006431431134 r   cos(39. theta)

                        40               
     + 0.0006638764086 r   cos(40. theta)

                        41               
     + 0.0003077586813 r   cos(41. theta)

                        42               
     - 0.0001856408707 r   cos(42. theta)

                        43               
     - 0.0004195028383 r   cos(43. theta)

                        44               
     - 0.0003706398326 r   cos(44. theta)

                         45               
     - 0.00007999587758 r   cos(45. theta)

                        46               
     + 0.0001737050011 r   cos(46. theta)

                        47               
     + 0.0002156346448 r   cos(47. theta)

                         48               
     + 0.00008688707407 r   cos(48. theta)

                         49               
     - 0.00002566545888 r   cos(49. theta)

     + 0.01087963381 cos(theta) r

                       24               
     + 0.001887562703 r   cos(24. theta)

                        26               
     + 0.0009513343463 r   cos(26. theta)

                        27               
     - 0.0006163648650 r   cos(27. theta)

                       28               
     - 0.001638476483 r   cos(28. theta)

                       29               
     - 0.001544747773 r   cos(29. theta)

                        30               
     - 0.0005206686267 r   cos(30. theta)

                        31               
     + 0.0007031766719 r   cos(31. theta)

                       32               
     + 0.001364403773 r   cos(32. theta)

                       33               
     + 0.001054024695 r   cos(33. theta)

                        34               
     + 0.0001949337812 r   cos(34. theta)

                        35               
     - 0.0007191715359 r   cos(35. theta)

                       36               
     - 0.001022787615 r   cos(36. theta)

                        37               
     - 0.0006867126825 r   cos(37. theta)

                       5              
     - 0.005190745251 r  cos(5. theta)

                       11               
     + 0.001548120615 r   cos(11. theta)

                       12               
     - 0.001889106414 r   cos(12. theta)

                       13               
     - 0.003811736196 r   cos(13. theta)

                       14               
     - 0.003225734308 r   cos(14. theta)

                        15               
     - 0.0006456518232 r   cos(15. theta)

                       16               
     + 0.002031909681 r   cos(16. theta)

                       17               
     + 0.003233144447 r   cos(17. theta)

                       18               
     + 0.002313722813 r   cos(18. theta)

                         19               
     + 0.00006898483226 r   cos(19. theta)

                       20               
     - 0.002028526249 r   cos(20. theta)

                       21               
     - 0.002671173200 r   cos(21. theta)

                       22               
     - 0.001577514229 r   cos(22. theta)

                        23               
     + 0.0003622094777 r   cos(23. theta)

                       8              
     + 0.001457906748 r  cos(8. theta)

                       10               
     + 0.004338521860 r   cos(10. theta)

                       7              
     - 0.002932422896 r  cos(7. theta)

                       3                                    2
     + 0.005477166298 r  cos(3. theta) - 0.000008419543240 r

     + 0.002400343313 cos(2. theta)

                      2                              \  
     + 0.01034855650 r  cos(2. theta) - 0.01190732483/ r
CodeTools:-Usage(
   int(fnormal(F1), [theta= Pi/4..7*Pi/4, r= 0..1])
);
memory used=75.80MiB, alloc change=43.32MiB, cpu time=624.00ms, real time=623.00ms, gc time=46.80ms
                                      12
                       -1.152122349 10  
## Other solution
int_F1:=evalf(Int(F1,[theta=Pi/4..2*Pi-Pi/4,r=0..1]));
                                           12
                  int_F1 := -1.116001007 10  

 

@acer Thank you Acer. Your reply educated me on many aspects of this problem. Thank you for such a detailed investigation. 

 

regards,

@Carl Love Thanks for the code. It solves the purpose up to two decimal points accuracy (for particular digit set up). But it solves the memory allocation issue nicely.

Regards,

 

 

@tomleslie I tried that, but it did not work. Maple kept on running and did not find a solution. Further matrix file is large, and I am unable to append it here.

I used ;

Digits := 32;
with(LinearAlgebra);
X_sol := LinearSolve(MAT, VEC, method = 'hybrid');

Even with change of digites I get X_sol (1) = fload undefined and so on..

 

@vv Thanks for the reply. As suggested, I increased the digits to 120 but it didn't work.

@Kitonum Thanks ! I see this may be the reason why I am getting an error.

Thanks!

Best,

gaurav

@Kitonum ahh I missed (-a)^-1 !! ok but I am not getting the desired solution, is there an error in assume or am i missing some thing?

 

thanks!

@acer Previously I was using DIgits:=16; WIth the lower digits set (14), computation is fast. Thanks for the code.

-Gaurav

@vv Thank you for the reply. Following your comment, I set  digits to 14 which significantly reduced the computational time.

@acer Thanks a lot for your pateince  while pointing out the exact issue. Indeed It was the sign flip around the ramp that bothered me as stress function is  smooth in that region. combine(zeta_c, symbolic)  exactly resolved it.

 

"Do you understand that when there are branch-cut issues -- around say rational multiples of Pi -- turning exact values into floating-point representations can be trouble. "

Thnks for pointing out this issue. I had to use it due to the fact that evalc(Re(stress_c)) took longer time than I expected ; to my rescue I used evalf(Pi) which went terribly wrong I guess.

Thanks again !

@tomleslie Thankyou so  much for the reply. The cuase ot ramp is clear and yes you are correct that Maple is doing right job. As mentioned in one of the reply I should have clearly mentioned the physics. I was not expecting the ramp as stress is smooth in that region.

 

Thanks for you insights!

 

regards,

1 2 3 4 Page 1 of 4