具有某些微分方程和DSolve的Mathematica问题 [英] Mathematica problems with certain differential equations and DSolve

查看:331
本文介绍了具有某些微分方程和DSolve的Mathematica问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在上手时遇到了麻烦.我正在参加金融工程计划,并且尝试使用2003年写的一本书来帮助我对偏微分方程,黑洞模型等进行建模.

Im having trouble getting started. I am in a Financial Engineering program, and I am trying to use a book written in 2003 to help me model partial differential equations, the black scholes model, etc.

但是在介绍性章节中,存在一个非常基本的ODE利率问题,我的输出与本书截然不同.

But in the introductory chapter there is a very basic ODE interest rate problem, and my output is very different from the book.

DSolve[{y'[t] == ry[t], y[0] == P}, y[t], t] 

是我的意思.这本书对{{y(t)-> P * exp ^(rt)}}

is what I put in. The book has a very neat solution of {{y(t)->P*exp^(rt)}}

我得到的是类似的东西(请注意,我无法发布输出)

What I get is something like (Note, I can't post the output)

{{y(t) -> integral_1_to_t ry(K[1]]dK[1] - integral_1_to_0 ry(K[1])dK[1]+P}}

什么是大K?这仅仅是一些不能生成符号解的规则输出吗?因为我的设置或文件系统出现问题?此外,对于在Mathematica上使用旧书的代码可能已过时的情况,是否有任何建议?我只需要找到一种前进的方法,并将其应用于我的学习中即可.

What are the big K's? Is this just some rule output that can't generate a symbolic solution? Because of some problem with my set up or filesystem? Also, are there any suggestions for using old books on Mathematica where the code provided may be out of date? I just need to find a way to move forward and apply this to my studies.

最后,有时与其他ODE相比,我得到的结果与来源不同. IE.我遵循了Mathematica ODE教程,并且我的输出也有所不同.在某些地方,我的Mathematica版本无法计算,或者无法在解决方案中删除某些变量s或常量,或者没有输出.我浏览了DSolve的常规疑难解答,但没有发现持久的和公认的错误.我想知道我的文件系统中是否有问题或其他问题?请帮忙!

Last, sometimes with other ODE's I will get results different than my source. I.E. I followed a Mathematica ODE tutorial and my output was different too. In some places my version of Mathematica won't calculate, or drops certain variable s or constants in the solution, or there is no output. I have browsed for general troubleshooting for DSolve, but have found no persistent and recognized bug. I am wondering if there is something wrong in my file system, or something else? Please help!

推荐答案

ry[t]之间缺少空格.

尝试:

DSolve[{y'[t] == r y[t], y[0] == P}, y[t], t]

这篇关于具有某些微分方程和DSolve的Mathematica问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆