Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:23:52+00:00 2026-06-08T22:23:52+00:00

I ran into this problem when I try to solve a partial differential equation.

  • 0

I ran into this problem when I try to solve a partial differential equation. Here is my code:

dd = NDSolve[{D[tes[t, x], t] ==D[tes[t, x], x, x] + Exp[-1/(tes[t, x])],
   tes[t, 0] == 1, tes[t, -1] == 1, tes[0, x] == 1}, {tes[t, x]}, {t, 0, 5}, {x, -1, 0}]

f[t_, x_] = tes[t, x] /. dd
kkk = FunctionInterpolation[Integrate[Exp[-1.1/( Evaluate[f[t, x]])], {x, -1, 0}], {t, 0, 0.05}]
kkg[t_] = Integrate[Exp[-1.1/( Evaluate[f[t, x]])], {x, -1, 0}]
Plot[Evaluate[kkk[t]] - Evaluate[kkg[t]], {t, 0, 0.05}]
N[kkg[0.01] - kkk[0.01], 1]

It’s strange that the deviation showed in the graph reaches up to more than 5*10^-7 around t=0.01, while it’s only -3.88578*10^-16 when calculated by N[kkg[0.01] - kkk[0.01], 1], I wonder how this error comes out.

By the way, I feel it strange that the output of N[kkg[0.01] - kkk[0.01], 1] has so many decimal places, I’ve set the precision as 1, right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:23:54+00:00Added an answer on June 8, 2026 at 10:23 pm

    Using Mathematica 7 the plot I get does not show a peak at 0.01:

    Plot[kkk[t] - kkg[t], {t, 0, 0.05}, GridLines -> Automatic]
    

    Mathematica graphics

    There is a peak at about 0.00754:

    kkk[0.00754] - kkg[0.00754] // N
    
    {6.50604*10^-7}
    

    Regarding N, it does not change the precision of machine precision numbers as it does for exact or arbitrary precision ones:

    N[{1.23456789, Pi, 1.23456789`50}, 2]
    
    Precision /@ %
    
    {1.23457, 3.1, 1.2}
    
    {MachinePrecision, 2., 2.}
    

    Look at SetPrecision if you want to force (fake) a precision, and NumberForm if you want to print a number in a specific format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran into this problem and I cant solve it. Basically Im making an
I ran into a problem with some C code like this: struct SomeType {
today I ran into this problem which really bugs me, as almost the code
Never ran into this problem with jQuery before. I have the following: $(document).ready(function() {
All, I ran into this problem where for a UITextField that has secureTextEntry=YES, I
I ran into this concurrency problem which I've been scratching my head for several
I ran into this error when building my code with CLANG: In file included
I'm fairly new to Mvc and ran into a problem try to use an
I ran into this problem while trying to fix a memory leak with the
I ran into this problem using EF4 and a self-referential table (implementing an adjacency

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.