Ask Your Question
0

How to solve an equation using SageMath?

asked 2017-04-13 08:29:26 -0500

I have just started using SageMath Cloud, based on a recommendation from a Stack Exchange user. I need to solve the following equation:

298082 = 250000(1 + r) + 25000(1 + r)^((365 - 258)/365)

...which simplifies to:

298082 = 250000(1 + r) + 25000(1 + r)^0.293150685

I go to SageMath Cloud and start a new project and start a new Sage Worksheet, and type the following:

x = var('x')
solve([298082 == (250000 * (1 + r)) + (25000 * (1 + r)^0.293150685)], r)

..and this gives the following:

[r == -1/10*(r + 1)^(11726006/39999927) + 24041/125000]

This is not an acceptable answer. How do I get it to solve the actual value, which is 0.089779615?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2017-04-13 11:43:22 -0500

ndomes gravatar image

Do you want a numerical solution?

find_root(298082 == (250000 * (1 + r)) + (25000 * (1 + r)^0.293150685),-1,1)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-04-13 08:29:26 -0500

Seen: 55 times

Last updated: Apr 13