Ask Your Question

lgushurst's profile - activity

2020-05-08 16:55:04 +0200 received badge  Notable Question (source)
2020-05-08 16:55:04 +0200 received badge  Famous Question (source)
2019-05-15 09:08:53 +0200 received badge  Popular Question (source)
2018-10-24 01:37:29 +0200 received badge  Student (source)
2018-10-22 18:25:51 +0200 commented answer Trouble finding intersection of two functions

I've accepted your answer as the solution and really appreciate the explanation, it's incredibly thorough and helped me understand the context of what I was attempting to do more clearly.

2018-10-22 18:03:59 +0200 received badge  Scholar (source)
2018-10-22 14:45:40 +0200 commented question Trouble finding intersection of two functions
  1. It's not homework, I'm just learning SageMath
  2. I didn't think x needed to be part of a set, there's only one intersection point and it's at roughly ~5.82. Are you saying I need to set this problem up in another way?
2018-10-22 08:37:41 +0200 asked a question Trouble finding intersection of two functions

Hi all,

I'm still pretty new using SageMath, but I'm trying to duplicate functionality that I've been able to do in wolfram alpha

Wolfram Input:

Intersection points of [//math:90000 1.03^x//] and [//math:63000 1.095^x//]

So far I've been able to recreate and graph these functions very easily using SageMath, but I'm having a difficult time using the solve function to actually return a numerical value for the intersection point itself.

My SageMath code looks like:

x = var('x') 
f1 = (63000*((1.095)^x))
f2 = (90000*((1.03)^x))
ans=solve(f2==f1,x) 
print ans 
print n(ans[0].rhs())

ans prints as "[ 219^x == 1/35200^(x - 1)103^x*100^(-x + 2) ]"

And I get an error "TypeError: cannot evaluate symbolic expression numerically" in my attempts to resolve it to an approximate number.

Can anyone tell me what I'm doing wrong?