1

我从我的信用卡中预支“金额”的现金,预付“费用”(以百分比形式给出),促销费率为“int”,时间为“len”。我必须每月支付至少 'min'% 的欠款。

我将“金额”存入赚取“p”%利息的投资账户,并从该账户每月支付。

问题:即使在时间 'len' 之后,我会以什么值的 'p' 收支?

以下是我在 Mathematica 中的设置方式:

DSolve[{ 

(* I start off owing amount plus the fee *) 
owed[0] == amount*(1+fee), 

(* The amount I owe increases due to credit card interest, 
   but decreases due to monthly payments *) 
owed'[t] == int*owed[t]-min*12*owed[t], 

(* I start off having amount *) 
have[0] == amount, 

(* The amount I have increases due to investment interest, 
   but decreases due to monthly payments *) 
have'[t] == p*have[t]-min*12*owed[t], 

(* After len, I want to break even *) 
owed[len] == have[len] 
}, 
{owed[t], have[t]}, {t}] 

Mathematica 返回“DSolve::bvnul:对于一般解的某些分支,给定的边界条件会导致空解”,这实际上是合理的:只有一个 'p' 值会产生上述微分方程的解.

我如何强迫 Mathematica 找到这个值?

我尝试求解 owed[t],然后将 owed[t] 代入 have[t],然后求解 owed[len] == have[len],但这会产生类似的错误。在“owed[len] == have[len]”上运行 Reduce 会产生一些复杂而丑陋的东西。

4

1 回答 1

1

方程:

owed'[t] == int owed[t]-min 12 owed[t] 

如果intmin都是常数,则只是一个指数函数。与初始条件

owed[0] == amount*(1 + fee)  

owed[t_] := amount E^((int - 12 min) t) (1 + fee)  

这就是 owed[t] 的解决方案

现在对于 have[t] 你可以使用:

DSolve[{
  have'[t] == p*have[t] - min*12*owed[t],
  have[len] == owed[len]},
 {have[t]}, {t}]  

这为您提供了满足收支平衡条件的 have[t] 表达式。

为了获得 p 的值,您必须使用最后一个等式:

 have[0] == amount  

或者,将 have[0] 替换为它的值后:

(amount E^(-len p) (1 + fee) (12 E^(len p) min + 
   E^(len (int - 12 min)) (-int + p)))/(-int + 12 min + p) == amount 

最后一个方程似乎不容易求解 p。我尝试了一些东西(当然不是太多)并且它抵抗力很强。

但是......给定其余参数的数值可以通过任何数值方法轻松解决(我猜)

于 2010-12-16T00:36:16.913 回答