Unexpected result in Maple (fsolve returns negative value)

In summary, the Differential Equation and Initial Values appear to be correct, but the result of fsolve is returning a negative value.
  • #1
EtherealMonkey
41
0
This is a problem that I am working on in Maple 12.

I have assigned the Differential Equation and the Initial Values for the two parts.

Then, I assigned the result to a variable before splitting off the two functions that return from dsolve.

Plotting the first function and the initial value allows me to see that the value should be somewhere around 13,000. But, fsolve is returning a value of -11400.

I have attached the Maple 12 worksheet and the original handout related to this question.

I would detail the problem, my attempt at solving it - etc; except that I do not really believe that would be as productive as having someone else look over the worksheet.

Also, this is the third attempt at entering the values in a 'new' worksheet. I have also opened the other attempted worksheets with Notepad2 (since it is an XML file) to see if there was some incorrect character or other invalid entry in the file. However, even starting with a new sheet is not returning a valid result (I do have another worksheet from when I took this course before where I received "13524.29951" as the result of fsolve at this point.)

If someone could enlighten me as to what in the world I am doing wrong (or if there is a way to limit the results returned by fsolve to a particular range (a>0?), then I would be most appreciative.

TIA,

E.
 

Attachments

  • DioxinRemediation.zip
    217 KB · Views: 240
Physics news on Phys.org
  • #2
Okay, here is a screen-shot of Maple with the problem loaded.

The issue that I am inquiring about occurs at Step #9 on the image below. As I stated in the first post, I am re-working this problem and cannot determine why I was able to find f(a)=13524.29951 when I originally worked the problem and now it is returning a negative value (restarting Maple, the machine, starting a new worksheet, etc...).

Note: I have updated Maple to the latest release on the maplesoft website (12.02).

DioxinRemediationFull_400x759.png


---

Also, is there a way to limit the result from fsolve to a particular range? I have not found a way that is returning the value stated above {f(a)=13524.29951} and I presume that answer to be correct - since that is the approximate intersection of the plot shown in Step #8.

Thanks in Advance for any ideas,

E.
 
  • #3
I downloaded your image, but it's only marginally readable. Have you tried either PDF of JPG with 100%?
 
  • #4
mugaliens said:
I downloaded your image, but it's only marginally readable. Have you tried either PDF of JPG with 100%?

Sorry, I don't know what photobucket did to my png.

Here is the same image in PDF format (only marginally better - IMHO, but it is readable w/zoom :smile: )
 

Attachments

  • DioxinRemediation.Full.pdf
    268.8 KB · Views: 303

1. Why is fsolve returning a negative value instead of a positive one?

The most common reason for this is that the function being solved has multiple solutions and fsolve is returning the negative solution. It is important to check the initial guess and the range of values being used in the fsolve function to ensure that the desired solution is being returned.

2. How can I fix the unexpected result in Maple (fsolve returns negative value)?

One possible solution is to use a different initial guess or to increase the range of values used in the fsolve function. Another approach is to use a different solver, such as the solve function, which may provide a different solution. Additionally, it is important to check for any errors in the function being solved or in the input parameters.

3. Is there a way to force fsolve to return a positive value?

Unfortunately, there is no direct way to force fsolve to return a specific solution. However, using a different initial guess or a different solver may result in a positive solution being returned. It is also important to check for any errors in the function being solved or in the input parameters.

4. Can the unexpected result in Maple (fsolve returns negative value) be caused by a bug in the software?

While it is possible that a bug in the software could cause unexpected results, it is more likely that the issue is caused by the function being solved or the input parameters. It is important to carefully check these factors before assuming there is a bug in the software.

5. How can I prevent fsolve from returning a negative value in the future?

To prevent fsolve from returning a negative value, it is important to carefully check the initial guess and the range of values being used in the fsolve function. It may also be helpful to use a different solver or to check for any errors in the function being solved or in the input parameters. Additionally, keeping the software up-to-date may help prevent any potential bugs that could cause unexpected results.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Introductory Physics Homework Help
2
Replies
35
Views
2K
  • Programming and Computer Science
Replies
5
Views
2K
Replies
8
Views
834
  • Introductory Physics Homework Help
Replies
7
Views
821
  • Programming and Computer Science
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Back
Top