Ask Your Question

Sukrit-Gupta's profile - activity

2016-10-18 13:13:15 +0200 received badge  Necromancer (source)
2016-10-18 13:13:15 +0200 received badge  Teacher (source)
2016-10-18 12:08:32 +0200 answered a question Typeset mode in iPython notebook

You can write the below code in your file, & it may work.

%typeset_mode True

2016-05-15 06:03:29 +0200 answered a question Different syntax to solve

Apart from the good answer given by @ndomes , here are some codes:

In eq1, correct the sign between P and emi (and I think the number of "variables to solve for" should be atleast equal to number of equations to get a solution):

P, emi, rate, duration = var("P emi rate duration")
eq1 = P == emi * (( 1 + rate / 100)^ duration - 1) / (rate / 100) / (1 + rate /100)^ duration
solve([eq1, P == 100, duration == 2, rate == 10], [emi, P, duration, rate])

The below code is same but visually different:

P, emi, rate, duration = var("P emi rate duration")
eq1 = P == emi * (( 1 + rate / 100)^ duration - 1) / (rate / 100) / (1 + rate /100)^ duration
eq3 = P == 100
eq4 = duration == 2
eq5 = rate == 10
solve([eq1, eq3, eq4, eq5], [emi, P, duration, rate])
2016-05-14 13:01:18 +0200 commented answer How to Rationalize the Denominator of a Fraction ?

Basically, what are algebraic calculations? or are there any consequences of turning on the algebraic maxima_calculus on precision or general calculations in sage ?

From your below answer, another method to set it to true.

a.maxima_methods().ratsimp('algebraic: true')
2016-05-13 20:02:36 +0200 commented answer Different syntax to solve

Thanks for the neat code. Can you please explain why the below code doesn't work:

P, emi, rate, duration = var("P emi rate duration")
eq1 = P == emi * (( 1 + rate / 100)^ duration - 1) / (rate / 100) / (1 + rate /100)^ duration
eq3 = P == 100
eq4 = duration == 2
eq5 = rate == 10
sol = solve([eq1, eq3, eq4, eq5], emi)

It looks like 4 equations, and only one variable to solve.

2016-05-13 17:59:53 +0200 received badge  Supporter (source)
2016-05-11 17:21:35 +0200 received badge  Student (source)
2016-05-11 14:38:40 +0200 asked a question Different syntax to solve

I've below equation( j.mp/sage_emi ) involving 4 variables. I've fixed 3 variables' values, but can't get the 4th variables' value (both, including numerical). Can someone fix the code? Manually, I can get the answer for emi as 1210/21.

P, emi, rate, duration = var("P emi rate duration")
eq1 = P = emi * (( 1 + rate / 100)^ duration - 1) / (rate / 100) / (1 + rate /100)^ duration
solve([eq1, P == 100, duration == 2, rate == 10], emi)

It would be helpful if someone writes 2,3 different sage code to achieve the same above objective.

I'm just curious can we do this:

solve([eq1], rate)